Commit 2baa9f20 authored by Simon Morlat's avatar Simon Morlat
Browse files

Prevent sending INFO messages when the dialog isn't established yet.

parent abaa6d5d
......@@ -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_message_set_body_handler(BELLE_SIP_MESSAGE(req), BELLE_SIP_BODY_HANDLER(body_handler));
return sal_op_send_request(op,req);
ms_error("Cannot send INFO message on op [%p] because dialog is not in confirmed state yet.", op);
return -1;
......@@ -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) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment