... | ... |
@@ -5,6 +5,8 @@ $Id$ |
5 | 5 |
- backport tcp conn id fix to stable |
6 | 6 |
- change len_gt into and expr (e.g msg:len). |
7 | 7 |
- sipit: uri == myself doesn't match tls port = 5061 |
8 |
+- sipit: fix check_self & *_alias to work with tcp & tls |
|
9 |
+- sipit: fix ipv6 references in check_self |
|
8 | 10 |
- regex subst on uris? |
9 | 11 |
- port receive.c pre_script_cb fix from stable |
10 | 12 |
- extend alias to include port numbers : |
... | ... |
@@ -395,6 +395,7 @@ struct replace_lst* subst_run(struct subst_expr* se, char* input, |
395 | 395 |
int r; |
396 | 396 |
regmatch_t* pmatch; |
397 | 397 |
int nmatch; |
398 |
+ int eflags; |
|
398 | 399 |
|
399 | 400 |
|
400 | 401 |
/* init */ |
... | ... |
@@ -408,11 +409,14 @@ struct replace_lst* subst_run(struct subst_expr* se, char* input, |
408 | 409 |
LOG(L_ERR, "ERROR: subst_run_ out of mem. (pmatch)\n"); |
409 | 410 |
goto error; |
410 | 411 |
} |
412 |
+ eflags=0; |
|
411 | 413 |
do{ |
412 |
- r=regexec(se->re, p, nmatch, pmatch, 0); |
|
414 |
+ r=regexec(se->re, p, nmatch, pmatch, eflags); |
|
413 | 415 |
DBG("subst_run: running. r=%d\n", r); |
414 | 416 |
/* subst */ |
415 | 417 |
if (r==0){ /* != REG_NOMATCH */ |
418 |
+ /* change eflags, not to match any more at string start */ |
|
419 |
+ eflags|=REG_NOTBOL; |
|
416 | 420 |
*crt=pkg_malloc(sizeof(struct replace_lst)); |
417 | 421 |
if (*crt==0){ |
418 | 422 |
LOG(L_ERR, "ERROR: subst_run: out of mem (crt)\n"); |
... | ... |
@@ -425,6 +429,9 @@ struct replace_lst* subst_run(struct subst_expr* se, char* input, |
425 | 429 |
} |
426 | 430 |
(*crt)->offset=pmatch[0].rm_so+(int)(p-input); |
427 | 431 |
(*crt)->size=pmatch[0].rm_eo-pmatch[0].rm_so; |
432 |
+ DBG("subst_run: matched (%d, %d): [%.*s]\n", |
|
433 |
+ (*crt)->offset, (*crt)->size, |
|
434 |
+ (*crt)->size, input+(*crt)->offset); |
|
428 | 435 |
/* create subst. string */ |
429 | 436 |
/* construct the string from replace[] */ |
430 | 437 |
if (replace_build(p, nmatch, pmatch, se, msg, &((*crt)->rpl))<0){ |