[sr-dev] git:master: cfg framework: add/del_group_inst updates the local config
Miklos Tirpak
miklos at iptel.org
Wed Jan 5 15:13:57 CET 2011
Module: sip-router
Branch: master
Commit: 1dcfdfbd0360a38f4b7e3f9075de6b19d1847cb4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1dcfdfbd0360a38f4b7e3f9075de6b19d1847cb4
Author: Miklos Tirpak <miklos at iptel.org>
Committer: Miklos Tirpak <miklos at iptel.org>
Date: Mon Jan 3 12:22:46 2011 +0100
cfg framework: add/del_group_inst updates the local config
add/del_group_inst() updates the local configuration to
make sure that cfg_set_*() sees the change when it immediately
follows the group intance modification.
---
cfg/cfg_ctx.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cfg/cfg_ctx.c b/cfg/cfg_ctx.c
index d3ea6fe..b23925c 100644
--- a/cfg/cfg_ctx.c
+++ b/cfg/cfg_ctx.c
@@ -1494,6 +1494,11 @@ int cfg_add_group_inst(cfg_ctx_t *ctx, str *group_name, unsigned int group_id)
group_name->len, group_name->s,
group_id);
+ /* Make sure that cfg_set_*() sees the change when
+ * the function is immediately called after the group
+ * instance has been added. */
+ cfg_update();
+
return 0;
error:
CFG_WRITER_UNLOCK();
@@ -1583,6 +1588,11 @@ int cfg_del_group_inst(cfg_ctx_t *ctx, str *group_name, unsigned int group_id)
group_name->len, group_name->s,
group_id);
+ /* Make sure that cfg_set_*() sees the change when
+ * the function is immediately called after the group
+ * instance has been deleted. */
+ cfg_update();
+
return 0;
error:
CFG_WRITER_UNLOCK();
More information about the sr-dev
mailing list