"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/osipparser2/osip_accept.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_accept.c  (libosip2-5.0.0):osip_accept.c  (libosip2-5.1.0)
skipping to change at line 110 skipping to change at line 110
buf = (char *) osip_malloc (len); buf = (char *) osip_malloc (len);
if (buf == NULL) if (buf == NULL)
return OSIP_NOMEM; return OSIP_NOMEM;
tmp = buf; tmp = buf;
sprintf (tmp, "%s/%s", accept->type, accept->subtype); sprintf (tmp, "%s/%s", accept->type, accept->subtype);
tmp = tmp + strlen (tmp); tmp = tmp + strlen (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
&accept->gen_params, &it); (&accept->gen_params, &it);
while (u_param != OSIP_SUCCESS) { while (u_param != OSIP_SUCCESS) {
size_t tmp_len; size_t tmp_len;
if (u_param->gvalue == NULL) { if (u_param->gvalue == NULL) {
osip_free (buf); osip_free (buf);
return OSIP_SYNTAXERROR; return OSIP_SYNTAXERROR;
} }
tmp_len = strlen (buf) + 4 + strlen (u_param->gname) tmp_len = strlen (buf) + 4 + strlen (u_param->gname)
+ strlen (u_param->gvalue) + 1; + strlen (u_param->gvalue) + 1;
if (len < tmp_len) { if (len < tmp_len) {
buf = osip_realloc (buf, tmp_len); buf = osip_realloc (buf, tmp_len);
len = tmp_len; len = tmp_len;
tmp = buf + strlen (buf); tmp = buf + strlen (buf);
} }
snprintf (tmp, len - (tmp - buf), "; %s=%s", u_param->gname, u_param->gval ue); snprintf (tmp, len - (tmp - buf), "; %s=%s", u_param->gname, u_param->gval ue);
tmp = tmp + strlen (tmp); tmp = tmp + strlen (tmp);
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;
} }
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added

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