"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/test/tcontact.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).

tcontact.c  (libosip2-5.0.0):tcontact.c  (libosip2-5.1.0)
skipping to change at line 63 skipping to change at line 63
if (0 != strncmp (a_contact, "#", 1)) { if (0 != strncmp (a_contact, "#", 1)) {
/* allocate & init contact */ /* allocate & init contact */
osip_contact_init (&contact); osip_contact_init (&contact);
printf ("=================================================\n"); printf ("=================================================\n");
printf ("CONTACT TO PARSE: |%s|\n", a_contact); printf ("CONTACT TO PARSE: |%s|\n", a_contact);
errcode = osip_contact_parse (contact, a_contact); errcode = osip_contact_parse (contact, a_contact);
if (errcode != -1) { if (errcode != -1) {
if (osip_contact_to_str (contact, &dest) != -1) { if (osip_contact_to_str (contact, &dest) != -1) {
printf ("result: |%s|\n", dest); printf ("result: |%s|\n", dest);
{ {
int pos = 0; int pos = 0;
osip_generic_param_t *u_param; osip_generic_param_t *u_param;
while (!osip_list_eol (&contact->gen_params, pos)) {
u_param = (osip_generic_param_t *) osip_list_get (&contact->gen_par
ams, pos);
if (u_param->gvalue == NULL) while (!osip_list_eol (&contact->gen_params, pos)) {
printf ("result: ;%s\n", u_param->gname); u_param = (osip_generic_param_t *) osip_list_get (&contact->gen_pa
else rams, pos);
printf ("result: ;%s=%s\n", u_param->gname, u_param->gvalue
); if (u_param->gvalue == NULL)
pos++; printf ("result: ;%s\n", u_param->gname);
} else
} printf ("result: ;%s=%s\n", u_param->gname, u_param->gvalu
e);
pos++;
}
}
osip_free (dest); osip_free (dest);
} }
} }
else else
printf ("Bad contact format: %s\n", a_contact); printf ("Bad contact format: %s\n", a_contact);
osip_contact_free (contact); osip_contact_free (contact);
printf ("=================================================\n"); printf ("=================================================\n");
} }
res = fgets (a_contact, 500, contacts_file); /* lines are under 200 * / res = fgets (a_contact, 500, contacts_file); /* lines are under 200 * /
 End of changes. 2 change blocks. 
14 lines changed or deleted 15 lines changed or added

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