On 3/15/08, Rameshwar Thakurathi <rameshwar at gmail.com> wrote: > > > hi, > I'm trying to send periodic ack to other party, i've successfully created > the pjsip_endpt_create_request but when the program try it send it via > pjsip_endpt_send_request > _stateless, Segmentation fault occurs > > dst_uri is set globally as > > static pj_str_t dst_uri; > > and is assigned to value supplied at command line in the form sip:ip > > dst_uri = pj_str(argv[1]); > > here is rest of the code > > { > > pj_str_t local_uri; > pjsip_tx_data *tdata; > pjsip_method method; > pj_str_t body; > pj_status_t status; > pjsip_method_set(&method, PJSIP_ACK_METHOD); > body = pj_str(""); > > char temp[80]; > > pj_ansi_sprintf(temp, "sip:simpleuac@%s", > pjsip_endpt_name(g_endpt)->ptr); > local_uri = pj_str(temp); > > // Create request and send keep-alive message (statelessly) > status = pjsip_endpt_create_request(g_endpt, > &method, &dst_uri, &local_uri, &dst_uri, &local_uri, &local_uri, 100, &body, > tdata); Isn't this supposed to be "&tdata" instead of just "tdata"? cheers, -benny > if(status == PJ_SUCCESS) > status = pjsip_endpt_send_request_stateless(g_endpt, > tdata, NULL, NULL); > if(status != PJ_SUCCESS) > PJ_LOG(3,(THIS_FILE, "Sending the keep-alive to %s > has failed", new_dst_uri)); > else > PJ_LOG(3,(THIS_FILE, "Successfully sent > keep-alive")); > } > > What could be the problem ? > > can anyone help me with this ? > > -- > rameshwar > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >