[asterisk-commits] oej: branch oej/sip-callpickup-1.2 r73669 - in /team/oej/sip-callpickup-1.2: ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 6 06:56:24 CDT 2007
Author: oej
Date: Fri Jul 6 06:56:23 2007
New Revision: 73669
URL: http://svn.digium.com/view/asterisk?view=rev&rev=73669
Log:
Oh, finally found the missing channel. Cool.
Modified:
team/oej/sip-callpickup-1.2/devicestate.c
team/oej/sip-callpickup-1.2/include/asterisk/devicestate.h
team/oej/sip-callpickup-1.2/include/asterisk/pbx.h
team/oej/sip-callpickup-1.2/manager.c
team/oej/sip-callpickup-1.2/pbx.c
Modified: team/oej/sip-callpickup-1.2/devicestate.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-callpickup-1.2/devicestate.c?view=diff&rev=73669&r1=73668&r2=73669
==============================================================================
--- team/oej/sip-callpickup-1.2/devicestate.c (original)
+++ team/oej/sip-callpickup-1.2/devicestate.c Fri Jul 6 06:56:23 2007
@@ -189,10 +189,10 @@
AST_LIST_LOCK(&devstate_cbs);
AST_LIST_TRAVERSE(&devstate_cbs, devcb, list)
- devcb->callback(device, state, devcb->data, channel);
+ devcb->callback(device, state, devcb->data);
AST_LIST_UNLOCK(&devstate_cbs);
- ast_hint_state_changed(device);
+ ast_hint_state_changed(device, channel);
}
static int __ast_device_state_changed_literal(char *buf, const char *channel)
Modified: team/oej/sip-callpickup-1.2/include/asterisk/devicestate.h
URL: http://svn.digium.com/view/asterisk/team/oej/sip-callpickup-1.2/include/asterisk/devicestate.h?view=diff&rev=73669&r1=73668&r2=73669
==============================================================================
--- team/oej/sip-callpickup-1.2/include/asterisk/devicestate.h (original)
+++ team/oej/sip-callpickup-1.2/include/asterisk/devicestate.h Fri Jul 6 06:56:23 2007
@@ -43,7 +43,7 @@
#define AST_DEVICE_RINGING 6
/* The channel name will only be there if this is a channel-related event, like "ringing" */
-typedef int (*ast_devstate_cb_type)(const char *dev, int state, void *data, const char *channelname);
+typedef int (*ast_devstate_cb_type)(const char *dev, int state, void *data);
/*! \brief Convert device state to text string for output
* \param devstate Current device state
Modified: team/oej/sip-callpickup-1.2/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/oej/sip-callpickup-1.2/include/asterisk/pbx.h?view=diff&rev=73669&r1=73668&r2=73669
==============================================================================
--- team/oej/sip-callpickup-1.2/include/asterisk/pbx.h (original)
+++ team/oej/sip-callpickup-1.2/include/asterisk/pbx.h Fri Jul 6 06:56:23 2007
@@ -80,7 +80,7 @@
struct ast_ignorepat;
struct ast_sw;
-typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data);
+typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data, const char *channel);
/*! Data structure associated with a custom function */
struct ast_custom_function {
@@ -659,7 +659,7 @@
*/
void ast_func_write(struct ast_channel *chan, const char *in, const char *value);
-void ast_hint_state_changed(const char *device);
+void ast_hint_state_changed(const char *device, const char *channel);
#if defined(__cplusplus) || defined(c_plusplus)
}
Modified: team/oej/sip-callpickup-1.2/manager.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-callpickup-1.2/manager.c?view=diff&rev=73669&r1=73668&r2=73669
==============================================================================
--- team/oej/sip-callpickup-1.2/manager.c (original)
+++ team/oej/sip-callpickup-1.2/manager.c Fri Jul 6 06:56:23 2007
@@ -1573,7 +1573,7 @@
return 0;
}
-static int manager_state_cb(char *context, char *exten, int state, void *data)
+static int manager_state_cb(char *context, char *exten, int state, void *data, const char *channel)
{
/* Notify managers of change */
manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\n", exten, context, state);
Modified: team/oej/sip-callpickup-1.2/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-callpickup-1.2/pbx.c?view=diff&rev=73669&r1=73668&r2=73669
==============================================================================
--- team/oej/sip-callpickup-1.2/pbx.c (original)
+++ team/oej/sip-callpickup-1.2/pbx.c Fri Jul 6 06:56:23 2007
@@ -1903,7 +1903,7 @@
return ast_extension_state2(e); /* Check all devices in the hint */
}
-void ast_hint_state_changed(const char *device)
+void ast_hint_state_changed(const char *device, const char *channel)
{
struct ast_hint *hint;
struct ast_state_cb *cblist;
@@ -1931,11 +1931,11 @@
/* For general callbacks */
for (cblist = statecbs; cblist; cblist = cblist->next)
- cblist->callback(hint->exten->parent->name, hint->exten->exten, state, cblist->data);
+ cblist->callback(hint->exten->parent->name, hint->exten->exten, state, cblist->data, channel);
/* For extension callbacks */
for (cblist = hint->callbacks; cblist; cblist = cblist->next)
- cblist->callback(hint->exten->parent->name, hint->exten->exten, state, cblist->data);
+ cblist->callback(hint->exten->parent->name, hint->exten->exten, state, cblist->data, channel);
hint->laststate = state;
break;
@@ -2176,7 +2176,7 @@
/* Notify with -1 and remove all callbacks */
cbprev = cblist;
cblist = cblist->next;
- cbprev->callback(list->exten->parent->name, list->exten->exten, AST_EXTENSION_DEACTIVATED, cbprev->data);
+ cbprev->callback(list->exten->parent->name, list->exten->exten, AST_EXTENSION_DEACTIVATED, cbprev->data, NULL);
free(cbprev);
}
list->callbacks = NULL;
@@ -3799,7 +3799,7 @@
while (thiscb) {
prevcb = thiscb;
thiscb = thiscb->next;
- prevcb->callback(this->context, this->exten, AST_EXTENSION_REMOVED, prevcb->data);
+ prevcb->callback(this->context, this->exten, AST_EXTENSION_REMOVED, prevcb->data, NULL);
free(prevcb);
}
} else {
More information about the asterisk-commits
mailing list