[Pkg-voip-commits] r5187 - /asterisk/trunk/debian/patches/bristuff/ast-device-state-CID
paravoid at alioth.debian.org
paravoid at alioth.debian.org
Thu Feb 7 22:48:10 UTC 2008
Author: paravoid
Date: Thu Feb 7 22:48:10 2008
New Revision: 5187
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5187
Log:
Update ast-device-state-CID patch to match '-p ab --no-timestamps --no-index --show-c-function' quilt options
Modified:
asterisk/trunk/debian/patches/bristuff/ast-device-state-CID
Modified: asterisk/trunk/debian/patches/bristuff/ast-device-state-CID
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/ast-device-state-CID?rev=5187&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/ast-device-state-CID (original)
+++ asterisk/trunk/debian/patches/bristuff/ast-device-state-CID Thu Feb 7 22:48:10 2008
@@ -1,8 +1,6 @@
-Index: asterisk-1.4.18~dfsg/include/asterisk/devicestate.h
-===================================================================
---- asterisk-1.4.18~dfsg.orig/include/asterisk/devicestate.h 2007-02-13 22:56:50.000000000 +0200
-+++ asterisk-1.4.18~dfsg/include/asterisk/devicestate.h 2008-02-07 23:25:42.000000000 +0200
-@@ -47,7 +47,7 @@
+--- a/include/asterisk/devicestate.h
++++ b/include/asterisk/devicestate.h
+@@ -47,7 +47,7 @@ extern "C" {
#define AST_DEVICE_ONHOLD 8
/*! \brief Devicestate watcher call back */
@@ -11,7 +9,7 @@
/*! \brief Devicestate provider call back */
typedef int (*ast_devstate_prov_cb_type)(const char *data);
-@@ -92,7 +92,7 @@
+@@ -92,7 +92,7 @@ int ast_device_state_changed(const char
* callbacks for the changed extensions
* Returns 0 on success, -1 on failure
*/
@@ -20,11 +18,9 @@
/*! \brief Registers a device state change callback
* \param callback Callback
-Index: asterisk-1.4.18~dfsg/main/devicestate.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/main/devicestate.c 2008-01-05 04:09:19.000000000 +0200
-+++ asterisk-1.4.18~dfsg/main/devicestate.c 2008-02-08 00:18:48.000000000 +0200
-@@ -78,6 +78,8 @@
+--- a/main/devicestate.c
++++ b/main/devicestate.c
+@@ -78,6 +78,8 @@ static AST_LIST_HEAD_STATIC(devstate_cbs
struct state_change {
AST_LIST_ENTRY(state_change) list;
@@ -33,7 +29,7 @@
char device[1];
};
-@@ -277,7 +279,7 @@
+@@ -277,7 +279,7 @@ void ast_devstate_del(ast_devstate_cb_ty
/*! \brief Notify callback watchers of change, and notify PBX core for hint updates
Normally executed within a separate thread
*/
@@ -42,7 +38,7 @@
{
int state;
struct devstate_cb *devcb;
-@@ -288,13 +290,13 @@
+@@ -288,13 +290,13 @@ static void do_state_change(const char *
AST_LIST_LOCK(&devstate_cbs);
AST_LIST_TRAVERSE(&devstate_cbs, devcb, list)
@@ -59,7 +55,7 @@
{
char *device;
struct state_change *change;
-@@ -308,10 +310,16 @@
+@@ -308,10 +310,16 @@ static int __ast_device_state_changed_li
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 */
@@ -77,7 +73,7 @@
AST_LIST_LOCK(&state_changes);
AST_LIST_INSERT_TAIL(&state_changes, change, list);
if (AST_LIST_FIRST(&state_changes) == change)
-@@ -329,17 +337,23 @@
+@@ -329,17 +337,23 @@ static int __ast_device_state_changed_li
*/
if (!norecurse && (tmp = strrchr(device, '-'))) {
*tmp = '\0';
@@ -104,7 +100,7 @@
}
/*! \brief Accept change notification, add it to change queue */
-@@ -351,7 +365,7 @@
+@@ -351,7 +365,7 @@ int ast_device_state_changed(const char
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
@@ -113,7 +109,7 @@
}
/*! \brief Go through the dev state change queue and update changes in the dev state thread */
-@@ -366,7 +380,7 @@
+@@ -366,7 +380,7 @@ static void *do_devstate_changes(void *d
if (cur) {
/* we got an entry, so unlock the list while we process it */
AST_LIST_UNLOCK(&state_changes);
@@ -122,11 +118,9 @@
free(cur);
AST_LIST_LOCK(&state_changes);
} else {
-Index: asterisk-1.4.18~dfsg/include/asterisk/channel.h
-===================================================================
---- asterisk-1.4.18~dfsg.orig/include/asterisk/channel.h 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/include/asterisk/channel.h 2008-02-08 00:16:10.000000000 +0200
-@@ -593,8 +593,13 @@
+--- a/include/asterisk/channel.h
++++ b/include/asterisk/channel.h
+@@ -593,8 +593,13 @@ int ast_channel_datastore_remove(struct
/*! \brief Find a datastore on a channel */
struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, char *uid);
@@ -141,11 +135,9 @@
/*! \brief Create a channel structure
\return Returns NULL on failure to allocate.
-Index: asterisk-1.4.18~dfsg/main/channel.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/main/channel.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/main/channel.c 2008-02-08 00:16:10.000000000 +0200
-@@ -1255,7 +1255,7 @@
+--- a/main/channel.c
++++ b/main/channel.c
+@@ -1255,7 +1255,7 @@ void ast_channel_free(struct ast_channel
free(chan);
AST_LIST_UNLOCK(&channels);
@@ -154,7 +146,7 @@
}
struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, char *uid)
-@@ -3606,7 +3606,7 @@
+@@ -3606,7 +3606,7 @@ void ast_set_callerid(struct ast_channel
ast_channel_unlock(chan);
}
@@ -163,7 +155,7 @@
{
int oldstate = chan->_state;
-@@ -3614,7 +3614,7 @@
+@@ -3614,7 +3614,7 @@ int ast_setstate(struct ast_channel *cha
return 0;
chan->_state = state;
@@ -172,7 +164,7 @@
/* setstate used to conditionally report Newchannel; this is no more */
manager_event(EVENT_FLAG_CALL,
"Newstate",
-@@ -3631,6 +3631,11 @@
+@@ -3631,6 +3631,11 @@ int ast_setstate(struct ast_channel *cha
return 0;
}
@@ -184,11 +176,9 @@
/*! \brief Find bridged channel */
struct ast_channel *ast_bridged_channel(struct ast_channel *chan)
{
-Index: asterisk-1.4.18~dfsg/include/asterisk/pbx.h
-===================================================================
---- asterisk-1.4.18~dfsg.orig/include/asterisk/pbx.h 2007-12-21 18:37:47.000000000 +0200
-+++ asterisk-1.4.18~dfsg/include/asterisk/pbx.h 2008-02-08 00:16:10.000000000 +0200
-@@ -63,7 +63,7 @@
+--- a/include/asterisk/pbx.h
++++ b/include/asterisk/pbx.h
+@@ -63,7 +63,7 @@ struct ast_ignorepat;
struct ast_sw;
/*! \brief Typedef for devicestate and hint callbacks */
@@ -197,7 +187,7 @@
/*! \brief Data structure associated with a custom dialplan function */
struct ast_custom_function {
-@@ -875,7 +875,7 @@
+@@ -875,7 +875,7 @@ int ast_func_read(struct ast_channel *ch
*/
int ast_func_write(struct ast_channel *chan, char *function, const char *value);
@@ -206,11 +196,9 @@
#if defined(__cplusplus) || defined(c_plusplus)
}
-Index: asterisk-1.4.18~dfsg/main/pbx.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/main/pbx.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/main/pbx.c 2008-02-08 00:16:10.000000000 +0200
-@@ -2011,7 +2011,7 @@
+--- a/main/pbx.c
++++ b/main/pbx.c
+@@ -2011,7 +2011,7 @@ int ast_extension_state(struct ast_chann
return ast_extension_state2(e); /* Check all devices in the hint */
}
@@ -219,7 +207,7 @@
{
struct ast_hint *hint;
-@@ -2042,11 +2042,11 @@
+@@ -2042,11 +2042,11 @@ void ast_hint_state_changed(const char *
/* For general callbacks */
for (cblist = statecbs; cblist; cblist = cblist->next)
@@ -233,7 +221,7 @@
hint->laststate = state; /* record we saw the change */
}
-@@ -2241,7 +2241,7 @@
+@@ -2241,7 +2241,7 @@ static int ast_remove_hint(struct ast_ex
/* Notify with -1 and remove all callbacks */
cbprev = cblist;
cblist = cblist->next;
@@ -242,7 +230,7 @@
free(cbprev);
}
hint->callbacks = NULL;
-@@ -4008,7 +4008,7 @@
+@@ -4008,7 +4008,7 @@ void ast_merge_contexts_and_delete(struc
while (thiscb) {
prevcb = thiscb;
thiscb = thiscb->next;
@@ -251,11 +239,9 @@
free(prevcb);
}
} else {
-Index: asterisk-1.4.18~dfsg/channels/chan_sip.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/channels/chan_sip.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/channels/chan_sip.c 2008-02-07 23:50:49.000000000 +0200
-@@ -1341,7 +1341,7 @@
+--- a/channels/chan_sip.c
++++ b/channels/chan_sip.c
+@@ -1341,7 +1341,7 @@ static void ast_quiet_chan(struct ast_ch
static int attempt_transfer(struct sip_dual *transferer, struct sip_dual *target);
/*--- Device monitoring and Device/extension state handling */
@@ -264,7 +250,7 @@
static int sip_devicestate(void *data);
static int sip_poke_noanswer(const void *data);
static int sip_poke_peer(struct sip_peer *peer);
-@@ -8463,7 +8463,7 @@
+@@ -8463,7 +8463,7 @@ static void sip_peer_hold(struct sip_pvt
/*! \brief Callback for the devicestate notification (SUBSCRIBE) support subsystem
\note If you add an "hint" priority to the extension in the dial plan,
you will get notifications on device state changes */
@@ -273,7 +259,7 @@
{
struct sip_pvt *p = data;
-@@ -12636,7 +12636,7 @@
+@@ -12636,7 +12636,7 @@ static void handle_response(struct sip_p
if (ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE)) {
/* Ready to send the next state we have on queue */
ast_clear_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
@@ -282,11 +268,9 @@
}
}
} else if (sipmethod == SIP_REGISTER)
-Index: asterisk-1.4.18~dfsg/apps/app_queue.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/apps/app_queue.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/apps/app_queue.c 2008-02-07 23:25:42.000000000 +0200
-@@ -697,7 +697,7 @@
+--- a/apps/app_queue.c
++++ b/apps/app_queue.c
+@@ -697,7 +697,7 @@ static void *device_state_thread(void *d
return NULL;
}
/*! \brief Producer of the statechange queue */
@@ -295,10 +279,8 @@
{
struct statechange *sc;
-Index: asterisk-1.4.18~dfsg/include/asterisk/manager.h
-===================================================================
---- asterisk-1.4.18~dfsg.orig/include/asterisk/manager.h 2007-04-06 23:58:43.000000000 +0300
-+++ asterisk-1.4.18~dfsg/include/asterisk/manager.h 2008-02-07 23:25:42.000000000 +0200
+--- a/include/asterisk/manager.h
++++ b/include/asterisk/manager.h
@@ -55,6 +55,7 @@
#define EVENT_FLAG_AGENT (1 << 5) /* Ability to read/set agent info */
#define EVENT_FLAG_USER (1 << 6) /* Ability to read/set user info */
@@ -307,11 +289,9 @@
/* Export manager structures */
#define AST_MAX_MANHEADERS 128
-Index: asterisk-1.4.18~dfsg/main/manager.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/main/manager.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/main/manager.c 2008-02-08 00:16:10.000000000 +0200
-@@ -129,6 +129,7 @@
+--- a/main/manager.c
++++ b/main/manager.c
+@@ -129,6 +129,7 @@ static struct permalias {
{ EVENT_FLAG_AGENT, "agent" },
{ EVENT_FLAG_USER, "user" },
{ EVENT_FLAG_CONFIG, "config" },
@@ -319,7 +299,7 @@
{ -1, "all" },
{ 0, "none" },
};
-@@ -2538,10 +2539,12 @@
+@@ -2538,10 +2539,12 @@ int ast_manager_unregister(char *action)
return 0;
}
@@ -334,11 +314,9 @@
return 0;
}
-Index: asterisk-1.4.18~dfsg/apps/app_devstate.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/apps/app_devstate.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/apps/app_devstate.c 2008-02-07 23:25:42.000000000 +0200
-@@ -50,7 +50,7 @@
+--- a/apps/app_devstate.c
++++ b/apps/app_devstate.c
+@@ -50,7 +50,7 @@ static struct ast_cli_entry cli_dev_sta
static int devstate_cli(int fd, int argc, char *argv[])
{
char devName[128];
@@ -347,7 +325,7 @@
return RESULT_SHOWUSAGE;
if (ast_db_put("DEVSTATES", argv[1], argv[2]))
-@@ -58,7 +58,15 @@
+@@ -58,7 +58,15 @@ static int devstate_cli(int fd, int argc
ast_log(LOG_DEBUG, "ast_db_put failed\n");
}
snprintf(devName, sizeof(devName), "DS/%s", argv[1]);
@@ -364,7 +342,7 @@
return RESULT_SUCCESS;
}
-@@ -93,7 +101,7 @@
+@@ -93,7 +101,7 @@ static int devstate_exec(struct ast_chan
}
snprintf(devName, sizeof(devName), "DS/%s", device);
@@ -373,7 +351,7 @@
ast_module_user_remove(u);
return 0;
-@@ -150,6 +158,8 @@
+@@ -150,6 +158,8 @@ static int action_devstate(struct manses
const char *devstate = astman_get_header(m, "Devstate");
const char *value = astman_get_header(m, "Value");
const char *id = astman_get_header(m,"ActionID");
@@ -382,7 +360,7 @@
char devName[128];
char idText[256] = "";
-@@ -166,7 +176,7 @@
+@@ -166,7 +176,7 @@ static int action_devstate(struct manses
if (!ast_db_put("DEVSTATES", devstate, (char *)value)) {
snprintf(devName, sizeof(devName), "DS/%s", devstate);
@@ -391,11 +369,9 @@
astman_append(s, "Response: Success\r\n%s\r\n", idText);
} else {
ast_log(LOG_DEBUG, "ast_db_put failed\n");
-Index: asterisk-1.4.18~dfsg/res/res_esel.c
-===================================================================
---- asterisk-1.4.18~dfsg.orig/res/res_esel.c 2008-02-07 23:16:59.000000000 +0200
-+++ asterisk-1.4.18~dfsg/res/res_esel.c 2008-02-07 23:25:42.000000000 +0200
-@@ -51,6 +51,8 @@
+--- a/res/res_esel.c
++++ b/res/res_esel.c
+@@ -51,6 +51,8 @@ typedef struct esel_extension_state {
char context[AST_MAX_EXTENSION];
char exten[AST_MAX_EXTENSION];
int state;
@@ -404,7 +380,7 @@
char devstate[AST_MAX_EXTENSION];
struct esel_extension_state *next;
struct esel_extension_state *prev;
-@@ -93,7 +95,7 @@
+@@ -93,7 +95,7 @@ typedef struct esel_pvt {
static struct esel_pvt *donkeys = NULL;
@@ -413,7 +389,7 @@
struct esel_extension_state *exstate = NULL;
exstate = malloc(sizeof(struct esel_extension_state));
-@@ -115,6 +117,8 @@
+@@ -115,6 +117,8 @@ static int esel_queue_extension_state(st
}
ast_copy_string(exstate->exten, exten, sizeof(exstate->exten));
ast_copy_string(exstate->context, context, sizeof(exstate->context));
@@ -422,7 +398,7 @@
exstate->state = state;
if (!queue->head) {
/* Empty queue */
-@@ -161,7 +165,7 @@
+@@ -161,7 +165,7 @@ static void esel_export_to_remote(struct
char msg[1024];
int sent = 0;
memset(msg, 0x0, sizeof(msg));
@@ -431,7 +407,7 @@
sent = send(esel->sockfd, msg, strlen(msg), 0);
if (sent == -1) {
esel->connected = 0;
-@@ -250,13 +254,13 @@
+@@ -250,13 +254,13 @@ static void *do_esel_thread(void *data)
return NULL;
}
More information about the Pkg-voip-commits
mailing list