]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Update handling of some options to work with new option names.
authorJoshua Colp <jcolp@digium.com>
Wed, 27 Nov 2013 15:31:43 +0000 (15:31 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 27 Nov 2013 15:31:43 +0000 (15:31 +0000)
Some options (such as call_group and pickup_group) share the same configuration
handler and decide what logic to use based on the name of the option. These
handlers were not updated to check for the new option names and were treating
the options as invalid.

This change simply updates the handlers with the proper names of the options.

(closes issue ASTERISK-22922)
Reported by: Anthony Messina
........

Merged revisions 403173 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403174 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip/pjsip_configuration.c

index 24c53e8a994160ab1a5da7c8d0a4791af7643565..364ed7e19bd1b55c5b470ef0f4621c940a211d8d 100644 (file)
@@ -666,11 +666,11 @@ static int group_handler(const struct aco_option *opt,
 {
        struct ast_sip_endpoint *endpoint = obj;
 
-       if (!strncmp(var->name, "callgroup", 9)) {
+       if (!strncmp(var->name, "call_group", 10)) {
                if (!(endpoint->pickup.callgroup = ast_get_group(var->value))) {
                        return -1;
                }
-       } else if (!strncmp(var->name, "pickupgroup", 11)) {
+       } else if (!strncmp(var->name, "pickup_group", 12)) {
                if (!(endpoint->pickup.pickupgroup = ast_get_group(var->value))) {
                        return -1;
                }
@@ -710,12 +710,12 @@ static int named_groups_handler(const struct aco_option *opt,
 {
        struct ast_sip_endpoint *endpoint = obj;
 
-       if (!strncmp(var->name, "namedcallgroup", 14)) {
+       if (!strncmp(var->name, "named_call_group", 16)) {
                if (!(endpoint->pickup.named_callgroups =
                      ast_get_namedgroups(var->value))) {
                        return -1;
                }
-       } else if (!strncmp(var->name, "namedpickupgroup", 16)) {
+       } else if (!strncmp(var->name, "named_pickup_group", 18)) {
                if (!(endpoint->pickup.named_pickupgroups =
                      ast_get_namedgroups(var->value))) {
                        return -1;