- Timestamp:
- Jul 16, 2008 12:31:57 PM (16 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_msg.h
r2039 r2146 789 789 790 790 /** 791 * Find a header in the message by its name and short name version. 792 * 793 * @param msg The message. 794 * @param name The header name to find. 795 * @param sname The short name version of the header name. 796 * @param start The first header field where the search should begin. 797 * If NULL is specified, then the search will begin from the 798 * first header, otherwise the search will begin at the 799 * specified header. 800 * 801 * @return The header field, or NULL if no header with the specified 802 * type is found. 803 */ 804 PJ_DECL(void*) pjsip_msg_find_hdr_by_names(const pjsip_msg *msg, 805 const pj_str_t *name, 806 const pj_str_t *sname, 807 const void *start); 808 809 /** 791 810 * Find and remove a header in the message. 792 811 * -
pjproject/trunk/pjsip/src/pjsip/sip_msg.c
r2039 r2146 362 362 } 363 363 364 PJ_DEF(void*) pjsip_msg_find_hdr_by_names( const pjsip_msg *msg, 365 const pj_str_t *name, 366 const pj_str_t *sname, 367 const void *start) 368 { 369 const pjsip_hdr *hdr=(const pjsip_hdr*)start, *end=&msg->hdr; 370 371 if (hdr == NULL) { 372 hdr = msg->hdr.next; 373 } 374 for (; hdr!=end; hdr = hdr->next) { 375 if (pj_stricmp(&hdr->name, name) == 0) 376 return (void*)hdr; 377 if (pj_stricmp(&hdr->name, sname) == 0) 378 return (void*)hdr; 379 } 380 return NULL; 381 } 382 364 383 PJ_DEF(void*) pjsip_msg_find_remove_hdr( pjsip_msg *msg, 365 384 pjsip_hdr_e hdr_type, void *start)
Note: See TracChangeset
for help on using the changeset viewer.