THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#9 - modules_s/domain should export is_local API function
User who did this - Juha Heinanen (jh)
Reason for closing: Fixed
Additional comments about closing: Jan included is_domain_local API function to modules_s/domain.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=9
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Hi,
when I try to use a regexp matching for the RURI like this (code is git
master):
if (uri =~ "sip:\+[0-9]+@.*") {
and then send a request with an RURI like this:
sip:+123456789@127.0.0.1
I get the following error message:
2(85781) : <core> [route.c:1190]: BUG: comp_str: Bad operator type 1,
for ~=
and the if statement is obviously not executed?!
Ideas, comments and even more bug fixes are welcome :-)
Regards
Nils
andrei 2009/07/17 18:26:23 CEST
SER CVS Repository
Modified files:
. cfg.y
Log:
core: config parser minor fix
Backport from sip-router, c5e8ac:
- use a pkg_malloc'ed copy of yy_number_str for host_if_id
- always free ID/NUM_ID/host_if_id after copying them (bug
introduced in the last commit).
Revision Changes Path
1.185 +9 -2 sip_router/cfg.y
http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ser/sip_router/cfg.y.diff?r1=1.18…
Module: sip-router
Branch: ser_core_cvs
Commit: c0f12714391fa6b359cceaed22ed238ba5387457
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c0f1271…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Mon Jul 13 15:13:12 2009 +0000
cfg framework: fix the group handles in the main process
(backport from GIT)
The main process does not have a local configuration,
it has access only to the config values that were set before
forking. As a result, the group handles cannot ponint to
the shared memory address because the shared memory block
may be freed later by one of the child processes. This problem
resulted sometimes in a core dump after the processes were killed
when the main process tried to access a variable from shared mem
which was no longer available.
---
cfg/cfg_script.c | 1 -
cfg/cfg_struct.c | 12 +++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/cfg/cfg_script.c b/cfg/cfg_script.c
index 39a4068..8804e40 100644
--- a/cfg/cfg_script.c
+++ b/cfg/cfg_script.c
@@ -143,7 +143,6 @@ error:
/* fix-up the dynamically declared group:
* - allocate memory for the arrays
* - set the values within the memory block
- * - notify the drivers about the new group
*/
int cfg_script_fixup(cfg_group_t *group, unsigned char *block)
{
diff --git a/cfg/cfg_struct.c b/cfg/cfg_struct.c
index fe7d8d6..966443e 100644
--- a/cfg/cfg_struct.c
+++ b/cfg/cfg_struct.c
@@ -194,21 +194,23 @@ int cfg_shmize(void)
/* clone the strings to shm mem */
if (cfg_shmize_strings(group)) goto error;
- /* copy the values to the new block,
- and update the module's handle */
+ /* copy the values to the new block */
memcpy(block->vars+group->offset, group->vars, group->size);
- *(group->handle) = block->vars+group->offset;
} else {
/* The group was declared with NULL values,
* we have to fix it up.
* The fixup function takes care about the values,
* it fills up the block */
if (cfg_script_fixup(group, block->vars+group->offset)) goto error;
- *(group->handle) = block->vars+group->offset;
- /* notify the drivers about the new config definition */
+ /* Notify the drivers about the new config definition.
+ * Temporary set the group handle so that the drivers have a chance to
+ * overwrite the default values. The handle must be reset after this
+ * because the main process does not have a local configuration. */
+ *(group->handle) = block->vars+group->offset;
cfg_notify_drivers(group->name, group->name_len,
group->mapping->def);
+ *(group->handle) = NULL;
}
}
/* try to fixup the selects that failed to be fixed-up previously */