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
2baa9f20
Commit
2baa9f20
authored
Mar 14, 2017
by
Simon Morlat
Browse files
Prevent sending INFO messages when the dialog isn't established yet.
parent
abaa6d5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
coreapi/bellesip_sal/sal_op_info.c
View file @
2baa9f20
...
...
@@ -20,12 +20,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
int
sal_send_info
(
SalOp
*
op
,
const
char
*
from
,
const
char
*
to
,
const
SalBodyHandler
*
body_handler
){
if
(
op
->
dialog
){
if
(
op
->
dialog
&&
belle_sip_dialog_get_state
(
op
->
dialog
)
==
BELLE_SIP_DIALOG_CONFIRMED
){
belle_sip_request_t
*
req
;
belle_sip_dialog_enable_pending_trans_checking
(
op
->
dialog
,
op
->
base
.
root
->
pending_trans_checking
);
req
=
belle_sip_dialog_create_queued_request
(
op
->
dialog
,
"INFO"
);
belle_sip_message_set_body_handler
(
BELLE_SIP_MESSAGE
(
req
),
BELLE_SIP_BODY_HANDLER
(
body_handler
));
return
sal_op_send_request
(
op
,
req
);
}
else
{
ms_error
(
"Cannot send INFO message on op [%p] because dialog is not in confirmed state yet."
,
op
);
}
return
-
1
;
}
...
...
coreapi/friendlist.c
View file @
2baa9f20
...
...
@@ -140,7 +140,7 @@ static char * create_resource_list_xml(const LinphoneFriendList *list) {
xmlTextWriterPtr
writer
;
int
err
;
if
(
bctbx_list_size
(
list
->
friends
)
<=
0
)
return
NULL
;
if
(
list
->
friends
==
NULL
)
return
NULL
;
buf
=
xmlBufferCreate
();
if
(
buf
==
NULL
)
{
...
...
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