Changeset 2702
- Timestamp:
- May 17, 2009 3:48:53 PM (15 years ago)
- Location:
- pjproject/branches/projects/sipit24
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/sipit24/pjsip-apps/src/samples/siprtp_report.c
r2394 r2702 78 78 /* Call identification */ 79 79 len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo)); 80 if (len < 1)80 if (len < 0) 81 81 pj_ansi_strcpy(userinfo, "<--uri too long-->"); 82 82 else -
pjproject/branches/projects/sipit24/pjsip/src/pjsip/sip_msg.c
r2394 r2702 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 -
pjproject/branches/projects/sipit24/pjsip/src/pjsip/sip_ua_layer.c
r2394 r2702 908 908 909 909 len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo)); 910 if (len < 1)910 if (len < 0) 911 911 pj_ansi_strcpy(userinfo, "<--uri too long-->"); 912 912 else -
pjproject/branches/projects/sipit24/pjsip/src/pjsua-lib/pjsua_call.c
r2695 r2702 2695 2695 2696 2696 len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo)); 2697 if (len < 1)2697 if (len < 0) 2698 2698 pj_ansi_strcpy(userinfo, "<--uri too long-->"); 2699 2699 else -
pjproject/branches/projects/sipit24/pjsip/src/test/msg_test.c
r2695 r2702 366 366 367 367 while (hdr1 != &parsed_msg->hdr && hdr2 != &ref_msg->hdr) { 368 len = hdr1->vptr->print_on(hdr1, str1.ptr, BUFLEN);369 if (len < 1) {368 len = pjsip_hdr_print_on(hdr1, str1.ptr, BUFLEN); 369 if (len < 0) { 370 370 status = -40; 371 371 goto on_return; … … 374 374 str1.slen = len; 375 375 376 len = hdr2->vptr->print_on(hdr2, str2.ptr, BUFLEN);377 if (len < 1) {376 len = pjsip_hdr_print_on(hdr2, str2.ptr, BUFLEN); 377 if (len < 0) { 378 378 status = -50; 379 379 goto on_return; … … 1945 1945 output = (char*) pj_pool_alloc(pool, 1024); 1946 1946 len = pjsip_hdr_print_on(parsed_hdr1, output, 1024); 1947 if (len < 1|| len >= 1024) {1947 if (len < 0 || len >= 1024) { 1948 1948 PJ_LOG(3,(THIS_FILE, " header too long: %s: %s", test->hname, test->hcontent)); 1949 1949 return -530;
Note: See TracChangeset
for help on using the changeset viewer.