Import of pkgsrc-2015Q1

This commit is contained in:
2016-01-21 23:40:00 +01:00
committed by sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870539 additions and 795424 deletions
+36 -16
View File
@@ -1,17 +1,28 @@
$NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
$NetBSD: patch-apps_app__queue.c,v 1.4 2014/07/29 04:20:55 jnemeth Exp $
--- apps/app_queue.c.orig 2013-09-12 00:02:37.000000000 +0000
--- apps/app_queue.c.orig 2014-06-12 15:40:41.000000000 +0000
+++ apps/app_queue.c
@@ -4735,7 +4735,7 @@ static int wait_our_turn(struct queue_en
@@ -4045,8 +4045,8 @@ static void record_abandoned(struct queu
"Uniqueid: %s\r\n"
"Position: %d\r\n"
"OriginalPosition: %d\r\n"
- "HoldTime: %d\r\n",
- qe->parent->name, ast_channel_uniqueid(qe->chan), qe->pos, qe->opos, (int)(time(NULL) - qe->start));
+ "HoldTime: %jd\r\n",
+ qe->parent->name, ast_channel_uniqueid(qe->chan), qe->pos, qe->opos, (intmax_t)(time(NULL) - qe->start));
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty))) {
qe->parent->callsabandoned++;
ao2_unlock(qe->parent);
@@ -4818,7 +4818,7 @@ static int wait_our_turn(struct queue_en
if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->parent->leavewhenempty, 0))) {
*reason = QUEUE_LEAVEEMPTY;
- ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
+ ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%jd", qe->pos, qe->opos, (intmax_t) time(NULL) - qe->start);
leave_queue(qe);
break;
}
@@ -4975,12 +4975,12 @@ static void send_agent_complete(const st
@@ -5058,12 +5058,12 @@ static void send_agent_complete(const st
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
@@ -27,7 +38,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, vars_len) : "");
}
@@ -5023,9 +5023,9 @@ static void queue_transfer_fixup(void *d
@@ -5106,9 +5106,9 @@ static void queue_transfer_fixup(void *d
int callcompletedinsl = qtds->callcompletedinsl;
struct ast_datastore *datastore;
@@ -40,7 +51,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
update_queue(qe->parent, member, callcompletedinsl, (time(NULL) - callstart));
@@ -5542,7 +5542,7 @@ static int try_calling(struct queue_ent
@@ -5625,7 +5625,7 @@ static int try_calling(struct queue_ent
} else if (ast_check_hangup(qe->chan)) {
/* Caller must have hung up just before being connected */
ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", ast_channel_name(peer));
@@ -49,7 +60,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
record_abandoned(qe);
ast_autoservice_chan_hangup_peer(qe->chan, peer);
ao2_ref(member, -1);
@@ -5591,8 +5591,8 @@ static int try_calling(struct queue_ent
@@ -5674,8 +5674,8 @@ static int try_calling(struct queue_ent
/* if setqueueentryvar is defined, make queue entry (i.e. the caller) variables available to the channel */
/* use pbx_builtin_setvar to set a load of variables with one call */
if (qe->parent->setqueueentryvar) {
@@ -60,7 +71,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
pbx_builtin_setvar_multiple(qe->chan, interfacevar);
pbx_builtin_setvar_multiple(peer, interfacevar);
}
@@ -5809,8 +5809,8 @@ static int try_calling(struct queue_ent
@@ -5892,8 +5892,8 @@ static int try_calling(struct queue_ent
}
}
qe->handled++;
@@ -71,7 +82,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
if (ast_channel_cdr(qe->chan)) {
struct ast_cdr *cdr;
@@ -5864,12 +5864,12 @@ static int try_calling(struct queue_ent
@@ -5947,12 +5947,12 @@ static int try_calling(struct queue_ent
"Channel: %s\r\n"
"Member: %s\r\n"
"MemberName: %s\r\n"
@@ -87,7 +98,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
ast_copy_string(oldcontext, ast_channel_context(qe->chan), sizeof(oldcontext));
ast_copy_string(oldexten, ast_channel_exten(qe->chan), sizeof(oldexten));
@@ -5901,17 +5901,17 @@ static int try_calling(struct queue_ent
@@ -5984,17 +5984,17 @@ static int try_calling(struct queue_ent
/* detect a blind transfer */
if (!(ast_channel_softhangup_internal_flag(qe->chan) | ast_channel_softhangup_internal_flag(peer)) && (strcasecmp(oldcontext, ast_channel_context(qe->chan)) || strcasecmp(oldexten, ast_channel_exten(qe->chan)))) {
@@ -112,7 +123,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
send_agent_complete(qe, queuename, peer, member, callstart, vars, sizeof(vars), AGENT);
}
if ((tds = ast_channel_datastore_find(qe->chan, &queue_transfer_info, NULL))) {
@@ -7088,8 +7088,8 @@ check_turns:
@@ -7174,8 +7174,8 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
@@ -123,8 +134,8 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
break;
}
@@ -7133,7 +7133,7 @@ check_turns:
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty))) {
@@ -7219,7 +7219,7 @@ check_turns:
if ((status = get_member_status(qe.parent, qe.max_penalty, qe.min_penalty, qe.parent->leavewhenempty, 0))) {
record_abandoned(&qe);
reason = QUEUE_LEAVEEMPTY;
- ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe.pos, qe.opos, (long)(time(NULL) - qe.start));
@@ -132,7 +143,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
res = 0;
break;
}
@@ -7155,7 +7155,7 @@ check_turns:
@@ -7241,7 +7241,7 @@ check_turns:
record_abandoned(&qe);
reason = QUEUE_TIMEOUT;
res = 0;
@@ -141,7 +152,7 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
break;
}
@@ -7183,8 +7183,8 @@ stop:
@@ -7269,8 +7269,8 @@ stop:
if (!qe.handled) {
record_abandoned(&qe);
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "ABANDON",
@@ -152,3 +163,12 @@ $NetBSD: patch-apps_app__queue.c,v 1.3 2013/12/23 01:34:03 jnemeth Exp $
res = -1;
} else if (qcontinue) {
reason = QUEUE_CONTINUE;
@@ -7278,7 +7278,7 @@ stop:
}
} else if (qe.valid_digits) {
ast_queue_log(args.queuename, ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
- "%s|%d|%d|%ld", qe.digits, qe.pos, qe.opos, (long) time(NULL) - qe.start);
+ "%s|%d|%d|%jd", qe.digits, qe.pos, qe.opos, (intmax_t) time(NULL) - qe.start);
}
}
@@ -1,13 +1,13 @@
$NetBSD: patch-channels_chan__oss.c,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
$NetBSD: patch-channels_chan__oss.c,v 1.2 2014/07/02 03:06:24 jnemeth Exp $
--- channels/chan_oss.c.orig 2012-08-21 20:40:18.000000000 +0000
--- channels/chan_oss.c.orig 2014-04-17 20:06:11.000000000 +0000
+++ channels/chan_oss.c
@@ -48,7 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#ifdef __linux
#include <linux/soundcard.h>
-#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__)
+#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) || defined(__GLIBC__)
-#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__) || defined(__sun)
+#elif defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__GLIBC__) || defined(__sun) || defined(__DragonFly__)
#include <sys/soundcard.h>
#else
#include <soundcard.h>
@@ -0,0 +1,42 @@
$NetBSD: patch-channels_chan__sip.c,v 1.1 2014/07/29 04:20:55 jnemeth Exp $
--- channels/chan_sip.c.orig 2014-06-30 19:42:18.000000000 +0000
+++ channels/chan_sip.c
@@ -17537,6 +17537,8 @@ static int get_rdnis(struct sip_pvt *p,
return 0;
}
+RAII_DECL(char *, tmpf, ast_free);
+
/*!
* \brief Find out who the call is for.
*
@@ -17554,7 +17556,7 @@ static int get_rdnis(struct sip_pvt *p,
static enum sip_get_dest_result get_destination(struct sip_pvt *p, struct sip_request *oreq, int *cc_recall_core_id)
{
char tmp[256] = "", *uri, *unused_password, *domain;
- RAII_VAR(char *, tmpf, NULL, ast_free);
+ RAII_VAR(char *, tmpf, NULL);
char *from = NULL;
struct sip_request *req;
char *decoded_uri;
@@ -18426,6 +18428,8 @@ static enum check_auth_result check_peer
return res;
}
+RAII_DECL(char *, ofbuf, ast_free); /* beware, everyone starts pointing to this */
+RAII_DECL(char *, namebuf, ast_free);
/*! \brief Check if matching user or peer is defined
Match user on From: user name and peer on IP/port
@@ -18437,8 +18441,8 @@ static enum check_auth_result check_user
struct ast_sockaddr *addr, struct sip_peer **authpeer)
{
char *of, *name, *unused_password, *domain;
- RAII_VAR(char *, ofbuf, NULL, ast_free); /* beware, everyone starts pointing to this */
- RAII_VAR(char *, namebuf, NULL, ast_free);
+ RAII_VAR(char *, ofbuf, NULL); /* beware, everyone starts pointing to this */
+ RAII_VAR(char *, namebuf, NULL);
enum check_auth_result res = AUTH_DONT_KNOW;
char calleridname[256];
char *uri2 = ast_strdupa(uri);
@@ -1,22 +0,0 @@
$NetBSD: patch-contrib_scripts_autosupport,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
--- contrib/scripts/autosupport.orig 2012-01-04 20:01:27.000000000 +0000
+++ contrib/scripts/autosupport
@@ -33,7 +33,7 @@ NONINTERACTIVE=0
# If a prefix is specified on command-line, add it.
if (set -u; : $1) 2> /dev/null
then
- if [ $1 == "-h" ] || [ $1 == "--help" ]; then
+ if [ $1 = "-h" ] || [ $1 = "--help" ]; then
echo
echo "Digium autosupport script"
echo "Copyright (C) 2005-2010, Digium, Inc."
@@ -53,7 +53,7 @@ then
echo " XXXXXXXX_${TARBALL_OUTPUT_FILE}"
echo
exit
- elif [ $1 == "-n" ] || [ $1 == "--non-interactive" ]; then
+ elif [ $1 = "-n" ] || [ $1 = "--non-interactive" ]; then
FILE_PREFIX=
NONINTERACTIVE=1
else
@@ -0,0 +1,22 @@
$NetBSD: patch-funcs_func__strings.c,v 1.1 2014/07/02 03:06:24 jnemeth Exp $
--- funcs/func_strings.c.orig 2014-05-21 19:05:32.000000000 +0000
+++ funcs/func_strings.c
@@ -790,6 +790,8 @@ static struct ast_custom_function filter
.read = filter,
};
+RAII_DECL(struct ast_str *, str, ast_free);
+
static int replace(struct ast_channel *chan, const char *cmd, char *data, struct ast_str **buf, ssize_t len)
{
AST_DECLARE_APP_ARGS(args,
@@ -798,7 +800,7 @@ static int replace(struct ast_channel *c
AST_APP_ARG(replace);
);
char *strptr, *varsubst;
- RAII_VAR(struct ast_str *, str, ast_str_create(16), ast_free);
+ RAII_VAR(struct ast_str *, str, ast_str_create(16));
char find[256]; /* Only 256 characters possible */
char replace[2] = "";
size_t unused;
+30 -13
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-main_manager.c,v 1.2 2013/08/08 00:45:10 jnemeth Exp $
$NetBSD: patch-main_manager.c,v 1.4 2014/12/16 01:00:22 jnemeth Exp $
--- main/manager.c.orig 2013-05-13 14:26:57.000000000 +0000
--- main/manager.c.orig 2014-11-21 18:47:12.000000000 +0000
+++ main/manager.c
@@ -1850,7 +1850,7 @@ static char *handle_showmanconn(struct a
@@ -1886,7 +1886,7 @@ static char *handle_showmanconn(struct a
struct mansession_session *session;
time_t now = time(NULL);
#define HSMCONN_FORMAT1 " %-15.15s %-55.55s %-10.10s %-10.10s %-8.8s %-8.8s %-5.5s %-5.5s\n"
@@ -11,16 +11,33 @@ $NetBSD: patch-main_manager.c,v 1.2 2013/08/08 00:45:10 jnemeth Exp $
int count = 0;
struct ao2_iterator i;
@@ -1871,7 +1871,7 @@ static char *handle_showmanconn(struct a
i = ao2_iterator_init(sessions, 0);
while ((session = ao2_iterator_next(&i))) {
ao2_lock(session);
- ast_cli(a->fd, HSMCONN_FORMAT2, session->username, ast_sockaddr_stringify_addr(&session->addr), (int)(session->sessionstart), (int)(now - session->sessionstart), session->fd, session->inuse, session->readperm, session->writeperm);
+ ast_cli(a->fd, HSMCONN_FORMAT2, session->username, ast_sockaddr_stringify_addr(&session->addr), (intmax_t)(session->sessionstart), (intmax_t)(now - session->sessionstart), session->fd, session->inuse, session->readperm, session->writeperm);
count++;
ao2_unlock(session);
unref_mansession(session);
@@ -7203,9 +7203,11 @@ static char *handle_manager_show_events(
@@ -1912,8 +1912,8 @@ static char *handle_showmanconn(struct a
ao2_lock(session);
ast_cli(a->fd, HSMCONN_FORMAT2, session->username,
ast_sockaddr_stringify_addr(&session->addr),
- (int) (session->sessionstart),
- (int) (now - session->sessionstart),
+ (intmax_t) (session->sessionstart),
+ (intmax_t) (now - session->sessionstart),
session->fd,
session->inuse,
session->readperm,
@@ -5735,11 +5735,13 @@ static void append_channel_vars(struct a
AST_THREADSTORAGE(manager_event_buf);
#define MANAGER_EVENT_BUF_INITSIZE 256
+RAII_DECL(struct ao2_container *, sessions, ao2_cleanup);
+
int __ast_manager_event_multichan(int category, const char *event, int chancount,
struct ast_channel **chans, const char *file, int line, const char *func,
const char *fmt, ...)
{
- RAII_VAR(struct ao2_container *, sessions, ao2_global_obj_ref(mgr_sessions), ao2_cleanup);
+ RAII_VAR(struct ao2_container *, sessions, ao2_global_obj_ref(mgr_sessions));
struct mansession_session *session;
struct manager_custom_hook *hook;
struct ast_str *auth = ast_str_alloca(MAX_AUTH_PERM_STRING);
@@ -7361,9 +7363,11 @@ static char *handle_manager_show_events(
return CLI_SUCCESS;
}
@@ -0,0 +1,83 @@
$NetBSD: patch-res_res__config__pgsql.c,v 1.1 2014/07/02 03:06:24 jnemeth Exp $
--- res/res_config_pgsql.c.orig 2014-05-02 19:50:07.000000000 +0000
+++ res/res_config_pgsql.c
@@ -247,12 +247,14 @@ static int pgsql_exec(const char *databa
return -1;
}
+RAII_DECL(PGresult *, result, PQclear);
+
static struct tables *find_table(const char *database, const char *orig_tablename)
{
struct columns *column;
struct tables *table;
struct ast_str *sql = ast_str_thread_get(&findtable_buf, 330);
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int exec_result;
char *fname, *ftype, *flen, *fnotnull, *fdef;
int i, rows;
@@ -416,7 +418,7 @@ static struct columns *find_column(struc
static struct ast_variable *realtime_pgsql(const char *database, const char *tablename, va_list ap)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int num_rows = 0, pgresult;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 100);
struct ast_str *escapebuf = ast_str_thread_get(&escapebuf_buf, 100);
@@ -531,7 +533,7 @@ static struct ast_variable *realtime_pgs
static struct ast_config *realtime_multi_pgsql(const char *database, const char *table, va_list ap)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int num_rows = 0, pgresult;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 100);
struct ast_str *escapebuf = ast_str_thread_get(&escapebuf_buf, 100);
@@ -688,7 +690,7 @@ static struct ast_config *realtime_multi
static int update_pgsql(const char *database, const char *tablename, const char *keyfield,
const char *lookup, va_list ap)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int numrows = 0, pgresult;
const char *newparam, *newval;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 100);
@@ -819,7 +821,7 @@ static int update_pgsql(const char *data
static int update2_pgsql(const char *database, const char *tablename, va_list ap)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int numrows = 0, pgresult, first = 1;
struct ast_str *escapebuf = ast_str_thread_get(&escapebuf_buf, 16);
const char *newparam, *newval;
@@ -933,7 +935,7 @@ static int update2_pgsql(const char *dat
static int store_pgsql(const char *database, const char *table, va_list ap)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int numrows;
struct ast_str *buf = ast_str_thread_get(&escapebuf_buf, 256);
struct ast_str *sql1 = ast_str_thread_get(&sql_buf, 256);
@@ -1014,7 +1016,7 @@ static int store_pgsql(const char *datab
static int destroy_pgsql(const char *database, const char *table, const char *keyfield, const char *lookup, va_list ap)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
int numrows = 0;
int pgresult;
struct ast_str *sql = ast_str_thread_get(&sql_buf, 256);
@@ -1096,7 +1098,7 @@ static struct ast_config *config_pgsql(c
const char *file, struct ast_config *cfg,
struct ast_flags flags, const char *suggested_incl, const char *who_asked)
{
- RAII_VAR(PGresult *, result, NULL, PQclear);
+ RAII_VAR(PGresult *, result, NULL);
long num_rows;
struct ast_variable *new_v;
struct ast_category *cur_cat = NULL;
@@ -0,0 +1,26 @@
$NetBSD: patch-tests_test__linkedlists.c,v 1.1 2014/07/02 03:06:24 jnemeth Exp $
--- tests/test_linkedlists.c.orig 2013-10-24 19:55:23.000000000 +0000
+++ tests/test_linkedlists.c
@@ -124,9 +124,11 @@ static int dbl_list_expect_reverse(struc
return AST_TEST_FAIL; \
}
+RAII_VAR(struct ast_str *, buf, ast_free);
+
AST_TEST_DEFINE(single_ll_tests)
{
- RAII_VAR(struct ast_str *, buf, NULL, ast_free);
+ RAII_VAR(struct ast_str *, buf, NULL);
struct test_llist test_list = { 0, };
struct test_llist other_list = { 0, };
struct test_val *bogus;
@@ -337,7 +339,7 @@ AST_TEST_DEFINE(single_ll_tests)
AST_TEST_DEFINE(double_ll_tests)
{
- RAII_VAR(struct ast_str *, buf, NULL, ast_free);
+ RAII_VAR(struct ast_str *, buf, NULL);
struct test_dbl_llist test_list = { 0, };
struct test_dbl_llist other_list = { 0, };
struct test_val *bogus;