[asterisk-commits] mmichelson: branch 1.6.0 r142090 - /branches/1.6.0/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 9 11:26:57 CDT 2008
Author: mmichelson
Date: Tue Sep 9 11:26:56 2008
New Revision: 142090
URL: http://svn.digium.com/view/asterisk?view=rev&rev=142090
Log:
Fix app_queue's device state callback so that it
can correctly parse custom device states (and any
other device which does not contain a '/').
1.6.1 will be getting this patch as well, but trunk
is going to get a much more massive patch by bbryant
which does some very nice overhauling of some
structures in app_queue.
(closes issue #12979)
Reported by: sigxcpu
Patches:
12979.patch uploaded by putnopvut (license 60)
Tested by: sigxcpu
Modified:
branches/1.6.0/apps/app_queue.c
Modified: branches/1.6.0/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_queue.c?view=diff&rev=142090&r1=142089&r2=142090
==============================================================================
--- branches/1.6.0/apps/app_queue.c (original)
+++ branches/1.6.0/apps/app_queue.c Tue Sep 9 11:26:56 2008
@@ -733,16 +733,6 @@
static void *handle_statechange(struct statechange *sc)
{
struct member_interface *curint;
- char *loc;
- char *technology;
-
- technology = ast_strdupa(sc->dev);
- loc = strchr(technology, '/');
- if (loc) {
- *loc++ = '\0';
- } else {
- return NULL;
- }
AST_LIST_LOCK(&interfaces);
AST_LIST_TRAVERSE(&interfaces, curint, list) {
@@ -759,13 +749,11 @@
AST_LIST_UNLOCK(&interfaces);
if (!curint) {
- if (option_debug > 2)
- ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
+ ast_debug(3, "Device '%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", sc->dev, sc->state, devstate2str(sc->state));
return NULL;
}
- if (option_debug)
- ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+ ast_debug(1, "Device '%s' changed to state '%d' (%s)\n", sc->dev, sc->state, devstate2str(sc->state));
update_status(sc->dev, sc->state);
More information about the asterisk-commits
mailing list