"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/osipparser2/osip_record_route.c" between
libosip2-5.0.0.tar.gz and libosip2-5.1.0.tar.gz

About: The GNU oSIP library is an implementation of SIP (RFC3261).

osip_record_route.c  (libosip2-5.0.0):osip_record_route.c  (libosip2-5.1.0)
skipping to change at line 126 skipping to change at line 126
if (record_route->displayname != NULL) if (record_route->displayname != NULL)
sprintf (buf, "%s <%s>", record_route->displayname, url); sprintf (buf, "%s <%s>", record_route->displayname, url);
else else
sprintf (buf, "<%s>", url); sprintf (buf, "<%s>", url);
osip_free (url); osip_free (url);
{ {
size_t plen; size_t plen;
char *tmp; char *tmp;
osip_list_iterator_t it; osip_list_iterator_t it;
osip_generic_param_t *u_param = (osip_generic_param_t*) osip_list_get_first( osip_generic_param_t *u_param = (osip_generic_param_t *) osip_list_get_first
&record_route->gen_params, &it); (&record_route->gen_params, &it);
while (u_param != OSIP_SUCCESS) { while (u_param != OSIP_SUCCESS) {
if (u_param->gvalue == NULL) if (u_param->gvalue == NULL)
plen = strlen (u_param->gname) + 2; plen = strlen (u_param->gname) + 2;
else else
plen = strlen (u_param->gname) + strlen (u_param->gvalue) + 3; plen = strlen (u_param->gname) + strlen (u_param->gvalue) + 3;
len = len + plen; len = len + plen;
buf = (char *) osip_realloc (buf, len); buf = (char *) osip_realloc (buf, len);
tmp = buf; tmp = buf;
tmp = tmp + strlen (tmp); tmp = tmp + strlen (tmp);
if (u_param->gvalue == NULL) if (u_param->gvalue == NULL)
snprintf (tmp, len - (tmp - buf), ";%s", u_param->gname); snprintf (tmp, len - (tmp - buf), ";%s", u_param->gname);
else else
snprintf (tmp, len - (tmp - buf), ";%s=%s", u_param->gname, u_param->gva lue); snprintf (tmp, len - (tmp - buf), ";%s=%s", u_param->gname, u_param->gva lue);
u_param = (osip_generic_param_t *) osip_list_get_next(&it); u_param = (osip_generic_param_t *) osip_list_get_next (&it);
} }
} }
*dest = buf; *dest = buf;
return OSIP_SUCCESS; return OSIP_SUCCESS;
} }
/* deallocates a osip_record_route_t structure. */ /* deallocates a osip_record_route_t structure. */
/* INPUT : osip_record_route_t *record_route | record_route header. */ /* INPUT : osip_record_route_t *record_route | record_route header. */
void void
osip_record_route_free (osip_record_route_t * record_route) osip_record_route_free (osip_record_route_t * record_route)
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)