[asterisk-commits] kharwell: branch kharwell/pimp_sip_callgroup r390388 - /team/kharwell/pimp_si...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 3 18:06:57 CDT 2013


Author: kharwell
Date: Mon Jun  3 18:06:56 2013
New Revision: 390388

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390388
Log:
module config handler to use var name

Modified:
    team/kharwell/pimp_sip_callgroup/res/res_sip/sip_configuration.c

Modified: team/kharwell/pimp_sip_callgroup/res/res_sip/sip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_callgroup/res/res_sip/sip_configuration.c?view=diff&rev=390388&r1=390387&r2=390388
==============================================================================
--- team/kharwell/pimp_sip_callgroup/res/res_sip/sip_configuration.c (original)
+++ team/kharwell/pimp_sip_callgroup/res/res_sip/sip_configuration.c Mon Jun  3 18:06:56 2013
@@ -297,7 +297,7 @@
 {
 	struct ast_sip_endpoint *endpoint = obj;
 
-	if (aco_option_get_flags(opt)) {
+	if (!strncmp(var->name, "callgroup", 9)) {
 		endpoint->callgroup = ast_get_group(var->value);
 	} else {
 		endpoint->pickupgroup = ast_get_group(var->value);
@@ -310,7 +310,7 @@
 {
 	struct ast_sip_endpoint *endpoint = obj;
 
-	if (aco_option_get_flags(opt)) {
+	if (!strncmp(var->name, "namedcallgroup", 14)) {
 		endpoint->named_callgroups = ast_get_namedgroups(var->value);
 	} else {
 		endpoint->named_pickupgroups = ast_get_namedgroups(var->value);
@@ -399,9 +399,9 @@
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "use_avpf", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, use_avpf));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "one_touch_recording", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, one_touch_recording));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "inband_progress", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, inband_progress));
-	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "callgroup", "", group_handler, NULL, 1, 0);
+	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "callgroup", "", group_handler, NULL, 0, 0);
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "pickupgroup", "", group_handler, NULL, 0, 0);
-	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedcallgroup", "", named_groups_handler, NULL, 1, 0);
+	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedcallgroup", "", named_groups_handler, NULL, 0, 0);
 	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedpickupgroup", "", named_groups_handler, NULL, 0, 0);
 
 	if (ast_sip_initialize_sorcery_transport(sip_sorcery)) {




More information about the asterisk-commits mailing list