aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-21 00:35:44 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-21 00:35:44 +0000
commitd8f145caaaddd6ea1d4069f11567a643889072bb (patch)
tree5f3af1d3031735c9175ee9f5b387dca6ab20977d
parenta9bd51a345f3067af074b42a8574a337d72ea8c5 (diff)
Merged revisions 169611 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r169611 | mmichelson | 2009-01-20 18:33:32 -0600 (Tue, 20 Jan 2009) | 22 lines Fix device state parsing issues for channel names with multiple slashes The fix being applied is a bit different for trunk and the 1.6.X branches. For trunk, we only wish to strip off the characters beyond the second slash if the channel is a Local channel (i.e. we are removing the /n from the device name). Other channel technologies with multiple slashes (e.g. DAHDI) need the information after the second slash in order to get the proper device state information. In addition to this fix, the 1.6.X branches are receiving a much more important fix as well. The problem in 1.6.X is that the member's device name was being directly changed instead of having a copy changed. This meant that we would strip off the second slash and trailing characters and then leave the member's device name like that permanently thereafter. (closes issue #14014) Reported by: kebl0155 Patches: 14014_number2.patch uploaded by putnopvut (license 60) Tested by: kebl0155 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@169613 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 6675e2450..4bb1538eb 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -726,8 +726,8 @@ static int update_status(const char *interface, const int status)
char *tmp_interface;
char *slash_pos;
tmp_interface = ast_strdupa(cur->state_interface);
- if ((slash_pos = strchr(interface, '/')))
- if ((slash_pos = strchr(slash_pos + 1, '/')))
+ if ((slash_pos = strchr(tmp_interface, '/')))
+ if (!strncasecmp(tmp_interface, "Local", 5) && (slash_pos = strchr(slash_pos + 1, '/')))
*slash_pos = '\0';
if (strcasecmp(interface, tmp_interface)) {