Changeset 2724 for pjproject/trunk/pjsip/src/pjsip/sip_msg.c
- Timestamp:
- May 29, 2009 1:04:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_msg.c
r2394 r2724 457 457 /* Print each of the headers. */ 458 458 for (hdr=msg->hdr.next; hdr!=&msg->hdr; hdr=hdr->next) { 459 len = (*hdr->vptr->print_on)(hdr, p, end-p);460 if (len < 1)459 len = pjsip_hdr_print_on(hdr, p, end-p); 460 if (len < 0) 461 461 return -1; 462 p += len; 463 464 if (p+3 >= end) 465 return -1; 466 467 *p++ = '\r'; 468 *p++ = '\n'; 462 463 if (len > 0) { 464 p += len; 465 if (p+3 >= end) 466 return -1; 467 468 *p++ = '\r'; 469 *p++ = '\n'; 470 } 469 471 } 470 472 … … 1602 1604 char *endbuf = buf + size; 1603 1605 const pjsip_parser_const_t *pc = pjsip_parser_const(); 1606 pjsip_sip_uri *sip_uri; 1607 pjsip_param *p; 1608 1609 /* Check the proprietary param 'hide', don't print this header 1610 * if it exists in the route URI. 1611 */ 1612 sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(hdr->name_addr.uri); 1613 p = sip_uri->other_param.next; 1614 while (p != &sip_uri->other_param) { 1615 const pj_str_t st_hide = {"hide", 4}; 1616 1617 if (pj_stricmp(&p->name, &st_hide) == 0) { 1618 /* Check if param 'hide' is specified without 'lr'. */ 1619 pj_assert(sip_uri->lr_param != 0); 1620 return 0; 1621 } 1622 p = p->next; 1623 } 1624 1604 1625 /* Route and Record-Route don't compact forms */ 1605 1626
Note: See TracChangeset
for help on using the changeset viewer.