Changeset 4641
- Timestamp:
- Nov 4, 2013 9:05:43 AM (11 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/scanner.c
r4537 r4641 384 384 if (*s == end_quote[qpair]) { 385 385 if (*(s-1) == '\\') { 386 if (s-2 == scanner->begin) { 386 char *q = s-2; 387 char *r = s-2; 388 389 while (r != scanner->begin && *r == '\\') { 390 --r; 391 } 392 /* break from main loop if we have odd number of backslashes */ 393 if (((unsigned)(q-r) & 0x01) == 1) { 387 394 break; 388 } else {389 char *q = s-2;390 char *r = s-2;391 392 while (r != scanner->begin && *r == '\\') {393 --r;394 }395 /* break from main loop if we have odd number of backslashes */396 if (((unsigned)(q-r) & 0x01) == 1) {397 break;398 }399 ++s;400 395 } 396 ++s; 401 397 } else { 402 398 /* end_quote is not preceeded by backslash. break now. */ -
pjproject/trunk/pjsip/src/test/uri_test.c
r4537 r4641 84 84 static pjsip_uri *create_uri38( pj_pool_t *pool ); 85 85 static pjsip_uri *create_uri39( pj_pool_t *pool ); 86 static pjsip_uri *create_uri40( pj_pool_t *pool ); 86 87 static pjsip_uri *create_dummy( pj_pool_t *pool ); 87 88 … … 358 359 "\"User\\\\\" <sip:localhost>", 359 360 &create_uri39, 361 }, 362 { 363 /* Quoted display name. */ 364 PJ_SUCCESS, 365 "\"\\\"User\\\"\" <sip:localhost>", 366 &create_uri40, 360 367 } 361 368 … … 778 785 779 786 pj_strdup2(pool, &name_addr->display, "User\\\\"); 787 pj_strdup2(pool, &url->host, "localhost"); 788 return (pjsip_uri*)name_addr; 789 } 790 791 /* "\"\\\"User\\\"\" <sip:localhost>" */ 792 static pjsip_uri *create_uri40(pj_pool_t *pool) 793 { 794 pjsip_name_addr *name_addr = pjsip_name_addr_create(pool); 795 pjsip_sip_uri *url; 796 797 url = pjsip_sip_uri_create(pool, 0); 798 name_addr->uri = (pjsip_uri*) url; 799 800 pj_strdup2(pool, &name_addr->display, "\\\"User\\\""); 780 801 pj_strdup2(pool, &url->host, "localhost"); 781 802 return (pjsip_uri*)name_addr;
Note: See TracChangeset
for help on using the changeset viewer.