[Pkg-voip-commits] r8881 - in /asterisk/branches/squeeze/debian/patches: AST-2011-005 AST-2011-006
tzafrir at alioth.debian.org
tzafrir at alioth.debian.org
Thu Apr 21 20:46:36 UTC 2011
Author: tzafrir
Date: Thu Apr 21 20:46:34 2011
New Revision: 8881
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8881
Log:
Refresh patches.
Modified:
asterisk/branches/squeeze/debian/patches/AST-2011-005
asterisk/branches/squeeze/debian/patches/AST-2011-006
Modified: asterisk/branches/squeeze/debian/patches/AST-2011-005
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/squeeze/debian/patches/AST-2011-005?rev=8881&op=diff
==============================================================================
--- asterisk/branches/squeeze/debian/patches/AST-2011-005 (original)
+++ asterisk/branches/squeeze/debian/patches/AST-2011-005 Thu Apr 21 20:46:34 2011
@@ -18,8 +18,6 @@
main/manager.c | 76 +++++++++++++++++++++++++++++++++++++++++--
2 files changed, 84 insertions(+), 3 deletions(-)
-diff --git a/configs/manager.conf.sample b/configs/manager.conf.sample
-index acb7da9..30dcd64 100644
--- a/configs/manager.conf.sample
+++ b/configs/manager.conf.sample
@@ -25,6 +25,17 @@ enabled = no
@@ -40,11 +38,9 @@
;httptimeout = 60
; a) httptimeout sets the Max-Age of the http cookie
; b) httptimeout is the amount of time the webserver waits
-diff --git a/main/manager.c b/main/manager.c
-index 2edf258..400394c 100644
--- a/main/manager.c
+++ b/main/manager.c
-@@ -127,6 +127,8 @@ static const int DEFAULT_DISPLAYCONNECTS = 1; /*!< Default setting for displayin
+@@ -126,6 +126,8 @@ static const int DEFAULT_DISPLAYCONNECTS
static const int DEFAULT_TIMESTAMPEVENTS = 0; /*!< Default setting for timestampevents */
static const int DEFAULT_HTTPTIMEOUT = 60; /*!< Default manager http timeout */
static const int DEFAULT_BROKENEVENTSACTION = 0; /*!< Default setting for brokeneventsaction */
@@ -53,7 +49,7 @@
static int displayconnects;
static int allowmultiplelogin = 1;
-@@ -135,9 +137,12 @@ static int httptimeout;
+@@ -134,9 +136,12 @@ static int httptimeout;
static int broken_events_action;
static int manager_enabled = 0;
static int webmanager_enabled = 0;
@@ -74,7 +70,7 @@
int pending_event; /*!< Pending events indicator in case when waiting_thread is NULL */
AST_LIST_HEAD_NOLOCK(mansession_datastores, ast_datastore) datastores; /*!< Data stores on the session */
AST_LIST_ENTRY(mansession_session) list;
-@@ -1792,6 +1798,7 @@ static int action_login(struct mansession *s, const struct message *m)
+@@ -1780,6 +1786,7 @@ static int action_login(struct mansessio
return -1;
}
s->session->authenticated = 1;
@@ -82,7 +78,7 @@
if (manager_displayconnects(s->session))
ast_verb(2, "%sManager '%s' logged on from %s\n", (s->session->managerid ? "HTTP " : ""), s->session->username, ast_inet_ntoa(s->session->sin.sin_addr));
ast_log(LOG_EVENT, "%sManager '%s' logged on from %s\n", (s->session->managerid ? "HTTP " : ""), s->session->username, ast_inet_ntoa(s->session->sin.sin_addr));
-@@ -3130,6 +3137,8 @@ static int get_input(struct mansession *s, char *output)
+@@ -3107,6 +3114,8 @@ static int get_input(struct mansession *
int res, x;
int maxlen = sizeof(s->session->inbuf) - 1;
char *src = s->session->inbuf;
@@ -91,7 +87,7 @@
/*
* Look for \r\n within the buffer. If found, copy to the output
-@@ -3157,6 +3166,20 @@ static int get_input(struct mansession *s, char *output)
+@@ -3134,6 +3143,20 @@ static int get_input(struct mansession *
}
res = 0;
while (res == 0) {
@@ -112,7 +108,7 @@
/* XXX do we really need this locking ? */
ast_mutex_lock(&s->session->__lock);
if (s->session->pending_event) {
-@@ -3167,7 +3190,7 @@ static int get_input(struct mansession *s, char *output)
+@@ -3144,7 +3167,7 @@ static int get_input(struct mansession *
s->session->waiting_thread = pthread_self();
ast_mutex_unlock(&s->session->__lock);
@@ -121,7 +117,7 @@
ast_mutex_lock(&s->session->__lock);
s->session->waiting_thread = AST_PTHREADT_NULL;
-@@ -3200,6 +3223,7 @@ static int do_message(struct mansession *s)
+@@ -3177,6 +3200,7 @@ static int do_message(struct mansession
struct message m = { 0 };
char header_buf[sizeof(s->session->inbuf)] = { '\0' };
int res;
@@ -129,7 +125,7 @@
for (;;) {
/* Check if any events are pending and do them if needed */
-@@ -3207,6 +3231,17 @@ static int do_message(struct mansession *s)
+@@ -3184,6 +3208,17 @@ static int do_message(struct mansession
return -1;
res = get_input(s, header_buf);
if (res == 0) {
@@ -147,7 +143,7 @@
continue;
} else if (res > 0) {
if (ast_strlen_zero(header_buf))
-@@ -3230,13 +3265,22 @@ static int do_message(struct mansession *s)
+@@ -3207,13 +3242,22 @@ static int do_message(struct mansession
static void *session_do(void *data)
{
struct ast_tcptls_session_instance *ser = data;
@@ -172,7 +168,7 @@
session->writetimeout = 100;
session->waiting_thread = AST_PTHREADT_NULL;
-@@ -3280,6 +3324,13 @@ static void *session_do(void *data)
+@@ -3243,6 +3287,13 @@ static void *session_do(void *data)
ast_atomic_fetchadd_int(&num_sessions, 1);
AST_LIST_UNLOCK(&sessions);
@@ -186,7 +182,7 @@
astman_append(&s, "Asterisk Call Manager/%s\r\n", AMI_VERSION); /* welcome prompt */
for (;;) {
if ((res = do_message(&s)) < 0 || s.write_error)
-@@ -3291,6 +3342,7 @@ static void *session_do(void *data)
+@@ -3254,6 +3305,7 @@ static void *session_do(void *data)
ast_verb(2, "Manager '%s' logged off from %s\n", session->username, ast_inet_ntoa(session->sin.sin_addr));
ast_log(LOG_EVENT, "Manager '%s' logged off from %s\n", session->username, ast_inet_ntoa(session->sin.sin_addr));
} else {
@@ -194,7 +190,7 @@
if (displayconnects)
ast_verb(2, "Connect attempt from '%s' unable to authenticate\n", ast_inet_ntoa(session->sin.sin_addr));
ast_log(LOG_EVENT, "Failed attempt from %s\n", ast_inet_ntoa(session->sin.sin_addr));
-@@ -4186,6 +4238,8 @@ static int __init_manager(int reload)
+@@ -4160,6 +4212,8 @@ static int __init_manager(int reload)
block_sockets = DEFAULT_BLOCKSOCKETS;
timestampevents = DEFAULT_TIMESTAMPEVENTS;
httptimeout = DEFAULT_HTTPTIMEOUT;
@@ -203,7 +199,7 @@
if (!cfg || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_NOTICE, "Unable to open AMI configuration manager.conf, or configuration is invalid. Asterisk management interface (AMI) disabled.\n");
-@@ -4250,6 +4304,22 @@ static int __init_manager(int reload)
+@@ -4224,6 +4278,22 @@ static int __init_manager(int reload)
manager_debug = ast_true(val);
} else if (!strcasecmp(var->name, "httptimeout")) {
newhttptimeout = atoi(val);
@@ -226,6 +222,3 @@
} else {
ast_log(LOG_NOTICE, "Invalid keyword <%s> = <%s> in manager.conf [general]\n",
var->name, val);
---
-1.7.4.1
-
Modified: asterisk/branches/squeeze/debian/patches/AST-2011-006
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/squeeze/debian/patches/AST-2011-006?rev=8881&op=diff
==============================================================================
--- asterisk/branches/squeeze/debian/patches/AST-2011-006 (original)
+++ asterisk/branches/squeeze/debian/patches/AST-2011-006 Thu Apr 21 20:46:34 2011
@@ -34,11 +34,9 @@
main/manager.c | 34 +++++----
7 files changed, 288 insertions(+), 25 deletions(-)
-diff --git a/channels/chan_sip.c b/channels/chan_sip.c
-index fdf1ffc..95a3017 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
-@@ -500,6 +500,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -500,6 +500,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#define DEFAULT_MWI_EXPIRY 3600
#define DEFAULT_REGISTRATION_TIMEOUT 20
#define DEFAULT_MAX_FORWARDS "70"
@@ -47,7 +45,7 @@
/* guard limit must be larger than guard secs */
/* guard min must be < 1000, and should be >= 250 */
-@@ -552,6 +554,10 @@ static int mwi_expiry = DEFAULT_MWI_EXPIRY;
+@@ -552,6 +554,10 @@ static int mwi_expiry = DEFAULT_MWI_EXPI
#define SDP_MAX_RTPMAP_CODECS 32 /*!< Maximum number of codecs allowed in received SDP */
@@ -58,7 +56,7 @@
/*! \brief Global jitterbuffer configuration - by default, jb is disabled */
static struct ast_jb_conf default_jbconf =
{
-@@ -1205,6 +1211,7 @@ struct sip_request {
+@@ -1212,6 +1218,7 @@ struct sip_request {
char debug; /*!< print extra debugging if non zero */
char has_to_tag; /*!< non-zero if packet has To: tag */
char ignore; /*!< if non-zero This is a re-transmit, ignore it */
@@ -66,7 +64,7 @@
/* Array of offsets into the request string of each SIP header*/
ptrdiff_t header[SIP_MAX_HEADERS];
/* Array of offsets into the request string of each SDP line*/
-@@ -2913,21 +2920,48 @@ static void *sip_tcp_worker_fn(void *data)
+@@ -2908,21 +2915,48 @@ static void *sip_tcp_worker_fn(void *dat
return _sip_tcp_helper_thread(NULL, tcptls_session);
}
@@ -119,7 +117,7 @@
* if this is a client connection more work must be done.
* 1. We own the parent session args for a client connection. This pointer needs
* to be held on to so we can decrement it's ref count on thread destruction.
-@@ -2936,6 +2970,22 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
+@@ -2931,6 +2965,22 @@ static void *_sip_tcp_helper_thread(stru
* 3. Last, the tcptls_session must be started.
*/
if (!tcptls_session->client) {
@@ -142,7 +140,7 @@
if (!(me = sip_threadinfo_create(tcptls_session, tcptls_session->ssl ? SIP_TRANSPORT_TLS : SIP_TRANSPORT_TCP))) {
goto cleanup;
}
-@@ -2965,14 +3015,41 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
+@@ -2960,14 +3010,41 @@ static void *_sip_tcp_helper_thread(stru
if (!(reqcpy.data = ast_str_create(SIP_MIN_PACKET)))
goto cleanup;
@@ -185,7 +183,7 @@
}
/* handle the socket event, check for both reads from the socket fd,
-@@ -3005,6 +3082,29 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
+@@ -3000,6 +3077,29 @@ static void *_sip_tcp_helper_thread(stru
/* Read in headers one line at a time */
while (req.len < 4 || strncmp(REQ_OFFSET_TO_STR(&req, len - 4), "\r\n\r\n", 4)) {
@@ -215,7 +213,7 @@
ast_mutex_lock(&tcptls_session->lock);
if (!fgets(buf, sizeof(buf), tcptls_session->f)) {
ast_mutex_unlock(&tcptls_session->lock);
-@@ -3022,6 +3122,29 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
+@@ -3017,6 +3117,29 @@ static void *_sip_tcp_helper_thread(stru
if (sscanf(get_header(&reqcpy, "Content-Length"), "%30d", &cl)) {
while (cl > 0) {
size_t bytes_read;
@@ -245,7 +243,7 @@
ast_mutex_lock(&tcptls_session->lock);
if (!(bytes_read = fread(buf, 1, MIN(sizeof(buf) - 1, cl), tcptls_session->f))) {
ast_mutex_unlock(&tcptls_session->lock);
-@@ -3080,6 +3203,10 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
+@@ -3074,6 +3197,10 @@ static void *_sip_tcp_helper_thread(stru
ast_debug(2, "Shutting down thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP");
cleanup:
@@ -256,7 +254,7 @@
if (me) {
ao2_t_unlink(threadt, me, "Removing tcptls helper thread, thread is closing");
ao2_t_ref(me, -1, "Removing tcp_helper_threads threadinfo ref");
-@@ -20474,6 +20601,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
+@@ -20092,6 +20219,8 @@ static int handle_request_invite(struct
}
}
@@ -265,7 +263,7 @@
/* We have a succesful authentication, process the SDP portion if there is one */
if (find_sdp(req)) {
if (process_sdp(p, req, SDP_T38_INITIATE)) {
-@@ -22047,8 +22176,10 @@ static int handle_request_register(struct sip_pvt *p, struct sip_request *req, s
+@@ -21640,8 +21769,10 @@ static int handle_request_register(struc
get_header(req, "To"), ast_inet_ntoa(sin->sin_addr),
reason);
append_history(p, "RegRequest", "Failed : Account %s : %s", get_header(req, "To"), reason);
@@ -277,7 +275,7 @@
if (res < 1) {
/* Destroy the session, but keep us around for just a bit in case they don't
-@@ -22503,6 +22634,11 @@ static int handle_request_do(struct sip_request *req, struct sockaddr_in *sin)
+@@ -22079,6 +22210,11 @@ static int handle_request_do(struct sip_
}
p->recv = *sin;
@@ -289,7 +287,7 @@
if (p->do_history) /* This is a request or response, note what it was for */
append_history(p, "Rx", "%s / %s / %s", req->data->str, get_header(req, "CSeq"), REQ_OFFSET_TO_STR(req, rlPart2));
-@@ -25064,6 +25200,8 @@ static int reload_config(enum channelreloadreason reason)
+@@ -24592,6 +24728,8 @@ static int reload_config(enum channelrel
global_qualifyfreq = DEFAULT_QUALIFYFREQ;
global_t38_maxdatagram = -1;
global_shrinkcallerid = 1;
@@ -298,7 +296,7 @@
sip_cfg.matchexterniplocally = DEFAULT_MATCHEXTERNIPLOCALLY;
-@@ -25310,6 +25448,18 @@ static int reload_config(enum channelreloadreason reason)
+@@ -24838,6 +24976,18 @@ static int reload_config(enum channelrel
mwi_expiry = atoi(v->value);
if (mwi_expiry < 1)
mwi_expiry = DEFAULT_MWI_EXPIRY;
@@ -317,8 +315,6 @@
} else if (!strcasecmp(v->name, "sipdebug")) {
if (ast_true(v->value))
sipdebug |= sip_debug_config;
-diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
-index dd3f963..425f79d 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -100,6 +100,8 @@ enum skinny_codecs {
@@ -340,7 +336,7 @@
static char global_vmexten[AST_MAX_EXTENSION]; /* Voicemail pilot number */
static char used_context[AST_MAX_EXTENSION]; /* placeholder to check if context are already used in regcontext */
static char regcontext[AST_MAX_CONTEXT]; /* Context for auto-extension */
-@@ -1307,6 +1312,7 @@ static struct ast_jb_conf global_jbconf;*/
+@@ -1307,6 +1312,7 @@ static struct ast_jb_conf global_jbconf;
struct skinnysession {
pthread_t t;
ast_mutex_t lock;
@@ -348,7 +344,7 @@
struct sockaddr_in sin;
int fd;
char inbuf[SKINNY_MAX_PACKET];
-@@ -4558,6 +4564,8 @@ static int handle_register_message(struct skinny_req *req, struct skinnysession
+@@ -4558,6 +4564,8 @@ static int handle_register_message(struc
return 0;
}
@@ -357,7 +353,7 @@
ast_verb(3, "Device '%s' successfully registered\n", name);
d = s->device;
-@@ -6244,6 +6252,9 @@ static void destroy_session(struct skinnysession *s)
+@@ -6236,6 +6244,9 @@ static void destroy_session(struct skinn
if (s->fd > -1)
close(s->fd);
@@ -367,7 +363,7 @@
ast_mutex_destroy(&s->lock);
ast_free(s);
-@@ -6259,13 +6270,30 @@ static int get_input(struct skinnysession *s)
+@@ -6251,13 +6262,30 @@ static int get_input(struct skinnysessio
{
int res;
int dlen = 0;
@@ -399,7 +395,7 @@
/* we add 10% to the keep_alive to deal */
/* with network delays, etc */
if (res < 0) {
-@@ -6274,8 +6302,13 @@ static int get_input(struct skinnysession *s)
+@@ -6266,8 +6294,13 @@ static int get_input(struct skinnysessio
return res;
}
} else if (res == 0) {
@@ -415,7 +411,7 @@
skinny_unregister(NULL, s);
return -1;
}
-@@ -6408,18 +6441,35 @@ static void *accept_thread(void *ignore)
+@@ -6400,18 +6433,35 @@ static void *accept_thread(void *ignore)
ast_log(LOG_NOTICE, "Accept returned -1: %s\n", strerror(errno));
continue;
}
@@ -452,7 +448,7 @@
AST_LIST_LOCK(&sessions);
AST_LIST_INSERT_HEAD(&sessions, s, list);
AST_LIST_UNLOCK(&sessions);
-@@ -6573,6 +6623,26 @@ static struct ast_channel *skinny_request(const char *type, int format, void *da
+@@ -6565,6 +6615,26 @@ static struct ast_channel *skinny_reques
} else if (!strcasecmp(v->name, "keepalive")) {
keep_alive = atoi(v->value);
continue;
@@ -479,8 +475,6 @@
} else if (!strcasecmp(v->name, "regcontext")) {
ast_copy_string(newcontexts, v->value, sizeof(newcontexts));
stringp = newcontexts;
-diff --git a/configs/http.conf.sample b/configs/http.conf.sample
-index f15c9cf..6da4ca6 100644
--- a/configs/http.conf.sample
+++ b/configs/http.conf.sample
@@ -32,6 +32,11 @@ bindaddr=127.0.0.1
@@ -495,11 +489,9 @@
; Whether Asterisk should serve static content from http-static
; Default is no.
;
-diff --git a/configs/sip.conf.sample b/configs/sip.conf.sample
-index edc8500..1eafdb6 100644
--- a/configs/sip.conf.sample
+++ b/configs/sip.conf.sample
-@@ -144,6 +144,16 @@ tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0
+@@ -144,6 +144,16 @@ tcpbindaddr=0.0.0.0 ; IP add
; A list of valid SSL cipher strings can be found at:
; http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS
@@ -516,11 +508,9 @@
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; Note: Asterisk only uses the first host
; in SRV records
-diff --git a/configs/skinny.conf.sample b/configs/skinny.conf.sample
-index 2c26e6b..1fdf4cb 100644
--- a/configs/skinny.conf.sample
+++ b/configs/skinny.conf.sample
-@@ -9,6 +9,15 @@ dateformat=M-D-Y ; M,D,Y in any order (6 chars max)
+@@ -9,6 +9,15 @@ dateformat=M-D-Y ; M,D,Y in any order (6
; Use M for month, D for day, Y for year, A for 12-hour time.
keepalive=120
@@ -536,11 +526,9 @@
;vmexten=8500 ; Systemwide voicemailmain pilot number
; It must be in the same context as the calling
; device/line
-diff --git a/main/http.c b/main/http.c
-index ad68896..a8e17e3 100644
--- a/main/http.c
+++ b/main/http.c
-@@ -53,12 +53,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -53,12 +53,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include "asterisk/astobj2.h"
#define MAX_PREFIX 80
@@ -557,7 +545,7 @@
static struct ast_tls_config http_tls_cfg;
static void *httpd_helper_thread(void *arg);
-@@ -677,6 +681,10 @@ static void *httpd_helper_thread(void *data)
+@@ -668,6 +672,10 @@ static void *httpd_helper_thread(void *d
unsigned int static_content = 0;
struct ast_variable *tail = headers;
@@ -568,7 +556,7 @@
if (!fgets(buf, sizeof(buf), ser->f)) {
goto done;
}
-@@ -787,6 +795,7 @@ static void *httpd_helper_thread(void *data)
+@@ -778,6 +786,7 @@ static void *httpd_helper_thread(void *d
}
done:
@@ -576,7 +564,7 @@
fclose(ser->f);
ao2_ref(ser, -1);
ser = NULL;
-@@ -936,6 +945,12 @@ static int __ast_http_load(int reload)
+@@ -927,6 +936,12 @@ static int __ast_http_load(int reload)
}
} else if (!strcasecmp(v->name, "redirect")) {
add_redirect(v->value);
@@ -589,11 +577,9 @@
} else {
ast_log(LOG_WARNING, "Ignoring unknown option '%s' in http.conf\n", v->name);
}
-diff --git a/main/manager.c b/main/manager.c
-index 400394c..da7f03a 100644
--- a/main/manager.c
+++ b/main/manager.c
-@@ -2515,6 +2515,25 @@ static int action_originate(struct mansession *s, const struct message *m)
+@@ -2497,6 +2497,25 @@ static int action_originate(struct manse
format = 0;
ast_parse_allow_disallow(NULL, &format, codecs, 1);
}
@@ -619,7 +605,7 @@
if (ast_true(async)) {
struct fast_originate_helper *fast = ast_calloc(1, sizeof(*fast));
if (!fast) {
-@@ -2548,21 +2567,6 @@ static int action_originate(struct mansession *s, const struct message *m)
+@@ -2527,21 +2546,6 @@ static int action_originate(struct manse
}
}
} else if (!ast_strlen_zero(app)) {
@@ -641,6 +627,3 @@
res = ast_pbx_outgoing_app(tech, format, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL);
} else {
if (exten && context && pi)
---
-1.7.4.1
-
More information about the Pkg-voip-commits
mailing list