Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
53128dec
Commit
53128dec
authored
May 22, 2013
by
jehan
Browse files
avoid crash with op->auth_info
parent
53d4d1b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
coreapi/bellesip_sal/sal_impl.c
coreapi/bellesip_sal/sal_impl.c
+6
-8
coreapi/bellesip_sal/sal_op_registration.c
coreapi/bellesip_sal/sal_op_registration.c
+1
-1
coreapi/callbacks.c
coreapi/callbacks.c
+3
-3
mediastreamer2
mediastreamer2
+1
-1
No files found.
coreapi/bellesip_sal/sal_impl.c
View file @
53128dec
...
...
@@ -363,14 +363,12 @@ static void process_transaction_terminated(void *user_ctx, const belle_sip_trans
}
static
void
process_auth_requested
(
void
*
sal
,
belle_sip_auth_event_t
*
auth_event
)
{
SalAuthInfo
auth_info
;
memset
(
&
auth_info
,
0
,
sizeof
(
SalAuthInfo
));
auth_info
.
username
=
(
char
*
)
belle_sip_auth_event_get_username
(
auth_event
);
auth_info
.
realm
=
(
char
*
)
belle_sip_auth_event_get_realm
(
auth_event
);
((
Sal
*
)
sal
)
->
callbacks
.
auth_requested
(
sal
,
&
auth_info
);
belle_sip_auth_event_set_passwd
(
auth_event
,(
const
char
*
)
auth_info
.
password
);
belle_sip_auth_event_set_ha1
(
auth_event
,(
const
char
*
)
auth_info
.
ha1
);
belle_sip_auth_event_set_userid
(
auth_event
,(
const
char
*
)
auth_info
.
userid
);
SalAuthInfo
*
auth_info
=
sal_auth_info_create
(
auth_event
);
((
Sal
*
)
sal
)
->
callbacks
.
auth_requested
(
sal
,
auth_info
);
belle_sip_auth_event_set_passwd
(
auth_event
,(
const
char
*
)
auth_info
->
password
);
belle_sip_auth_event_set_ha1
(
auth_event
,(
const
char
*
)
auth_info
->
ha1
);
belle_sip_auth_event_set_userid
(
auth_event
,(
const
char
*
)
auth_info
->
userid
);
sal_auth_info_delete
(
auth_info
);
return
;
}
...
...
coreapi/bellesip_sal/sal_op_registration.c
View file @
53128dec
...
...
@@ -70,7 +70,7 @@ static void register_refresher_listener ( const belle_sip_refresher_t* refresher
sal_add_pending_auth
(
op
->
base
.
root
,
op
);
if
(
status_code
==
403
)
{
/*in sase of 401 or 407, auth requested already invoked previouly*/
/*auth previouly pending, probably wrong pasword, give a chance to authenticate again*/
op
->
base
.
root
->
callbacks
.
auth_failure
(
op
,
op
->
auth_info
);
op
->
base
.
root
->
callbacks
.
auth_failure
(
op
,
op
->
auth_info
);
/*fixme*/
}
}
}
...
...
coreapi/callbacks.c
View file @
53128dec
...
...
@@ -906,9 +906,9 @@ static void ping_reply(SalOp *op){
static
bool_t
fill_auth_info
(
LinphoneCore
*
lc
,
SalAuthInfo
*
sai
)
{
LinphoneAuthInfo
*
ai
=
(
LinphoneAuthInfo
*
)
linphone_core_find_auth_info
(
lc
,
sai
->
realm
,
sai
->
username
);
if
(
ai
)
{
sai
->
userid
=
ai
->
userid
?
ai
->
userid
:
ai
->
username
;
sai
->
password
=
ai
->
passwd
;
sai
->
ha1
=
ai
->
ha1
;
sai
->
userid
=
ms_strdup
(
ai
->
userid
?
ai
->
userid
:
ai
->
username
)
;
sai
->
password
=
ai
->
passwd
?
ms_strdup
(
ai
->
passwd
)
:
NULL
;
sai
->
ha1
=
ai
->
ha1
?
ms_strdup
(
ai
->
ha1
)
:
NULL
;
ai
->
usecount
++
;
ai
->
last_use_time
=
ms_time
(
NULL
);
return
TRUE
;
...
...
mediastreamer2
@
c898f5af
Subproject commit
3f06cd60f1864b8c811e0f4e4590991802ce5ea7
Subproject commit
c898f5af06498ea9c6848e4342fab65cd4adcc4f
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