void osip_uri_free (osip_uri_t * url) { int pos = 0; if (url == NULL) return; osip_free (url->scheme); osip_free (url->username); osip_free (url->password); osip_free (url->host); osip_free (url->port); osip_uri_param_freelist (&url->url_params); { osip_uri_header_t *u_header; while (!osip_list_eol (&url->url_headers, pos)) { u_header = (osip_uri_header_t *) osip_list_get (&url->url_headers, pos); osip_list_remove (&url->url_headers, pos); osip_uri_header_free (u_header); } } osip_free (url->string); osip_free (url); }
int sip_gateway_find_invite_transaction(osip_message_t* osip_msg) { osip_via_t* via = osip_list_get (&osip_msg->vias, 0); if (NULL != via) { osip_uri_param_t* branch = NULL; osip_via_param_get_byname(via, "branch", &branch); if (NULL != branch) { osip_uri_header_free(branch); } } return RC_ERR; }