[vlc-commits] vlc_credential: fix smb_split_domain

Thomas Guillem git at videolan.org
Fri Feb 26 10:59:17 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 26 10:10:52 2016 +0100| [9ed9d071846da0cbcb1d7fe5f74d7ed9f689c060] | committer: Thomas Guillem

vlc_credential: fix smb_split_domain

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ed9d071846da0cbcb1d7fe5f74d7ed9f689c060
---

 include/vlc_keystore.h |    2 +-
 src/misc/keystore.c    |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/vlc_keystore.h b/include/vlc_keystore.h
index c00328c..da97326 100644
--- a/include/vlc_keystore.h
+++ b/include/vlc_keystore.h
@@ -185,7 +185,7 @@ struct vlc_credential
     vlc_keystore_entry *p_entries;
     unsigned int i_entries_count;
 
-    char *psz_split_realm;
+    char *psz_split_username;
     char *psz_var_username;
     char *psz_var_password;
 
diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index c7a072e..4d4af1d 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -270,11 +270,11 @@ smb_split_domain(vlc_credential *p_credential)
         size_t i_len = psz_delim - p_credential->psz_username;
         if (i_len > 0)
         {
-            p_credential->psz_split_realm = strndup(p_credential->psz_username,
-                                                    i_len);
-            p_credential->psz_realm = p_credential->psz_split_realm;
+            p_credential->psz_split_username =
+                strndup(p_credential->psz_username, i_len);
+            p_credential->psz_username = p_credential->psz_split_username;
         }
-        p_credential->psz_username = psz_delim + 1;
+        p_credential->psz_realm = psz_delim + 1;
     }
 }
 
@@ -352,7 +352,7 @@ vlc_credential_clean(vlc_credential *p_credential)
     if (p_credential->p_keystore)
         vlc_keystore_release(p_credential->p_keystore);
 
-    free(p_credential->psz_split_realm);
+    free(p_credential->psz_split_username);
     free(p_credential->psz_var_username);
     free(p_credential->psz_var_password);
     free(p_credential->psz_dialog_username);



More information about the vlc-commits mailing list