Commit 87d7b23c authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Prevent printing null strings which causes crashes on QNX platform.

parent 2905c9f3
......@@ -144,10 +144,10 @@ belle_sip_error_code belle_sip_uri_marshal(const belle_sip_uri_t* uri, char* buf
belle_sip_param_pair_t* container = list->data;
if (list == encheaders) {
//first case
error=belle_sip_snprintf(buff,buff_size,offset,"?%s=%s",container->name,container->value);
error=belle_sip_snprintf(buff,buff_size,offset,"?%s=%s",container->name,container->value?container->value:"");
} else {
//subsequent headers
error=belle_sip_snprintf(buff,buff_size,offset,"&%s=%s",container->name,container->value);
error=belle_sip_snprintf(buff,buff_size,offset,"&%s=%s",container->name,container->value?container->value:"");
}
if (error!=BELLE_SIP_OK) break;
}
......
......@@ -460,8 +460,8 @@ belle_sip_dialog_t *belle_sip_dialog_new(belle_sip_transaction_t *t){
belle_sip_message("New %s dialog [%p] , local tag [%s], remote tag [%s]"
,obj->is_server?"server":"client"
,obj
,obj->local_tag
,obj->remote_tag);
,obj->local_tag?obj->local_tag:""
,obj->remote_tag?obj->remote_tag:"");
set_state(obj,BELLE_SIP_DIALOG_NULL);
return obj;
}
......
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