segmentation fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HelloI want to send xml body in a message sip-invite but it return  segmentation fault
this is the code
case 'm':
	    /* Make call! : */	   printf("(You currently have %d calls)\n", 		     pjsua_call_get_count());	    	    uri = NULL;	    ui_input_url("Make call", buf, sizeof(buf), &result);	    if (result.nb_result != NO_NB) {
		if (result.nb_result == -1 || result.nb_result == 0) {		    puts("You can't do that with make call!");		    continue;		} else {		    pjsua_buddy_info binfo;		    pjsua_buddy_get_info(result.nb_result-1, &binfo);		    tmp.ptr = buf;		    pj_strncpy(&tmp, &binfo.uri, sizeof(buf));		}
	    } else if (result.uri_result) {		tmp = pj_str(result.uri_result);	    } else {		tmp.slen = 0;	    }                   char body[40000];                const pj_str_t SIP_INFO = pj_str("INVITE");		pj_status_t status;                pjsua_msg_data msg_data;	        pjsua_msg_data_init(&msg_data);		msg_data.content_type = pj_str("application/xml");	        pjsua_call_make_call( current_acc, &tmp, 0, NULL,&msg_data , NULL);                pj_ansi_snprintf(body, sizeof(body),			         "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"				 "<LaBri:user_profile xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"; \r\n"				 "xmlns:LaBri=\"http://www.labri.fr/\"; xsi:schemaLocation=\"http://www.labri.fr/ uaprofschema.xsd\">\r\n"				 "<!-- edited with XMLSpy v2009 (http://www.altova.com) by ait chellouche (prive) -->\r\n"				 "<user id=\" 1\">\r\n "
			, app_config.acc_cfg[current_acc].cred_info[app_config.acc_cfg[current_acc].cred_count].username				 );		msg_data.msg_body = pj_str(body);                printf(stderr, "TOTO : \n %s \n",msg_data.msg_body.ptr);		status = pjsua_call_send_request(current_call, &SIP_INFO, 						 &msg_data);		
	    break;
thank you
 		 	   		  
_________________________________________________________________
Hotmail : un service de messagerie gratuit, fiable et complet
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100628/39d261cf/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux