[vlc-devel] [PATCH 3/6] smb2: always print the encoded url in the dialog

Thomas Guillem thomas at gllm.fr
Tue Mar 2 14:52:22 UTC 2021


---
 modules/access/smb2.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/access/smb2.c b/modules/access/smb2.c
index 0fc7ece4735..aacd0b63a8a 100644
--- a/modules/access/smb2.c
+++ b/modules/access/smb2.c
@@ -664,7 +664,6 @@ Open(vlc_object_t *p_obj)
 
     char *resolved_host = vlc_smb2_resolve(access, sys->encoded_url.psz_host,
                                            sys->encoded_url.i_port);
-    const char *host;
 
     /* smb2_* functions need a decoded url. Re compose the url from the
      * modified sys->encoded_url (with the resolved host). */
@@ -674,12 +673,10 @@ Open(vlc_object_t *p_obj)
         vlc_url_t resolved_url = sys->encoded_url;
         resolved_url.psz_host = resolved_host;
         url = vlc_uri_compose(&resolved_url);
-        host = resolved_host;
     }
     else
     {
         url = vlc_uri_compose(&sys->encoded_url);
-        host = sys->encoded_url.psz_host;
     }
     if (!vlc_uri_decode(url))
     {
@@ -704,7 +701,7 @@ Open(vlc_object_t *p_obj)
         && (!sys->error_status || VLC_SMB2_STATUS_DENIED(sys->error_status))
         && vlc_credential_get(&credential, access, "smb-user", "smb-pwd",
                               SMB_LOGIN_DIALOG_TITLE, SMB_LOGIN_DIALOG_TEXT,
-                              host))
+                              sys->encoded_url.psz_host))
     {
         sys->error_status = 0;
         ret = vlc_smb2_open_share(access, url, &credential);
-- 
2.30.0



More information about the vlc-devel mailing list