Changeset 5468
- Timestamp:
- Oct 24, 2016 3:22:46 AM (8 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/string.h
r4704 r5468 470 470 PJ_INLINE(char*) pj_strchr( const pj_str_t *str, int chr) 471 471 { 472 if (str->slen == 0) 473 return NULL; 472 474 return (char*) memchr((char*)str->ptr, chr, str->slen); 473 475 } -
pjproject/trunk/pjlib/include/pj/string_i.h
r5229 r5468 121 121 pj_assert(max >= 0); 122 122 if (max > src->slen) max = src->slen; 123 pj_memcpy(dst->ptr, src->ptr, max); 123 if (max > 0) 124 pj_memcpy(dst->ptr, src->ptr, max); 124 125 dst->slen = max; 125 126 return dst; -
pjproject/trunk/pjsip/include/pjsip/print_util.h
r5237 r5468 30 30 do { \ 31 31 if ((str).slen >= (endbuf-buf)) return -1; \ 32 pj_memcpy(buf, (str).ptr, (str).slen); \ 33 buf += (str).slen; \ 32 if ((str).slen) { \ 33 pj_memcpy(buf, (str).ptr, (str).slen); \ 34 buf += (str).slen; \ 35 } \ 34 36 } while (0) 35 37 -
pjproject/trunk/pjsip/src/pjsip/sip_msg.c
r5451 r5468 2014 2014 2015 2015 /* Check if host contains IPv6 */ 2016 if (pj_ memchr(hdr->sent_by.host.ptr, ':', hdr->sent_by.host.slen)) {2016 if (pj_strchr(&hdr->sent_by.host, ':')) { 2017 2017 copy_advance_pair_quote_cond(buf, "", 0, hdr->sent_by.host, '[', ']'); 2018 2018 } else {
Note: See TracChangeset
for help on using the changeset viewer.