Module: sip-router
Branch: tirpi/cfg_framework_multivalue
Commit: 675f88e144fdcbe2f776b58e1f890f470e3d4bdb
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=675f88e…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Wed Sep 29 13:58:07 2010 +0200
cfg framework: apply the values in the order they are set
Add the value change to the end of the list (within the same group_id)
to make sure that the values are changed in the order they are set in the script.
This is important when the same variable is changed multiple times,
the latest value must be kept in this case.
---
cfg/cfg_struct.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cfg/cfg_struct.c b/cfg/cfg_struct.c
index 10d8ef7..358e4eb 100644
--- a/cfg/cfg_struct.c
+++ b/cfg/cfg_struct.c
@@ -948,7 +948,7 @@ int new_add_var(str *group_name, unsigned int group_id, str
*var_name,
/* order the list by group_id, it will be easier to count the group instances */
for( add_var_p = &group->add_var;
- *add_var_p && ((*add_var_p)->group_id < group_id);
+ *add_var_p && ((*add_var_p)->group_id <= group_id);
add_var_p = &((*add_var_p)->next));
add_var->next = *add_var_p;