Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
6f4454b3
Commit
6f4454b3
authored
May 20, 2015
by
Thomas Guillem
Browse files
dsm: factor set_creds and login
parent
1ba5920a
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/access/dsm/access.c
View file @
6f4454b3
...
...
@@ -382,6 +382,15 @@ static void login_dialog( access_t *p_access )
}
}
static
int
smb_connect
(
access_t
*
p_access
)
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
smb_session_set_creds
(
p_sys
->
p_session
,
p_sys
->
creds
.
domain
,
p_sys
->
creds
.
login
,
p_sys
->
creds
.
password
);
return
smb_session_login
(
p_sys
->
p_session
)
?
VLC_SUCCESS
:
VLC_EGENERIC
;
}
/* Performs login with existing credentials and ask the user for new ones on
failure */
static
int
login
(
access_t
*
p_access
)
...
...
@@ -396,16 +405,12 @@ static int login( access_t *p_access )
p_sys
->
creds
.
domain
=
strdup
(
"WORKGROUP"
);
/* Try to authenticate on the remote machine */
smb_session_set_creds
(
p_sys
->
p_session
,
p_sys
->
creds
.
domain
,
p_sys
->
creds
.
login
,
p_sys
->
creds
.
password
);
if
(
!
smb_session_login
(
p_sys
->
p_session
)
)
if
(
smb_connect
(
p_access
)
!=
VLC_SUCCESS
)
{
for
(
int
i
=
0
;
i
<
BDSM_LOGIN_DIALOG_RETRY
;
i
++
)
{
login_dialog
(
p_access
);
smb_session_set_creds
(
p_sys
->
p_session
,
p_sys
->
creds
.
domain
,
p_sys
->
creds
.
login
,
p_sys
->
creds
.
password
);
if
(
smb_session_login
(
p_sys
->
p_session
)
)
if
(
smb_connect
(
p_access
)
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment