[asterisk-commits] file: branch 1.4 r64276 - in /branches/1.4: ./
main/devicestate.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 14 11:36:35 MST 2007
Author: file
Date: Mon May 14 13:36:34 2007
New Revision: 64276
URL: http://svn.digium.com/view/asterisk?view=rev&rev=64276
Log:
Merged revisions 64275 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r64275 | file | 2007-05-14 14:34:06 -0400 (Mon, 14 May 2007) | 2 lines
Only perform stripping of - strings from the channel name for Zap channels. Anywhere else we might remove a legitimate part of a device name. (issue #9668 reported by stevedavies)
........
Modified:
branches/1.4/ (props changed)
branches/1.4/main/devicestate.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/devicestate.c?view=diff&rev=64276&r1=64275&r2=64276
==============================================================================
--- branches/1.4/main/devicestate.c (original)
+++ branches/1.4/main/devicestate.c Mon May 14 13:36:34 2007
@@ -296,18 +296,20 @@
static int __ast_device_state_changed_literal(char *buf)
{
- char *device, *tmp;
+ char *device;
struct state_change *change;
if (option_debug > 2)
ast_log(LOG_DEBUG, "Notification of state change to be queued on device/channel %s\n", buf);
device = buf;
- if ((tmp = strrchr(device, '-')))
- *tmp = '\0';
-
+
+ if (!strncasecmp(device, "Zap", 3)) {
+ char *tmp = strrchr(device, '-');
+ if (tmp)
+ *tmp = '\0';
+ }
-
if (change_thread == AST_PTHREADT_NULL || !(change = ast_calloc(1, sizeof(*change) + strlen(device)))) {
/* we could not allocate a change struct, or */
/* there is no background thread, so process the change now */
More information about the asterisk-commits
mailing list