[Pkg-voip-commits] r10071 - in /asterisk/trunk/debian/patches: AST-2012-014 AST-2012-015 fix-sip-tcp-no-FILE fix-sip-tls-leak series

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Tue Jan 8 00:33:35 UTC 2013


Author: tzafrir
Date: Tue Jan  8 00:33:34 2013
New Revision: 10071

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10071
Log:
Recreate patches. Fix a patch name.

Modified:
    asterisk/trunk/debian/patches/AST-2012-014
    asterisk/trunk/debian/patches/AST-2012-015
    asterisk/trunk/debian/patches/fix-sip-tcp-no-FILE
    asterisk/trunk/debian/patches/fix-sip-tls-leak
    asterisk/trunk/debian/patches/series

Modified: asterisk/trunk/debian/patches/AST-2012-014
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/AST-2012-014?rev=10071&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/AST-2012-014 (original)
+++ asterisk/trunk/debian/patches/AST-2012-014 Tue Jan  8 00:33:34 2013
@@ -33,11 +33,9 @@
  res/res_jabber.c           |    5 ++--
  4 files changed, 60 insertions(+), 24 deletions(-)
 
-diff --git a/channels/chan_sip.c b/channels/chan_sip.c
-index 18a0f7c..7e51ed5 100644
 --- a/channels/chan_sip.c
 +++ b/channels/chan_sip.c
-@@ -2524,19 +2524,20 @@ static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, str
+@@ -2520,19 +2520,20 @@ static int sip_tls_read(struct sip_reque
  			int authenticated, time_t start, struct sip_threadinfo *me)
  {
  	int res, content_length, after_poll = 1, need_poll = 1;
@@ -65,7 +63,7 @@
  				return -1;
  			}
  		} else {
-@@ -2551,11 +2552,11 @@ static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, str
+@@ -2547,11 +2548,11 @@ static int sip_tls_read(struct sip_reque
  			after_poll = 1;
  			res = ast_wait_for_input(tcptls_session->fd, timeout);
  			if (res < 0) {
@@ -79,7 +77,7 @@
  				return -1;
  			}
  		}
-@@ -2576,6 +2577,13 @@ static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, str
+@@ -2572,6 +2573,13 @@ static int sip_tls_read(struct sip_reque
  			return -1;
  		}
  		ast_str_append(&req->data, 0, "%s", buf);
@@ -93,7 +91,7 @@
  	}
  	copy_request(reqcpy, req);
  	parse_request(reqcpy);
-@@ -2589,7 +2597,7 @@ static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, str
+@@ -2585,7 +2593,7 @@ static int sip_tls_read(struct sip_reque
  				}
  
  				if (timeout == 0) {
@@ -102,7 +100,7 @@
  					return -1;
  				}
  			} else {
-@@ -2601,11 +2609,11 @@ static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, str
+@@ -2597,11 +2605,11 @@ static int sip_tls_read(struct sip_reque
  				after_poll = 1;
  				res = ast_wait_for_input(tcptls_session->fd, timeout);
  				if (res < 0) {
@@ -116,7 +114,7 @@
  					return -1;
  				}
  			}
-@@ -2628,6 +2636,13 @@ static int sip_tls_read(struct sip_request *req, struct sip_request *reqcpy, str
+@@ -2624,6 +2632,13 @@ static int sip_tls_read(struct sip_reque
  			}
  			content_length -= strlen(buf);
  			ast_str_append(&req->data, 0, "%s", buf);
@@ -130,7 +128,7 @@
  		}
  	}
  	/*! \todo XXX If there's no Content-Length or if the content-length and what
-@@ -2801,6 +2816,8 @@ static int sip_tcp_read(struct sip_request *req, struct ast_tcptls_session_insta
+@@ -2801,6 +2816,8 @@ static int sip_tcp_read(struct sip_reque
  	enum message_integrity message_integrity = MESSAGE_FRAGMENT;
  
  	while (message_integrity == MESSAGE_FRAGMENT) {
@@ -139,7 +137,7 @@
  		if (ast_str_strlen(tcptls_session->overflow_buf) == 0) {
  			char readbuf[4097];
  			int timeout;
-@@ -2840,6 +2857,13 @@ static int sip_tcp_read(struct sip_request *req, struct ast_tcptls_session_insta
+@@ -2840,6 +2857,13 @@ static int sip_tcp_read(struct sip_reque
  			ast_str_append(&req->data, 0, "%s", ast_str_buffer(tcptls_session->overflow_buf));
  			ast_str_reset(tcptls_session->overflow_buf);
  		}
@@ -153,7 +151,7 @@
  
  		message_integrity = check_message_integrity(&req->data, &tcptls_session->overflow_buf);
  	}
-@@ -2911,7 +2935,7 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -2911,7 +2935,7 @@ static void *_sip_tcp_helper_thread(stru
  	}
  
  	me->threadid = pthread_self();
@@ -162,7 +160,7 @@
  
  	/* set up pollfd to watch for reads on both the socket and the alert_pipe */
  	fds[0].fd = tcptls_session->fd;
-@@ -2945,7 +2969,7 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -2945,7 +2969,7 @@ static void *_sip_tcp_helper_thread(stru
  			}
  
  			if (timeout == 0) {
@@ -171,7 +169,7 @@
  				goto cleanup;
  			}
  		} else {
-@@ -2955,11 +2979,11 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -2955,11 +2979,11 @@ static void *_sip_tcp_helper_thread(stru
  		if (ast_str_strlen(tcptls_session->overflow_buf) == 0) {
  			res = ast_poll(fds, 2, timeout); /* polls for both socket and alert_pipe */
  			if (res < 0) {
@@ -185,7 +183,7 @@
  				goto cleanup;
  			}
  		}
-@@ -3041,7 +3065,7 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -3041,7 +3065,7 @@ static void *_sip_tcp_helper_thread(stru
  		}
  	}
  
@@ -194,8 +192,6 @@
  
  cleanup:
  	if (tcptls_session && !tcptls_session->client && !authenticated) {
-diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
-index bb1588d..6040daa 100644
 --- a/channels/sip/include/sip.h
 +++ b/channels/sip/include/sip.h
 @@ -96,6 +96,7 @@
@@ -206,11 +202,9 @@
  #define SIP_MIN_PACKET            4096   /*!< Initialize size of memory to allocate for packets */
  #define MAX_HISTORY_ENTRIES		  50	 /*!< Max entires in the history list for a sip_pvt */
  
-diff --git a/main/http.c b/main/http.c
-index a6c908d..991260f 100644
 --- a/main/http.c
 +++ b/main/http.c
-@@ -622,6 +622,7 @@ struct ast_variable *ast_http_get_post_vars(
+@@ -622,6 +622,7 @@ struct ast_variable *ast_http_get_post_v
  	int content_length = 0;
  	struct ast_variable *v, *post_vars=NULL, *prev = NULL;
  	char *buf, *var, *val;
@@ -218,7 +212,7 @@
  
  	for (v = headers; v; v = v->next) {
  		if (!strcasecmp(v->name, "Content-Type")) {
-@@ -634,22 +635,28 @@ struct ast_variable *ast_http_get_post_vars(
+@@ -634,21 +635,27 @@ struct ast_variable *ast_http_get_post_v
  
  	for (v = headers; v; v = v->next) {
  		if (!strcasecmp(v->name, "Content-Length")) {
@@ -234,26 +228,24 @@
  	}
  
 -	if (!(buf = alloca(content_length))) {
--		return NULL;
--	}
--	if (!fgets(buf, content_length, ser->f)) {
 +	buf = ast_malloc(content_length + 1);
 +	if (!buf) {
  		return NULL;
  	}
- 
+-	if (!fgets(buf, content_length, ser->f)) {
+-		return NULL;
++
 +	res = fread(buf, 1, content_length, ser->f);
 +	if (res < content_length) {
 +		/* Error, distinguishable by ferror() or feof(), but neither
 +		 * is good. */
 +		goto done;
-+	}
+ 	}
 +	buf[content_length] = '\0';
-+
+ 
  	while ((val = strsep(&buf, "&"))) {
  		var = strsep(&val, "=");
- 		if (val) {
-@@ -665,6 +674,9 @@ struct ast_variable *ast_http_get_post_vars(
+@@ -667,6 +674,9 @@ struct ast_variable *ast_http_get_post_v
  			prev = v;
  		}
  	}
@@ -263,11 +255,9 @@
  	return post_vars;
  }
  
-diff --git a/res/res_jabber.c b/res/res_jabber.c
-index 7d4eb66..290cedc 100644
 --- a/res/res_jabber.c
 +++ b/res/res_jabber.c
-@@ -766,7 +766,7 @@ static struct ast_custom_function jabberstatus_function = {
+@@ -768,7 +768,7 @@ static struct ast_custom_function jabber
   */
  static int acf_jabberreceive_read(struct ast_channel *chan, const char *name, char *data, char *buf, size_t buflen)
  {
@@ -276,7 +266,7 @@
  	int timeout;
  	int jidlen, resourcelen;
  	struct timeval start;
-@@ -883,7 +883,7 @@ static int acf_jabberreceive_read(struct ast_channel *chan, const char *name, ch
+@@ -885,7 +885,7 @@ static int acf_jabberreceive_read(struct
  				continue;
  			}
  			found = 1;
@@ -285,7 +275,7 @@
  			AST_LIST_REMOVE_CURRENT(list);
  			aji_message_destroy(tmp);
  			break;
-@@ -908,7 +908,6 @@ static int acf_jabberreceive_read(struct ast_channel *chan, const char *name, ch
+@@ -910,7 +910,6 @@ static int acf_jabberreceive_read(struct
  		ast_log(LOG_NOTICE, "Timed out : no message received from %s\n", args.jid);
  		return -1;
  	}
@@ -293,6 +283,3 @@
  
  	return 0;
  }
--- 
-1.7.10.4
-

Modified: asterisk/trunk/debian/patches/AST-2012-015
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/AST-2012-015?rev=10071&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/AST-2012-015 (original)
+++ asterisk/trunk/debian/patches/AST-2012-015 Tue Jan  8 00:33:34 2013
@@ -46,11 +46,9 @@
  res/res_jabber.c               |   61 ++++++++++++++++++++++++++++++----------
  18 files changed, 177 insertions(+), 94 deletions(-)
 
-diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
-index 18cfb74..a4eea43 100644
 --- a/apps/app_confbridge.c
 +++ b/apps/app_confbridge.c
-@@ -486,7 +486,7 @@ static struct conference_bridge *join_conference_bridge(const char *name, struct
+@@ -486,7 +486,7 @@ static struct conference_bridge *join_co
  
  	/* Set the device state for this conference */
  	if (conference_bridge->users == 1) {
@@ -59,7 +57,7 @@
  	}
  
  	/* If the caller is a marked user or is waiting for a marked user to enter pass 'em off, otherwise pass them off to do regular joining stuff */
-@@ -568,7 +568,7 @@ static void  leave_conference_bridge(struct conference_bridge *conference_bridge
+@@ -568,7 +568,7 @@ static void  leave_conference_bridge(str
  		}
  	} else {
  		/* Set device state to "not in use" */
@@ -68,11 +66,9 @@
  
  		ao2_unlink(conference_bridges, conference_bridge);
  	}
-diff --git a/apps/app_meetme.c b/apps/app_meetme.c
-index 64e7883..1f2286e 100644
 --- a/apps/app_meetme.c
 +++ b/apps/app_meetme.c
-@@ -2576,7 +2576,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
+@@ -2489,7 +2489,7 @@ static int conf_run(struct ast_channel *
  
  	/* This device changed state now - if this is the first user */
  	if (conf->users == 1)
@@ -81,7 +77,7 @@
  
  	ast_mutex_unlock(&conf->playlock);
  
-@@ -3884,7 +3884,7 @@ bailoutandtrynormal:
+@@ -3783,7 +3783,7 @@ bailoutandtrynormal:
  
  		/* Change any states */
  		if (!conf->users) {
@@ -90,7 +86,7 @@
  		}
  
  		/* Return the number of seconds the user was in the conf */
-@@ -5303,8 +5303,8 @@ static void sla_change_trunk_state(const struct sla_trunk *trunk, enum sla_trunk
+@@ -5199,8 +5199,8 @@ static void sla_change_trunk_state(const
  				|| trunk_ref == exclude)
  				continue;
  			trunk_ref->state = state;
@@ -101,7 +97,7 @@
  			break;
  		}
  	}
-@@ -5802,8 +5802,8 @@ static void sla_handle_hold_event(struct sla_event *event)
+@@ -5698,8 +5698,8 @@ static void sla_handle_hold_event(struct
  {
  	ast_atomic_fetchadd_int((int *) &event->trunk_ref->trunk->hold_stations, 1);
  	event->trunk_ref->state = SLA_TRUNK_STATE_ONHOLD_BYME;
@@ -112,7 +108,7 @@
  	sla_change_trunk_state(event->trunk_ref->trunk, SLA_TRUNK_STATE_ONHOLD, 
  		INACTIVE_TRUNK_REFS, event->trunk_ref);
  
-@@ -6312,8 +6312,8 @@ static int sla_station_exec(struct ast_channel *chan, const char *data)
+@@ -6208,8 +6208,8 @@ static int sla_station_exec(struct ast_c
  			sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);
  		else {
  			trunk_ref->state = SLA_TRUNK_STATE_UP;
@@ -123,11 +119,9 @@
  		}
  	} else if (trunk_ref->state == SLA_TRUNK_STATE_RINGING) {
  		struct sla_ringing_trunk *ringing_trunk;
-diff --git a/channels/chan_agent.c b/channels/chan_agent.c
-index 06c64b2..92aa796 100644
 --- a/channels/chan_agent.c
 +++ b/channels/chan_agent.c
-@@ -618,7 +618,7 @@ static struct ast_frame *agent_read(struct ast_channel *ast)
+@@ -611,7 +611,7 @@ static struct ast_frame *agent_read(stru
  		if (p->chan) {
  			p->chan->_bridge = NULL;
  			p->chan = NULL;
@@ -136,7 +130,7 @@
  			p->acknowledged = 0;
  		}
  	} else {
-@@ -875,7 +875,7 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
+@@ -866,7 +866,7 @@ static int agent_call(struct ast_channel
  	} else {
  		/* Agent hung-up */
  		p->chan = NULL;
@@ -145,7 +139,7 @@
  	}
  
  	if (!res) {
-@@ -994,7 +994,7 @@ static int agent_hangup(struct ast_channel *ast)
+@@ -985,7 +985,7 @@ static int agent_hangup(struct ast_chann
  	if (!p->loginstart) {
  		p->logincallerid[0] = '\0';
  	} else {
@@ -154,7 +148,7 @@
  	}
  
  	if (p->abouttograb) {
-@@ -2138,7 +2138,7 @@ static int login_exec(struct ast_channel *chan, const char *data)
+@@ -2128,7 +2128,7 @@ static int login_exec(struct ast_channel
  						}
  						ast_mutex_unlock(&p->lock);
  						AST_LIST_UNLOCK(&agents);
@@ -163,7 +157,7 @@
  						while (res >= 0) {
  							ast_mutex_lock(&p->lock);
  							if (p->deferlogoff && p->chan) {
-@@ -2159,7 +2159,7 @@ static int login_exec(struct ast_channel *chan, const char *data)
+@@ -2149,7 +2149,7 @@ static int login_exec(struct ast_channel
  								if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > 0) {
  									ast_debug(1, "Wrapup time for %s expired!\n", p->agent);
  									p->lastdisc = ast_tv(0, 0);
@@ -172,7 +166,7 @@
  									if (p->ackcall) {
  										check_beep(p, 0);
  									} else {
-@@ -2219,7 +2219,7 @@ static int login_exec(struct ast_channel *chan, const char *data)
+@@ -2209,7 +2209,7 @@ static int login_exec(struct ast_channel
  						ast_queue_log("NONE", chan->uniqueid, agent, "AGENTLOGOFF", "%s|%ld", chan->name, logintime);
  						ast_verb(2, "Agent '%s' logged out\n", p->agent);
  						/* If there is no owner, go ahead and kill it now */
@@ -181,11 +175,9 @@
  						if (p->dead && !p->owner) {
  							ast_mutex_destroy(&p->lock);
  							ast_cond_destroy(&p->app_complete_cond);
-diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
-index ccd8f3b..a95a8ce 100644
 --- a/channels/chan_dahdi.c
 +++ b/channels/chan_dahdi.c
-@@ -3364,7 +3364,7 @@ static void dahdi_pri_update_span_devstate(struct sig_pri_span *pri)
+@@ -3312,7 +3312,7 @@ static void dahdi_pri_update_span_devsta
  	}
  	if (pri->congestion_devstate != new_state) {
  		pri->congestion_devstate = new_state;
@@ -194,7 +186,7 @@
  	}
  #if defined(THRESHOLD_DEVSTATE_PLACEHOLDER)
  	/* Update the span threshold device state and report any change. */
-@@ -3380,7 +3380,7 @@ static void dahdi_pri_update_span_devstate(struct sig_pri_span *pri)
+@@ -3328,7 +3328,7 @@ static void dahdi_pri_update_span_devsta
  	}
  	if (pri->threshold_devstate != new_state) {
  		pri->threshold_devstate = new_state;
@@ -203,7 +195,7 @@
  	}
  #endif	/* defined(THRESHOLD_DEVSTATE_PLACEHOLDER) */
  }
-@@ -9804,7 +9804,8 @@ static struct ast_channel *dahdi_new(struct dahdi_pvt *i, int state, int startpb
+@@ -9757,7 +9757,8 @@ static struct ast_channel *dahdi_new(str
  	if (dashptr) {
  		*dashptr = '\0';
  	}
@@ -213,11 +205,9 @@
  
  	for (v = i->vars ; v ; v = v->next)
  		pbx_builtin_setvar_helper(tmp, v->name, v->value);
-diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
-index d7eeb24..7a17c26 100644
 --- a/channels/chan_iax2.c
 +++ b/channels/chan_iax2.c
-@@ -5729,7 +5729,7 @@ static int iax2_getpeertrunk(struct sockaddr_in sin)
+@@ -5728,7 +5728,7 @@ static int iax2_getpeertrunk(struct sock
  }
  
  /*! \brief  Create new call, interface with the PBX core */
@@ -226,7 +216,7 @@
  {
  	struct ast_channel *tmp;
  	struct chan_iax2_pvt *i;
-@@ -5798,6 +5798,10 @@ static struct ast_channel *ast_iax2_new(int callno, int state, format_t capabili
+@@ -5797,6 +5797,10 @@ static struct ast_channel *ast_iax2_new(
  	i->owner = tmp;
  	i->capability = capability;
  
@@ -237,7 +227,7 @@
  	/* Set inherited variables */
  	if (i->vars) {
  		for (v = i->vars ; v ; v = v->next)
-@@ -8084,7 +8088,7 @@ static int register_verify(int callno, struct sockaddr_in *sin, struct iax_ies *
+@@ -8085,7 +8089,7 @@ static int register_verify(int callno, s
  		/* if challenge has been sent, but no challenge response if given, reject. */
  		goto return_unref;
  	}
@@ -246,7 +236,7 @@
  
  	/* either Authentication has taken place, or a REGAUTH must be sent before verifying registration */
  	res = 0;
-@@ -8638,7 +8642,7 @@ static void __expire_registry(const void *data)
+@@ -8639,7 +8643,7 @@ static void __expire_registry(const void
  	if (!ast_test_flag64(peer, IAX_TEMPONLY))
  		ast_db_del("IAX/Registry", peer->name);
  	register_peer_exten(peer, 0);
@@ -255,7 +245,7 @@
  	if (iax2_regfunk)
  		iax2_regfunk(peer->name, 0);
  
-@@ -8693,7 +8697,7 @@ static void reg_source_db(struct iax2_peer *p)
+@@ -8693,7 +8697,7 @@ static void reg_source_db(struct iax2_pe
  		}
  	}
  
@@ -264,7 +254,7 @@
  
  	p->expire = iax2_sched_add(sched, (p->expiry + 10) * 1000, expire_registry, peer_ref(p));
  	if (p->expire == -1) {
-@@ -8770,14 +8774,14 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i
+@@ -8770,14 +8774,14 @@ static int update_registry(struct sockad
  					    ast_test_flag(&iaxs[callno]->state, IAX_STATE_AUTHENTICATED) ? "AUTHENTICATED" : "UNAUTHENTICATED", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
  			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Registered\r\n", p->name);
  			register_peer_exten(p, 1);
@@ -281,7 +271,7 @@
  		}
  		/* Update the host */
  		/* Verify that the host is really there */
-@@ -10291,7 +10295,8 @@ static int socket_process(struct iax2_thread *thread)
+@@ -10278,7 +10282,8 @@ static int socket_process(struct iax2_th
  		    (f.frametype == AST_FRAME_IAX)) {
  			if (ast_test_flag64(iaxs[fr->callno], IAX_DELAYPBXSTART)) {
  				ast_clear_flag64(iaxs[fr->callno], IAX_DELAYPBXSTART);
@@ -291,7 +281,7 @@
  					ast_variables_destroy(ies.vars);
  					ast_mutex_unlock(&iaxsl[fr->callno]);
  					return 1;
-@@ -10924,13 +10929,13 @@ static int socket_process(struct iax2_thread *thread)
+@@ -10911,13 +10916,13 @@ static int socket_process(struct iax2_th
  						if (iaxs[fr->callno]->pingtime <= peer->maxms) {
  							ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE! Time: %d\n", peer->name, iaxs[fr->callno]->pingtime);
  							manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Reachable\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime); 
@@ -307,7 +297,7 @@
  						}
  					}
  					peer->lastms = iaxs[fr->callno]->pingtime;
-@@ -11172,7 +11177,7 @@ static int socket_process(struct iax2_thread *thread)
+@@ -11159,7 +11164,7 @@ static int socket_process(struct iax2_th
  											using_prefs);
  
  							ast_set_flag(&iaxs[fr->callno]->state, IAX_STATE_STARTED);
@@ -316,7 +306,7 @@
  								iax2_destroy(fr->callno);
  							else if (ies.vars) {
  								struct ast_datastore *variablestore;
-@@ -11243,7 +11248,7 @@ immediatedial:
+@@ -11230,7 +11235,7 @@ immediatedial:
  							ast_getformatname_multiple(tmp, sizeof(tmp), iaxs[fr->callno]->peerformat));
  						ast_set_flag(&iaxs[fr->callno]->state, IAX_STATE_STARTED);
  						send_command(iaxs[fr->callno], AST_FRAME_CONTROL, AST_CONTROL_PROGRESS, 0, NULL, 0, -1);
@@ -325,7 +315,7 @@
  							iax2_destroy(fr->callno);
  						else if (ies.vars) {
  							struct ast_datastore *variablestore;
-@@ -11996,7 +12001,7 @@ static void __iax2_poke_noanswer(const void *data)
+@@ -11982,7 +11987,7 @@ static void __iax2_poke_noanswer(const v
  	if (peer->lastms > -1) {
  		ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Time: %d\n", peer->name, peer->lastms);
  		manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, peer->lastms);
@@ -334,7 +324,7 @@
  	}
  	if ((callno = peer->callno) > 0) {
  		ast_mutex_lock(&iaxsl[callno]);
-@@ -12164,7 +12169,7 @@ static struct ast_channel *iax2_request(const char *type, format_t format, const
+@@ -12150,7 +12155,7 @@ static struct ast_channel *iax2_request(
  	if (cai.found)
  		ast_string_field_set(iaxs[callno], host, pds.peer);
  
@@ -343,11 +333,9 @@
  
  	ast_mutex_unlock(&iaxsl[callno]);
  
-diff --git a/channels/chan_local.c b/channels/chan_local.c
-index 459bd5b..2d283eb 100644
 --- a/channels/chan_local.c
 +++ b/channels/chan_local.c
-@@ -1229,6 +1229,9 @@ static struct ast_channel *local_new(struct local_pvt *p, int state, const char
+@@ -1143,6 +1143,9 @@ static struct ast_channel *local_new(str
  	tmp->tech_pvt = p;
  	tmp2->tech_pvt = p;
  
@@ -357,11 +345,9 @@
  	p->owner = tmp;
  	p->chan = tmp2;
  	p->u_owner = ast_module_user_add(p->owner);
-diff --git a/channels/chan_sip.c b/channels/chan_sip.c
-index 7e51ed5..4687f87 100644
 --- a/channels/chan_sip.c
 +++ b/channels/chan_sip.c
-@@ -6418,7 +6418,7 @@ static int update_call_counter(struct sip_pvt *fup, int event)
+@@ -6312,7 +6312,7 @@ static int update_call_counter(struct si
  	}
  
  	if (p) {
@@ -370,7 +356,7 @@
  		unref_peer(p, "update_call_counter: unref_peer from call counter");
  	}
  	return 0;
-@@ -7609,6 +7609,9 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
+@@ -7510,6 +7510,9 @@ static struct ast_channel *sip_new(struc
  	if (i->rtp)
  		ast_jb_configure(tmp, &global_jbconf);
  
@@ -380,7 +366,7 @@
  	/* Set channel variables for this call from configuration */
  	for (v = i->chanvars ; v ; v = v->next) {
  		char valuebuf[1024];
-@@ -14221,7 +14224,7 @@ static int expire_register(const void *data)
+@@ -14021,7 +14024,7 @@ static int expire_register(const void *d
  
  	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unregistered\r\nCause: Expired\r\n", peer->name);
  	register_peer_exten(peer, FALSE);	/* Remove regexten */
@@ -389,7 +375,7 @@
  
  	/* Do we need to release this peer from memory?
  		Only for realtime peers and autocreated peers
-@@ -15003,8 +15006,9 @@ static void sip_peer_hold(struct sip_pvt *p, int hold)
+@@ -14803,8 +14806,9 @@ static void sip_peer_hold(struct sip_pvt
  	ast_atomic_fetchadd_int(&p->relatedpeer->onHold, (hold ? +1 : -1));
  
  	/* Request device state update */
@@ -401,7 +387,7 @@
  	return;
  }
  
-@@ -15422,7 +15426,7 @@ static enum check_auth_result register_verify(struct sip_pvt *p, struct ast_sock
+@@ -15208,7 +15212,7 @@ static enum check_auth_result register_v
  		}
  	}
  	if (!res) {
@@ -410,7 +396,7 @@
  	}
  	if (res < 0) {
  		switch (res) {
-@@ -21414,7 +21418,7 @@ static void handle_response_peerpoke(struct sip_pvt *p, int resp, struct sip_req
+@@ -21122,7 +21126,7 @@ static void handle_response_peerpoke(str
  
  		ast_log(LOG_NOTICE, "Peer '%s' is now %s. (%dms / %dms)\n",
  			peer->name, s, pingtime, peer->maxms);
@@ -419,7 +405,7 @@
  		if (sip_cfg.peer_rtupdate) {
  			ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", str_lastms, SENTINEL);
  		}
-@@ -26870,7 +26874,7 @@ static int sip_poke_noanswer(const void *data)
+@@ -26540,7 +26544,7 @@ static int sip_poke_noanswer(const void
  	/* Don't send a devstate change if nothing changed. */
  	if (peer->lastms > -1) {
  		peer->lastms = -1;
@@ -428,11 +414,9 @@
  	}
  
  	/* Try again quickly */
-diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
-index a92bd48..0b16a34 100644
 --- a/channels/chan_skinny.c
 +++ b/channels/chan_skinny.c
-@@ -1925,7 +1925,7 @@ static int skinny_register(struct skinny_req *req, struct skinnysession *s)
+@@ -1925,7 +1925,7 @@ static int skinny_register(struct skinny
  					register_exten(l);
  					/* initialize MWI on line and device */
  					mwi_event_cb(0, l);
@@ -441,7 +425,7 @@
  				}
  				--instance;
  			}
-@@ -1963,7 +1963,7 @@ static int skinny_unregister(struct skinny_req *req, struct skinnysession *s)
+@@ -1963,7 +1963,7 @@ static int skinny_unregister(struct skin
  				l->instance = 0;
  				manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: Skinny\r\nPeer: Skinny/%s@%s\r\nPeerStatus: Unregistered\r\n", l->name, d->name);
  				unregister_exten(l);
@@ -450,7 +434,7 @@
  			}
  		}
  	}
-@@ -5321,7 +5321,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
+@@ -5321,7 +5321,7 @@ static int handle_stimulus_message(struc
  			ast_verb(1, "RECEIVED UNKNOWN STIMULUS:  %d(%d/%d)\n", event, instance, callreference);
  		break;
  	}
@@ -459,7 +443,7 @@
  
  	return 1;
  }
-@@ -5372,7 +5372,7 @@ static int handle_offhook_message(struct skinny_req *req, struct skinnysession *
+@@ -5372,7 +5372,7 @@ static int handle_offhook_message(struct
  	transmit_ringer_mode(d, SKINNY_RING_OFF);
  	l->hookstate = SKINNY_OFFHOOK;
  
@@ -468,7 +452,7 @@
  
  	if (sub && sub->onhold) {
  		return 1;
-@@ -5448,7 +5448,7 @@ static int handle_onhook_message(struct skinny_req *req, struct skinnysession *s
+@@ -5448,7 +5448,7 @@ static int handle_onhook_message(struct
  		return 0;
  	}
  
@@ -477,7 +461,7 @@
  
  	if (sub->onhold) {
  		return 0;
-@@ -5834,7 +5834,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
+@@ -5834,7 +5834,7 @@ static int handle_soft_key_event_message
  		return 0;
  	}
  
@@ -486,7 +470,7 @@
  
  	switch(event) {
  	case SOFTKEY_NONE:
-@@ -6049,7 +6049,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
+@@ -6049,7 +6049,7 @@ static int handle_soft_key_event_message
  				transmit_callstate(d, l->instance, sub->callid, l->hookstate);
  			}
  
@@ -495,7 +479,7 @@
  			if (skinnydebug)
  				ast_verb(1, "Skinny %s@%s went on hook\n", l->name, d->name);
  			if (l->transfer && sub->xferor && sub->owner->_state >= AST_STATE_RING) {
-@@ -6073,7 +6073,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
+@@ -6073,7 +6073,7 @@ static int handle_soft_key_event_message
  				}
  			}
  			if ((l->hookstate == SKINNY_ONHOOK) && (AST_LIST_NEXT(sub, list) && !AST_LIST_NEXT(sub, list)->rtp)) {
@@ -504,11 +488,9 @@
  			}
  		}
  		break;
-diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c
-index e1f3438..6472610 100644
 --- a/funcs/func_devstate.c
 +++ b/funcs/func_devstate.c
-@@ -132,7 +132,7 @@ static int devstate_write(struct ast_channel *chan, const char *cmd, char *data,
+@@ -132,7 +132,7 @@ static int devstate_write(struct ast_cha
  
  	ast_db_put(astdb_family, data, value);
  
@@ -517,7 +499,7 @@
  
  	return 0;
  }
-@@ -295,7 +295,7 @@ static char *handle_cli_devstate_change(struct ast_cli_entry *e, int cmd, struct
+@@ -294,7 +294,7 @@ static char *handle_cli_devstate_change(
  
  	ast_db_put(astdb_family, dev, state);
  
@@ -526,7 +508,7 @@
  
  	return CLI_SUCCESS;
  }
-@@ -341,7 +341,7 @@ static int load_module(void)
+@@ -340,7 +340,7 @@ static int load_module(void)
  		if (dev_name <= (const char *) 1)
  			continue;
  		ast_devstate_changed(ast_devstate_val(db_entry->data),
@@ -535,11 +517,9 @@
  	}
  	ast_db_freetree(db_tree);
  	db_tree = NULL;
-diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
-index d5aa046..f245b62 100644
 --- a/include/asterisk/channel.h
 +++ b/include/asterisk/channel.h
-@@ -938,6 +938,12 @@ enum {
+@@ -936,6 +936,12 @@ enum {
  	 *  some non-traditional dialplans (like AGI) to continue to function.
  	 */
  	AST_FLAG_DISABLE_WORKAROUNDS = (1 << 20),
@@ -552,8 +532,6 @@
  };
  
  /*! \brief ast_bridge_config flags */
-diff --git a/include/asterisk/devicestate.h b/include/asterisk/devicestate.h
-index 66ca2bd..86740bc 100644
 --- a/include/asterisk/devicestate.h
 +++ b/include/asterisk/devicestate.h
 @@ -61,6 +61,14 @@ enum ast_device_state {
@@ -571,7 +549,7 @@
  /*! \brief Devicestate provider call back */
  typedef enum ast_device_state (*ast_devstate_prov_cb_type)(const char *data);
  
-@@ -129,6 +137,7 @@ enum ast_device_state ast_device_state(const char *device);
+@@ -129,6 +137,7 @@ enum ast_device_state ast_device_state(c
   * \brief Tells Asterisk the State for Device is changed
   *
   * \param state the new state of the device
@@ -579,7 +557,7 @@
   * \param fmt device name like a dial string with format parameters
   *
   * The new state of the device will be sent off to any subscribers
-@@ -138,13 +147,14 @@ enum ast_device_state ast_device_state(const char *device);
+@@ -138,13 +147,14 @@ enum ast_device_state ast_device_state(c
   * \retval 0 on success
   * \retval -1 on failure
   */
@@ -596,7 +574,7 @@
   * \param device device name like a dial string with format parameters
   *
   * The new state of the device will be sent off to any subscribers
-@@ -154,7 +164,7 @@ int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
+@@ -154,7 +164,7 @@ int ast_devstate_changed(enum ast_device
   * \retval 0 on success
   * \retval -1 on failure
   */
@@ -605,8 +583,6 @@
  
  /*!
   * \brief Tells Asterisk the State for Device is changed.
-diff --git a/include/asterisk/event_defs.h b/include/asterisk/event_defs.h
-index 073d67b..c385bcf 100644
 --- a/include/asterisk/event_defs.h
 +++ b/include/asterisk/event_defs.h
 @@ -283,8 +283,14 @@ enum ast_event_ie_type {
@@ -625,11 +601,9 @@
  };
  
  /*!
-diff --git a/main/channel.c b/main/channel.c
-index 00f3bbb..50ed55c 100644
 --- a/main/channel.c
 +++ b/main/channel.c
-@@ -299,6 +299,7 @@ static void channel_data_add_flags(struct ast_data *tree,
+@@ -285,6 +285,7 @@ static void channel_data_add_flags(struc
  	ast_data_add_bool(tree, "BRIDGE_HANGUP_RUN", ast_test_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN));
  	ast_data_add_bool(tree, "BRIDGE_HANGUP_DONT", ast_test_flag(chan, AST_FLAG_BRIDGE_HANGUP_DONT));
  	ast_data_add_bool(tree, "DISABLE_WORKAROUNDS", ast_test_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS));
@@ -637,16 +611,16 @@
  }
  
  #if defined(KEEP_TILL_CHANNEL_PARTY_NUMBER_INFO_NEEDED)
-@@ -2519,7 +2520,7 @@ static void ast_channel_destructor(void *obj)
+@@ -2477,7 +2478,7 @@ static void ast_channel_destructor(void
  		 * instance is dead, we don't know the state of all other possible
  		 * instances.
  		 */
 -		ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, device_name);
 +		ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, (chan->flags & AST_FLAG_DISABLE_DEVSTATE_CACHE ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE), device_name);
  	}
- 	ast_atomic_fetchadd_int(&chancount, -1);
- }
-@@ -7058,7 +7059,7 @@ int ast_setstate(struct ast_channel *chan, enum ast_channel_state state)
+ }
+ 
+@@ -6918,7 +6919,7 @@ int ast_setstate(struct ast_channel *cha
  	/* We have to pass AST_DEVICE_UNKNOWN here because it is entirely possible that the channel driver
  	 * for this channel is using the callback method for device state. If we pass in an actual state here
  	 * we override what they are saying the state is and things go amuck. */
@@ -655,11 +629,9 @@
  
  	/* setstate used to conditionally report Newchannel; this is no more */
  	ast_manager_event(chan, EVENT_FLAG_CALL, "Newstate",
-diff --git a/main/devicestate.c b/main/devicestate.c
-index 84eedc8..aabf806 100644
 --- a/main/devicestate.c
 +++ b/main/devicestate.c
-@@ -174,6 +174,7 @@ static AST_RWLIST_HEAD_STATIC(devstate_provs, devstate_prov);
+@@ -170,6 +170,7 @@ static AST_RWLIST_HEAD_STATIC(devstate_p
  
  struct state_change {
  	AST_LIST_ENTRY(state_change) list;
@@ -667,7 +639,7 @@
  	char device[1];
  };
  
-@@ -191,6 +192,7 @@ struct devstate_change {
+@@ -187,6 +188,7 @@ struct devstate_change {
  	AST_LIST_ENTRY(devstate_change) entry;
  	uint32_t state;
  	struct ast_eid eid;
@@ -675,7 +647,7 @@
  	char device[1];
  };
  
-@@ -424,7 +426,7 @@ static int getproviderstate(const char *provider, const char *address)
+@@ -422,7 +424,7 @@ static int getproviderstate(const char *
  	return res;
  }
  
@@ -684,7 +656,7 @@
  {
  	struct ast_event *event;
  	enum ast_event_type event_type;
-@@ -440,18 +442,23 @@ static void devstate_event(const char *device, enum ast_device_state state)
+@@ -438,18 +440,23 @@ static void devstate_event(const char *d
  	ast_debug(3, "device '%s' state '%d'\n", device, state);
  
  	if (!(event = ast_event_new(event_type,
@@ -713,7 +685,7 @@
  {
  	enum ast_device_state state;
  
-@@ -459,10 +466,10 @@ static void do_state_change(const char *device)
+@@ -457,10 +464,10 @@ static void do_state_change(const char *
  
  	ast_debug(3, "Changing state for %s - state %d (%s)\n", device, state, ast_devstate2str(state));
  
@@ -726,7 +698,7 @@
  {
  	struct state_change *change;
  
-@@ -483,14 +490,15 @@ int ast_devstate_changed_literal(enum ast_device_state state, const char *device
+@@ -481,14 +488,15 @@ int ast_devstate_changed_literal(enum as
  	 */
  
  	if (state != AST_DEVICE_UNKNOWN) {
@@ -744,7 +716,7 @@
  		AST_LIST_LOCK(&state_changes);
  		AST_LIST_INSERT_TAIL(&state_changes, change, list);
  		ast_cond_signal(&change_pending);
-@@ -502,10 +510,10 @@ int ast_devstate_changed_literal(enum ast_device_state state, const char *device
+@@ -500,10 +508,10 @@ int ast_devstate_changed_literal(enum as
  
  int ast_device_state_changed_literal(const char *dev)
  {
@@ -757,7 +729,7 @@
  {
  	char buf[AST_MAX_EXTENSION];
  	va_list ap;
-@@ -514,7 +522,7 @@ int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
+@@ -512,7 +520,7 @@ int ast_devstate_changed(enum ast_device
  	vsnprintf(buf, sizeof(buf), fmt, ap);
  	va_end(ap);
  
@@ -766,7 +738,7 @@
  }
  
  int ast_device_state_changed(const char *fmt, ...) 
-@@ -526,7 +534,7 @@ int ast_device_state_changed(const char *fmt, ...)
+@@ -524,7 +532,7 @@ int ast_device_state_changed(const char
  	vsnprintf(buf, sizeof(buf), fmt, ap);
  	va_end(ap);
  
@@ -775,7 +747,7 @@
  }
  
  /*! \brief Go through the dev state change queue and update changes in the dev state thread */
-@@ -546,7 +554,7 @@ static void *do_devstate_changes(void *data)
+@@ -544,7 +552,7 @@ static void *do_devstate_changes(void *d
  		/* Process each state change */
  		while ((current = next)) {
  			next = AST_LIST_NEXT(current, list);
@@ -784,7 +756,7 @@
  			ast_free(current);
  		}
  	}
-@@ -590,7 +598,7 @@ static void devstate_cache_cb(const struct ast_event *event, void *data)
+@@ -588,7 +596,7 @@ static void devstate_cache_cb(const stru
  	collection->num_states++;
  }
  
@@ -793,7 +765,7 @@
  {
  	int i;
  	struct ast_devstate_aggregate agg;
-@@ -641,7 +649,11 @@ static void process_collection(const char *device, struct change_collection *col
+@@ -639,7 +647,11 @@ static void process_collection(const cha
  		return;
  	}
  
@@ -806,7 +778,7 @@
  }
  
  static void handle_devstate_change(struct devstate_change *sc)
-@@ -667,7 +679,7 @@ static void handle_devstate_change(struct devstate_change *sc)
+@@ -665,7 +677,7 @@ static void handle_devstate_change(struc
  	/* Populate the collection of device states from the cache */
  	ast_event_dump_cache(tmp_sub);
  
@@ -815,7 +787,7 @@
  
  	ast_event_sub_destroy(tmp_sub);
  }
-@@ -696,10 +708,12 @@ static void devstate_change_collector_cb(const struct ast_event *event, void *da
+@@ -694,10 +706,12 @@ static void devstate_change_collector_cb
  	const char *device;
  	const struct ast_eid *eid;
  	uint32_t state;
@@ -828,7 +800,7 @@
  
  	if (ast_strlen_zero(device) || !eid) {
  		ast_log(LOG_ERROR, "Invalid device state change event received\n");
-@@ -712,6 +726,7 @@ static void devstate_change_collector_cb(const struct ast_event *event, void *da
+@@ -710,6 +724,7 @@ static void devstate_change_collector_cb
  	strcpy(sc->device, device);
  	sc->eid = *eid;
  	sc->state = state;
@@ -836,11 +808,9 @@
  
  	ast_mutex_lock(&devstate_collector.lock);
  	AST_LIST_INSERT_TAIL(&devstate_collector.devstate_change_q, sc, entry);
-diff --git a/main/event.c b/main/event.c
-index 328dc1e..85136c5 100644
 --- a/main/event.c
 +++ b/main/event.c
-@@ -268,6 +268,7 @@ static const struct ie_map {
+@@ -264,6 +264,7 @@ static const struct ie_map {
  	[AST_EVENT_IE_CHALLENGE]           = { AST_EVENT_IE_PLTYPE_STR,  "Challenge" },
  	[AST_EVENT_IE_RESPONSE]            = { AST_EVENT_IE_PLTYPE_STR,  "Response" },
  	[AST_EVENT_IE_EXPECTED_RESPONSE]   = { AST_EVENT_IE_PLTYPE_STR,  "ExpectedResponse" },
@@ -848,11 +818,9 @@
  };
  
  const char *ast_event_get_type_name(const struct ast_event *event)
-diff --git a/main/features.c b/main/features.c
-index 2f08a98..00edb76 100644
 --- a/main/features.c
 +++ b/main/features.c
-@@ -1094,7 +1094,7 @@ static void notify_metermaids(const char *exten, char *context, enum ast_device_
+@@ -1061,7 +1061,7 @@ static void notify_metermaids(const char
  	ast_debug(4, "Notification of state change to metermaids %s@%s\n to state '%s'", 
  		exten, context, ast_devstate2str(state));
  
@@ -861,11 +829,9 @@
  }
  
  /*! \brief metermaids callback from devicestate.c */
-diff --git a/res/res_calendar.c b/res/res_calendar.c
-index 959c049..7c8518b 100644
 --- a/res/res_calendar.c
 +++ b/res/res_calendar.c
-@@ -575,9 +575,9 @@ static struct ast_calendar_event *destroy_event(struct ast_calendar_event *event
+@@ -571,9 +571,9 @@ static struct ast_calendar_event *destro
  	 * but haven't hit the end event yet, go ahead and set the devicestate to the current busy status */
  	if (event->bs_start_sched < 0 && event->bs_end_sched >= 0) {
  		if (!calendar_is_busy(event->owner)) {
@@ -877,7 +843,7 @@
  		}
  	}
  
-@@ -818,9 +818,9 @@ static int calendar_devstate_change(const void *data)
+@@ -814,9 +814,9 @@ static int calendar_devstate_change(cons
  	/* We can have overlapping events, so ignore the event->busy_state and check busy state
  	 * based on all events in the calendar */
  	if (!calendar_is_busy(event->owner)) {
@@ -889,11 +855,9 @@
  	}
  
  	event = ast_calendar_unref_event(event);
-diff --git a/res/res_jabber.c b/res/res_jabber.c
-index 290cedc..a00b8fe 100644
 --- a/res/res_jabber.c
 +++ b/res/res_jabber.c
-@@ -349,7 +349,7 @@ static char *aji_cli_create_leafnode(struct ast_cli_entry *e, int cmd,
+@@ -350,7 +350,7 @@ static char *aji_cli_create_leafnode(str
  static void aji_create_affiliations(struct aji_client *client, const char *node);
  static iks* aji_pubsub_iq_create(struct aji_client *client, const char *type);
  static void aji_publish_device_state(struct aji_client *client, const char * device,
@@ -902,7 +866,7 @@
  static int aji_handle_pubsub_error(void *data, ikspak *pak);
  static int aji_handle_pubsub_event(void *data, ikspak *pak);
  static void aji_pubsub_subscribe(struct aji_client *client, const char *node);
-@@ -363,7 +363,7 @@ static void aji_publish_mwi(struct aji_client *client, const char *mailbox,
+@@ -364,7 +364,7 @@ static void aji_publish_mwi(struct aji_c
  static void aji_devstate_cb(const struct ast_event *ast_event, void *data);
  static void aji_mwi_cb(const struct ast_event *ast_event, void *data);
  static iks* aji_build_publish_skeleton(struct aji_client *client, const char *node,
@@ -911,7 +875,7 @@
  /* No transports in this version */
  /*
  static int aji_create_transport(char *label, struct aji_client *client);
-@@ -3207,6 +3207,7 @@ static void aji_devstate_cb(const struct ast_event *ast_event, void *data)
+@@ -3198,6 +3198,7 @@ static void aji_devstate_cb(const struct
  {
  	const char *device;
  	const char *device_state;
@@ -919,7 +883,7 @@
  	struct aji_client *client;
  	if (ast_eid_cmp(&ast_eid_default, ast_event_get_ie_raw(ast_event, AST_EVENT_IE_EID)))
  	{
-@@ -3218,7 +3219,8 @@ static void aji_devstate_cb(const struct ast_event *ast_event, void *data)
+@@ -3209,7 +3210,8 @@ static void aji_devstate_cb(const struct
  	client = ASTOBJ_REF((struct aji_client *) data);
  	device = ast_event_get_ie_str(ast_event, AST_EVENT_IE_DEVICE);
  	device_state = ast_devstate_str(ast_event_get_ie_uint(ast_event, AST_EVENT_IE_STATE));
@@ -929,7 +893,7 @@
  	ASTOBJ_UNREF(client, ast_aji_client_destroy);
  }
  
-@@ -3258,11 +3260,13 @@ static void aji_init_event_distribution(struct aji_client *client)
+@@ -3249,11 +3251,13 @@ static void aji_init_event_distribution(
   */
  static int aji_handle_pubsub_event(void *data, ikspak *pak)
  {
@@ -944,7 +908,7 @@
  	item = iks_find(iks_find(iks_find(pak->x, "event"), "items"), "item");
  	if (!item) {
  		ast_log(LOG_ERROR, "Could not parse incoming PubSub event\n");
-@@ -3277,11 +3281,14 @@ static int aji_handle_pubsub_event(void *data, ikspak *pak)
+@@ -3268,11 +3272,14 @@ static int aji_handle_pubsub_event(void
  	}
  	if (!strcasecmp(iks_name(item_content), "state")) {
  		device_state = iks_find_cdata(item, "state");
@@ -963,7 +927,7 @@
  			return IKS_FILTER_EAT;
  		}
  	} else if (!strcasecmp(iks_name(item_content), "mailbox")) {
-@@ -3301,7 +3308,13 @@ static int aji_handle_pubsub_event(void *data, ikspak *pak)
+@@ -3292,7 +3299,13 @@ static int aji_handle_pubsub_event(void
  			iks_name(item_content));
  		return IKS_FILTER_EAT;
  	}
@@ -978,7 +942,7 @@
  	return IKS_FILTER_EAT;
  }
  
-@@ -3376,7 +3389,7 @@ static void aji_pubsub_subscribe(struct aji_client *client, const char *node)
+@@ -3367,7 +3380,7 @@ static void aji_pubsub_subscribe(struct
   * \return iks *
   */
  static iks* aji_build_publish_skeleton(struct aji_client *client, const char *node,
@@ -987,7 +951,7 @@
  {
  	iks *request = aji_pubsub_iq_create(client, "set");
  	iks *pubsub, *publish, *item;
-@@ -3390,8 +3403,24 @@ static iks* aji_build_publish_skeleton(struct aji_client *client, const char *no
+@@ -3381,8 +3394,24 @@ static iks* aji_build_publish_skeleton(s
  	}
  	item = iks_insert(publish, "item");
  	iks_insert_attrib(item, "id", node);
@@ -1013,7 +977,7 @@
  }
  
  /*!
-@@ -3402,11 +3431,11 @@ static iks* aji_build_publish_skeleton(struct aji_client *client, const char *no
+@@ -3393,11 +3422,11 @@ static iks* aji_build_publish_skeleton(s
   * \return void
   */
  static void aji_publish_device_state(struct aji_client *client, const char *device,
@@ -1028,7 +992,7 @@
  	if (ast_test_flag(&pubsubflags, AJI_PUBSUB_AUTOCREATE)) {
  		if (ast_test_flag(&pubsubflags, AJI_XEP0248)) {
  			aji_create_pubsub_node(client, "leaf", device, "device_state");
-@@ -3418,6 +3447,8 @@ static void aji_publish_device_state(struct aji_client *client, const char *devi
+@@ -3409,6 +3438,8 @@ static void aji_publish_device_state(str
  	state = iks_insert(request, "state");
  	iks_insert_attrib(state, "xmlns", "http://asterisk.org");
  	iks_insert_attrib(state, "eid", eid_str);
@@ -1037,7 +1001,7 @@
  	iks_insert_cdata(state, device_state, strlen(device_state));
  	ast_aji_send(client, iks_root(request));
  	iks_delete(request);
-@@ -3437,7 +3468,7 @@ static void aji_publish_mwi(struct aji_client *client, const char *mailbox,
+@@ -3428,7 +3459,7 @@ static void aji_publish_mwi(struct aji_c
  	char eid_str[20];
  	iks *mailbox_node, *request;
  	snprintf(full_mailbox, sizeof(full_mailbox), "%s@%s", mailbox, context);
@@ -1046,6 +1010,3 @@
  	ast_eid_to_str(eid_str, sizeof(eid_str), &ast_eid_default);
  	mailbox_node = iks_insert(request, "mailbox");
  	iks_insert_attrib(mailbox_node, "xmlns", "http://asterisk.org");
--- 
-1.7.10.4
-

Modified: asterisk/trunk/debian/patches/fix-sip-tcp-no-FILE
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/fix-sip-tcp-no-FILE?rev=10071&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/fix-sip-tcp-no-FILE (original)
+++ asterisk/trunk/debian/patches/fix-sip-tcp-no-FILE Tue Jan  8 00:33:34 2013
@@ -32,11 +32,9 @@
  main/tcptls.c             |    3 +
  3 files changed, 861 insertions(+), 116 deletions(-)
 
-diff --git a/channels/chan_sip.c b/channels/chan_sip.c
-index 8f96f7a..6c3ccfe 100644
 --- a/channels/chan_sip.c
 +++ b/channels/chan_sip.c
-@@ -2500,12 +2500,363 @@ static int sip_check_authtimeout(time_t start)
+@@ -2496,12 +2496,363 @@ static int sip_check_authtimeout(time_t
  	return timeout;
  }
  
@@ -401,7 +399,7 @@
  	time_t start;
  	struct sip_request req = { 0, } , reqcpy = { 0, };
  	struct sip_threadinfo *me = NULL;
-@@ -2605,21 +2956,23 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -2601,21 +2952,23 @@ static void *_sip_tcp_helper_thread(stru
  			timeout = -1;
  		}
  
@@ -438,7 +436,7 @@
  			fds[0].revents = 0;
  
  			/* clear request structure */
-@@ -2644,110 +2997,15 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -2640,110 +2993,15 @@ static void *_sip_tcp_helper_thread(stru
  			}
  			req.socket.fd = tcptls_session->fd;
  
@@ -556,7 +554,7 @@
  
  			req.socket.tcptls_session = tcptls_session;
  			handle_request_do(&req, &tcptls_session->remote_address);
-@@ -30490,6 +30748,482 @@ AST_TEST_DEFINE(test_sip_peers_get)
+@@ -30164,6 +30422,482 @@ AST_TEST_DEFINE(test_sip_peers_get)
  	return AST_TEST_PASS;
  }
  
@@ -1039,7 +1037,7 @@
  #endif
  
  #define DATA_EXPORT_SIP_PEER(MEMBER)				\
-@@ -30712,6 +31446,7 @@ static int load_module(void)
+@@ -30386,6 +31120,7 @@ static int load_module(void)
  #ifdef TEST_FRAMEWORK
  	AST_TEST_REGISTER(test_sip_peers_get);
  	AST_TEST_REGISTER(test_sip_mwi_subscribe_parse);
@@ -1047,7 +1045,7 @@
  #endif
  
  	/* Register AstData providers */
-@@ -30824,6 +31559,7 @@ static int unload_module(void)
+@@ -30498,6 +31233,7 @@ static int unload_module(void)
  #ifdef TEST_FRAMEWORK
  	AST_TEST_UNREGISTER(test_sip_peers_get);
  	AST_TEST_UNREGISTER(test_sip_mwi_subscribe_parse);
@@ -1055,8 +1053,6 @@
  #endif
  	/* Unregister all the AstData providers */
  	ast_data_unregister(NULL);
-diff --git a/include/asterisk/tcptls.h b/include/asterisk/tcptls.h
-index e4894f7..7a23499 100644
 --- a/include/asterisk/tcptls.h
 +++ b/include/asterisk/tcptls.h
 @@ -149,6 +149,12 @@ struct ast_tcptls_session_instance {
@@ -1072,11 +1068,9 @@
  };
  
  #if defined(HAVE_FUNOPEN)
-diff --git a/main/tcptls.c b/main/tcptls.c
-index 286985d..37a719a 100644
 --- a/main/tcptls.c
 +++ b/main/tcptls.c
-@@ -141,6 +141,7 @@ HOOK_T ast_tcptls_server_write(struct ast_tcptls_session_instance *tcptls_sessio
+@@ -130,6 +130,7 @@ HOOK_T ast_tcptls_server_write(struct as
  static void session_instance_destructor(void *obj)
  {
  	struct ast_tcptls_session_instance *i = obj;
@@ -1084,7 +1078,7 @@
  	ast_mutex_destroy(&i->lock);
  }
  
-@@ -292,6 +293,7 @@ void *ast_tcptls_server_root(void *data)
+@@ -280,6 +281,7 @@ void *ast_tcptls_server_root(void *data)
  		}
  
  		ast_mutex_init(&tcptls_session->lock);
@@ -1092,7 +1086,7 @@
  
  		flags = fcntl(fd, F_GETFL);
  		fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
-@@ -493,6 +495,7 @@ struct ast_tcptls_session_instance *ast_tcptls_client_create(struct ast_tcptls_s
+@@ -463,6 +465,7 @@ struct ast_tcptls_session_instance *ast_
  		goto error;
  
  	ast_mutex_init(&tcptls_session->lock);
@@ -1100,6 +1094,3 @@
  	tcptls_session->client = 1;
  	tcptls_session->fd = desc->accept_fd;
  	tcptls_session->parent = desc;
--- 
-1.7.10.4
-

Modified: asterisk/trunk/debian/patches/fix-sip-tls-leak
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/fix-sip-tls-leak?rev=10071&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/fix-sip-tls-leak (original)
+++ asterisk/trunk/debian/patches/fix-sip-tls-leak Tue Jan  8 00:33:34 2013
@@ -21,11 +21,9 @@
  channels/chan_sip.c |   12 ++++++------
  1 file changed, 6 insertions(+), 6 deletions(-)
 
-diff --git a/channels/chan_sip.c b/channels/chan_sip.c
-index 7cd117d..0a9468a 100644
 --- a/channels/chan_sip.c
 +++ b/channels/chan_sip.c
-@@ -2520,10 +2520,10 @@ static int sip_check_authtimeout(time_t start)
+@@ -2516,10 +2516,10 @@ static int sip_check_authtimeout(time_t
   * \retval -1 Failed to read data
   * \retval 0 Succeeded in reading data
   */
@@ -38,7 +36,7 @@
  	char buf[1024] = "";
  	int timeout = -1;
  
-@@ -2577,10 +2577,10 @@ static int sip_tls_read(struct sip_request *req, struct ast_tcptls_session_insta
+@@ -2573,10 +2573,10 @@ static int sip_tls_read(struct sip_reque
  		}
  		ast_str_append(&req->data, 0, "%s", buf);
  	}
@@ -52,7 +50,7 @@
  		while (content_length > 0) {
  			size_t bytes_read;
  			if (!tcptls_session->client && !authenticated) {
-@@ -2994,7 +2994,7 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
+@@ -2994,7 +2994,7 @@ static void *_sip_tcp_helper_thread(stru
  			req.socket.fd = tcptls_session->fd;
  
  			if (tcptls_session->ssl) {
@@ -61,6 +59,3 @@
  			} else {
  				res = sip_tcp_read(&req, tcptls_session, authenticated, start);
  			}
--- 
-1.7.10.4
-

Modified: asterisk/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/series?rev=10071&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/series (original)
+++ asterisk/trunk/debian/patches/series Tue Jan  8 00:33:34 2013
@@ -29,7 +29,7 @@
 AST-2012-012
 AST-2012-013
 # Needed for AST-2012-014:
-six-sip-tcp-no-FILE
+fix-sip-tcp-no-FILE
 fix-sip-tls-leak
 AST-2012-014
 AST-2012-015




More information about the Pkg-voip-commits mailing list