res_pjsip: Update handling of some options to work with new option names.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-11-27 15:31:05 +00:00
parent 9a2df36dd4
commit 5537def54d
+4 -4
View 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;