[svn-commits] branch oej/test-this-branch r29014 - in
/team/oej/test-this-branch: ./ apps/ ...
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Sat May 20 04:54:22 MST 2006
Author: oej
Date: Sat May 20 06:54:21 2006
New Revision: 29014
URL: http://svn.digium.com/view/asterisk?rev=29014&view=rev
Log:
Reset automerge
Modified:
team/oej/test-this-branch/ (props changed)
team/oej/test-this-branch/Makefile
team/oej/test-this-branch/UPGRADE.txt
team/oej/test-this-branch/acinclude.m4
team/oej/test-this-branch/app.c
team/oej/test-this-branch/apps/app_hasnewvoicemail.c
team/oej/test-this-branch/apps/app_queue.c
team/oej/test-this-branch/apps/app_sms.c
team/oej/test-this-branch/apps/app_voicemail.c
team/oej/test-this-branch/asterisk.c
team/oej/test-this-branch/cdr/cdr_pgsql.c
team/oej/test-this-branch/channels/chan_iax2.c
team/oej/test-this-branch/channels/chan_sip.c
team/oej/test-this-branch/channels/chan_skinny.c
team/oej/test-this-branch/channels/h323/Makefile
team/oej/test-this-branch/cli.c
team/oej/test-this-branch/configure
team/oej/test-this-branch/configure.ac
team/oej/test-this-branch/funcs/func_realtime.c
team/oej/test-this-branch/include/asterisk/app.h
team/oej/test-this-branch/makeopts.in
team/oej/test-this-branch/manager.c
team/oej/test-this-branch/pbx.c
team/oej/test-this-branch/pbx/pbx_spool.c
team/oej/test-this-branch/sample.call
team/oej/test-this-branch/utils/Makefile
team/oej/test-this-branch/utils/ael_main.c
team/oej/test-this-branch/utils/smsq.c
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May 20 06:54:21 2006
@@ -1,1 +1,1 @@
-/trunk:1-28737
+/trunk:1-29013
Modified: team/oej/test-this-branch/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/Makefile?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/Makefile (original)
+++ team/oej/test-this-branch/Makefile Sat May 20 06:54:21 2006
@@ -85,41 +85,27 @@
# Define standard directories for various platforms
# These apply if they are not redefined in asterisk.conf
ifeq ($(OSARCH),SunOS)
- ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
- ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
- ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
- ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
- ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
- ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
- ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
+ ASTETCDIR=/etc/opt/asterisk
+ ASTLIBDIR=/opt/asterisk/lib
+ ASTVARLIBDIR=/var/opt/asterisk/lib
+ ASTSPOOLDIR=/var/opt/asterisk/spool
+ ASTLOGDIR=/var/opt/asterisk/log
+ ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
+ ASTBINDIR=/opt/asterisk/usr/bin
+ ASTSBINDIR=/opt/asterisk/usr/sbin
+ ASTVARRUNDIR=/var/opt/asterisk/run
+ ASTMANDIR=/opt/asterisk/usr/share/man
else
-ifeq ($(OSARCH),FreeBSD)
- PREFIX?=/usr/local
- ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
- ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
- ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
- ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
- ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
- ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
- ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
-else
- ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
- ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
- ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
- ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
- ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
- ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
-endif
+ ASTETCDIR=$(sysconfdir)/asterisk
+ ASTLIBDIR=$(libdir)/asterisk
+ ASTVARLIBDIR=$(localstatedir)/lib/asterisk
+ ASTSPOOLDIR=$(localstatedir)/spool/asterisk
+ ASTLOGDIR=$(localstatedir)/log/asterisk
+ ASTHEADERDIR=$(includedir)/asterisk
+ ASTBINDIR=$(bindir)
+ ASTSBINDIR=$(sbindir)
+ ASTVARRUNDIR=$(localstatedir)/run
+ ASTMANDIR=$(mandir)
endif
ASTDATADIR?=$(ASTVARLIBDIR)
@@ -288,9 +274,6 @@
ASTCFLAGS+= $(GENERIC_JB)
ASTCFLAGS+=$(MALLOC_DEBUG)$(BUSYDETECT)$(OPTIONS)
-ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),)
-ASTCFLAGS+=-fomit-frame-pointer
-endif
MOD_SUBDIRS=res channels pbx apps codecs formats cdr funcs
OTHER_SUBDIRS=utils stdtime agi
@@ -397,7 +380,7 @@
@echo " + make install +"
@echo " +-------------------------------------------+"
-all: cleantest config.status menuselect.makeopts depend asterisk subdirs
+all: cleantest defaults.h config.status menuselect.makeopts depend asterisk subdirs
config.status: configure
@CFLAGS="" ./configure
Modified: team/oej/test-this-branch/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/UPGRADE.txt?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/UPGRADE.txt (original)
+++ team/oej/test-this-branch/UPGRADE.txt Sat May 20 06:54:21 2006
@@ -107,6 +107,12 @@
to specify which DTMF digits can be used to accept a recording and
which digits can be used to cancel a recording.
+* ast_app_messagecount has been renamed to ast_app_inboxcount. There is now a
+ new ast_app_messagecount function which takes a single context/mailbox/folder
+ mailbox specification and returns the message count for that folder only.
+ This addresses the deficiency of not being able to count the number of
+ messages in folders other than INBOX and Old.
+
Manager:
* After executing the 'status' manager action, the "Status" manager events
Modified: team/oej/test-this-branch/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/acinclude.m4?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/acinclude.m4 (original)
+++ team/oej/test-this-branch/acinclude.m4 Sat May 20 06:54:21 2006
@@ -20,17 +20,17 @@
PBX_LIB$1=0
if test "${USE_$1}" != "no"; then
- libdir=""
+ pbxlibdir=""
if test "x${$1_DIR}" != "x"; then
- libdir="-L${$1_DIR}/lib"
+ pbxlibdir="-L${$1_DIR}/lib"
fi
- AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
+ AC_CHECK_LIB([$1], [$2], [:], [], ${pbxlibdir} $6)
if test "${ac_cv_lib_$1_$2}" = "yes"; then
$1_LIB="-l$1 $6"
$4_HEADER_FOUND="1"
if test "x${$1_DIR}" != "x"; then
- $1_LIB="${libdir} ${$1_LIB}"
+ $1_LIB="${pbxlibdir} ${$1_LIB}"
$1_INCLUDE="-I${$1_DIR}/include"
if test "x$3" != "x" ; then
AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
Modified: team/oej/test-this-branch/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/app.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/app.c (original)
+++ team/oej/test-this-branch/app.c Sat May 20 06:54:21 2006
@@ -145,23 +145,23 @@
}
static int (*ast_has_voicemail_func)(const char *mailbox, const char *folder) = NULL;
-static int (*ast_messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
-static int (*ast_messagecount2_func)(const char *context, const char *mailbox, const char *folder) = NULL;
+static int (*ast_inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs) = NULL;
+static int (*ast_messagecount_func)(const char *context, const char *mailbox, const char *folder) = NULL;
void ast_install_vm_functions(int (*has_voicemail_func)(const char *mailbox, const char *folder),
- int (*messagecount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
- int (*messagecount2_func)(const char *context, const char *mailbox, const char *folder))
+ int (*inboxcount_func)(const char *mailbox, int *newmsgs, int *oldmsgs),
+ int (*messagecount_func)(const char *context, const char *mailbox, const char *folder))
{
ast_has_voicemail_func = has_voicemail_func;
+ ast_inboxcount_func = inboxcount_func;
ast_messagecount_func = messagecount_func;
- ast_messagecount2_func = messagecount2_func;
}
void ast_uninstall_vm_functions(void)
{
ast_has_voicemail_func = NULL;
+ ast_inboxcount_func = NULL;
ast_messagecount_func = NULL;
- ast_messagecount2_func = NULL;
}
int ast_app_has_voicemail(const char *mailbox, const char *folder)
@@ -178,15 +178,15 @@
}
-int ast_app_messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
+int ast_app_inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
{
static int warned = 0;
if (newmsgs)
*newmsgs = 0;
if (oldmsgs)
*oldmsgs = 0;
- if (ast_messagecount_func)
- return ast_messagecount_func(mailbox, newmsgs, oldmsgs);
+ if (ast_inboxcount_func)
+ return ast_inboxcount_func(mailbox, newmsgs, oldmsgs);
if (!warned && (option_verbose > 2)) {
warned++;
@@ -196,11 +196,11 @@
return 0;
}
-int ast_app_messagecount2(const char *context, const char *mailbox, const char *folder)
+int ast_app_messagecount(const char *context, const char *mailbox, const char *folder)
{
static int warned = 0;
- if (ast_messagecount2_func)
- return ast_messagecount2_func(context, mailbox, folder);
+ if (ast_messagecount_func)
+ return ast_messagecount_func(context, mailbox, folder);
if (!warned && (option_verbose > 2)) {
warned++;
Modified: team/oej/test-this-branch/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_hasnewvoicemail.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_hasnewvoicemail.c (original)
+++ team/oej/test-this-branch/apps/app_hasnewvoicemail.c Sat May 20 06:54:21 2006
@@ -128,7 +128,7 @@
priority_jump = 1;
}
- vmcount = ast_app_messagecount2(context, vmbox, vmfolder);
+ vmcount = ast_app_messagecount(context, vmbox, vmfolder);
/* Set the count in the channel variable */
if (varname) {
snprintf(tmp, sizeof(tmp), "%d", vmcount);
@@ -177,7 +177,7 @@
args.folder = "INBOX";
}
- snprintf(buf, len, "%d", ast_app_messagecount2(context, args.vmbox, args.folder));
+ snprintf(buf, len, "%d", ast_app_messagecount(context, args.vmbox, args.folder));
LOCAL_USER_REMOVE(u);
Modified: team/oej/test-this-branch/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_queue.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_queue.c (original)
+++ team/oej/test-this-branch/apps/app_queue.c Sat May 20 06:54:21 2006
@@ -2201,7 +2201,10 @@
free(tmp);
}
}
- to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
+ if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))
+ to = (qe->expire - now) * 1000;
+ else
+ to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
ring_one(qe, outgoing, &numbusies);
ast_mutex_unlock(&qe->parent->lock);
if (use_weight)
Modified: team/oej/test-this-branch/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_sms.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_sms.c (original)
+++ team/oej/test-this-branch/apps/app_sms.c Sat May 20 06:54:21 2006
@@ -1176,14 +1176,13 @@
static int sms_generate (struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame f = { 0 };
- unsigned char waste[AST_FRIENDLY_OFFSET];
#define MAXSAMPLES (800)
#ifdef OUTALAW
- unsigned char buf[MAXSAMPLES];
+ unsigned char *buf;
#else
- signed short buf[MAXSAMPLES];
+ short *buf;
#endif
-#define SAMPLE2LEN (sizeof (buf[0]))
+#define SAMPLE2LEN sizeof(*buf)
sms_t *h = data;
int i;
@@ -1192,9 +1191,9 @@
MAXSAMPLES, samples);
samples = MAXSAMPLES;
}
- len = samples * SAMPLE2LEN;
-
- waste[0] = 0; /* make compiler happy */
+ len = samples * SAMPLE2LEN + AST_FRIENDLY_OFFSET;
+ buf = alloca(len);
+
f.frametype = AST_FRAME_VOICE;
#ifdef OUTALAW
f.subclass = AST_FORMAT_ALAW;
@@ -1204,7 +1203,7 @@
f.datalen = len;
f.offset = AST_FRIENDLY_OFFSET;
f.mallocd = 0;
- f.data = buf;
+ f.data = buf + AST_FRIENDLY_OFFSET;
f.samples = samples;
f.src = "app_sms";
/* create a buffer containing the digital sms pattern */
Modified: team/oej/test-this-branch/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_voicemail.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_voicemail.c (original)
+++ team/oej/test-this-branch/apps/app_voicemail.c Sat May 20 06:54:21 2006
@@ -2018,7 +2018,7 @@
}
#ifdef USE_ODBC_STORAGE
-static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
+static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
{
int x = -1;
int res;
@@ -2133,7 +2133,7 @@
return x;
}
-static int messagecount2(const char *context, const char *mailbox, const char *folder)
+static int messagecount(const char *context, const char *mailbox, const char *folder)
{
struct odbc_obj *obj = NULL;
int nummsgs = 0;
@@ -2199,7 +2199,7 @@
else
context = "default";
- if (messagecount2(context, tmp, folder))
+ if (messagecount(context, tmp, folder))
return 1;
else
return 0;
@@ -2207,14 +2207,11 @@
#else
-static int __has_voicemail(const char *mailbox, const char *folder, int shortcircuit)
+static int __has_voicemail(const char *context, const char *mailbox, const char *folder, int shortcircuit)
{
DIR *dir;
struct dirent *de;
char fn[AST_MAX_FILENAME_LEN];
- char tmp[256]="";
- char *mb, *cur;
- char *context;
int ret = 0;
if (!folder)
@@ -2222,28 +2219,9 @@
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
- if (strchr(mailbox, ',')) {
- ast_copy_string(tmp, mailbox, sizeof(tmp));
- mb = tmp;
- ret = 0;
- while((cur = strsep(&mb, ","))) {
- if (!ast_strlen_zero(cur)) {
- if ((ret += __has_voicemail(cur, folder, shortcircuit))) {
- if (shortcircuit)
- return 1;
- }
- }
- }
- return ret;
- }
- ast_copy_string(tmp, mailbox, sizeof(tmp));
- context = strchr(tmp, '@');
- if (context) {
- *context = '\0';
- context++;
- } else
+ if (!context)
context = "default";
- snprintf(fn, sizeof(fn), "%s%s/%s/%s", VM_SPOOL_DIR, context, tmp, folder);
+ snprintf(fn, sizeof(fn), "%s%s/%s/%s", VM_SPOOL_DIR, context, mailbox, folder);
dir = opendir(fn);
if (!dir)
return 0;
@@ -2262,21 +2240,27 @@
static int has_voicemail(const char *mailbox, const char *folder)
{
- return __has_voicemail(mailbox, folder, 1);
-}
-
-static int messagecount2(const char *context, const char *mailbox, const char *folder)
-{
- char tmp[256];
- snprintf(tmp, sizeof(tmp), "%s@%s", mailbox, context);
- return __has_voicemail(tmp, folder, 0);
-}
-
-static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
-{
- DIR *dir;
- struct dirent *de;
- char fn[AST_MAX_FILENAME_LEN];
+ char tmp[256], *tmp2 = tmp, *mbox, *context;
+
+ ast_copy_string(tmp, mailbox, sizeof(tmp));
+ while ((mbox = strsep(&tmp2, ","))) {
+ if ((context = strchr(mbox, '@')))
+ *context++ = '\0';
+ else
+ context = "default";
+ if (__has_voicemail(context, mbox, folder, 1))
+ return 1;
+ }
+ return 0;
+}
+
+static int messagecount(const char *context, const char *mailbox, const char *folder)
+{
+ return __has_voicemail(context, mailbox, folder, 0);
+}
+
+static int inboxcount(const char *mailbox, int *newmsgs, int *oldmsgs)
+{
char tmp[256];
char *context;
@@ -2296,7 +2280,7 @@
mb = tmp;
while((cur = strsep(&mb, ", "))) {
if (!ast_strlen_zero(cur)) {
- if (messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
+ if (inboxcount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
return -1;
else {
if (newmsgs)
@@ -2315,32 +2299,10 @@
context++;
} else
context = "default";
- if (newmsgs) {
- snprintf(fn, sizeof(fn), "%s%s/%s/INBOX", VM_SPOOL_DIR, context, tmp);
- dir = opendir(fn);
- if (dir) {
- while ((de = readdir(dir))) {
- if ((strlen(de->d_name) > 3) && !strncasecmp(de->d_name, "msg", 3) &&
- !strcasecmp(de->d_name + strlen(de->d_name) - 3, "txt"))
- (*newmsgs)++;
-
- }
- closedir(dir);
- }
- }
- if (oldmsgs) {
- snprintf(fn, sizeof(fn), "%s%s/%s/Old", VM_SPOOL_DIR, context, tmp);
- dir = opendir(fn);
- if (dir) {
- while ((de = readdir(dir))) {
- if ((strlen(de->d_name) > 3) && !strncasecmp(de->d_name, "msg", 3) &&
- !strcasecmp(de->d_name + strlen(de->d_name) - 3, "txt"))
- (*oldmsgs)++;
-
- }
- closedir(dir);
- }
- }
+ if (newmsgs)
+ *newmsgs = __has_voicemail(context, tmp, "INBOX", 0);
+ if (oldmsgs)
+ *oldmsgs = __has_voicemail(context, tmp, "Old", 0);
return 0;
}
@@ -2418,7 +2380,7 @@
#else
if (!ast_strlen_zero(externnotify)) {
#endif
- if (messagecount(ext_context, &newvoicemails, &oldvoicemails)) {
+ if (inboxcount(ext_context, &newvoicemails, &oldvoicemails)) {
ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension);
} else {
snprintf(arguments, sizeof(arguments), "%s %s %s %d&", externnotify, context, extension, newvoicemails);
@@ -3435,7 +3397,7 @@
/* Leave voicemail for someone */
if (ast_app_has_voicemail(ext_context, NULL)) {
- ast_app_messagecount(ext_context, &newmsgs, &oldmsgs);
+ ast_app_inboxcount(ext_context, &newmsgs, &oldmsgs);
}
manager_event(EVENT_FLAG_CALL, "MessageWaiting", "Mailbox: %s@%s\r\nWaiting: %d\r\nNew: %d\r\nOld: %d\r\n", vmu->mailbox, vmu->context, ast_app_has_voicemail(ext_context, NULL), newmsgs, oldmsgs);
run_externnotify(vmu->context, vmu->mailbox);
@@ -6697,7 +6659,7 @@
/* compute the location of the voicemail spool directory */
snprintf(VM_SPOOL_DIR, sizeof(VM_SPOOL_DIR), "%s/voicemail/", ast_config_AST_SPOOL_DIR);
- ast_install_vm_functions(has_voicemail, messagecount, messagecount2);
+ ast_install_vm_functions(has_voicemail, inboxcount, messagecount);
#if defined(USE_ODBC_STORAGE) && !defined(EXTENDED_ODBC_STORAGE)
ast_log(LOG_WARNING, "The current ODBC storage table format will be changed soon."
Modified: team/oej/test-this-branch/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/asterisk.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/asterisk.c (original)
+++ team/oej/test-this-branch/asterisk.c Sat May 20 06:54:21 2006
@@ -2076,13 +2076,17 @@
if (ast_opt_exec && data) { /* hack to print output then exit if asterisk -rx is used */
char tempchar;
+#ifdef __Darwin__
struct pollfd fds[0];
fds[0].fd = ast_consock;
fds[0].events = POLLIN;
fds[0].revents = 0;
- while(poll(fds, 1, 100) > 0) {
+ while (poll(fds, 1, 100) > 0) {
ast_el_read_char(el, &tempchar);
}
+#else
+ while (!ast_el_read_char(el, &tempchar));
+#endif
return;
}
for (;;) {
Modified: team/oej/test-this-branch/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/cdr/cdr_pgsql.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/cdr/cdr_pgsql.c (original)
+++ team/oej/test-this-branch/cdr/cdr_pgsql.c Sat May 20 06:54:21 2006
@@ -63,7 +63,7 @@
static char *desc = "PostgreSQL CDR Backend";
static char *name = "pgsql";
static char *config = "cdr_pgsql.conf";
-static char *pghostname = NULL, *pgdbname = NULL, *pgdbuser = NULL, *pgpassword = NULL, *pgdbsock = NULL, *pgdbport = NULL, *table = NULL;
+static char *pghostname = NULL, *pgdbname = NULL, *pgdbuser = NULL, *pgpassword = NULL, *pgdbport = NULL, *table = NULL;
static int connected = 0;
AST_MUTEX_DEFINE_STATIC(pgsql_lock);
@@ -195,8 +195,6 @@
free(pgdbname);
if (pgdbuser)
free(pgdbuser);
- if (pgdbsock)
- free(pgdbsock);
if (pgpassword)
free(pgpassword);
if (pgdbport)
@@ -209,88 +207,67 @@
static int process_my_load_module(struct ast_config *cfg)
{
- int res;
struct ast_variable *var;
char *pgerror;
char *tmp;
- var = ast_variable_browse(cfg, "global");
- if (!var) {
- /* nothing configured */
+ if (!(var = ast_variable_browse(cfg, "global")))
return 0;
- }
-
- tmp = ast_variable_retrieve(cfg,"global","hostname");
- if (tmp == NULL) {
- ast_log(LOG_WARNING,"PostgreSQL server hostname not specified. Assuming localhost\n");
- tmp = "localhost";
- }
- pghostname = strdup(tmp);
- if (pghostname == NULL) {
- ast_log(LOG_ERROR,"Out of memory error.\n");
- return -1;
- }
-
- tmp = ast_variable_retrieve(cfg,"global","dbname");
- if (tmp == NULL) {
+
+ if (!(tmp = ast_variable_retrieve(cfg,"global","hostname"))) {
+ ast_log(LOG_WARNING,"PostgreSQL server hostname not specified. Assuming unix socket connection\n");
+ tmp = ""; /* connect via UNIX-socket by default */
+ }
+
+ if (!(pghostname = ast_strdup(tmp)))
+ return -1;
+
+ if (!(tmp = ast_variable_retrieve(cfg, "global", "dbname"))) {
ast_log(LOG_WARNING,"PostgreSQL database not specified. Assuming asterisk\n");
tmp = "asteriskcdrdb";
}
- pgdbname = strdup(tmp);
- if (pgdbname == NULL) {
- ast_log(LOG_ERROR,"Out of memory error.\n");
- return -1;
- }
-
- tmp = ast_variable_retrieve(cfg,"global","user");
- if (tmp == NULL) {
- ast_log(LOG_WARNING,"PostgreSQL database user not specified. Assuming root\n");
- tmp = "root";
- }
- pgdbuser = strdup(tmp);
- if (pgdbuser == NULL) {
- ast_log(LOG_ERROR,"Out of memory error.\n");
- return -1;
- }
-
- tmp = ast_variable_retrieve(cfg,"global","password");
- if (tmp == NULL) {
+
+ if (!(pgdbname = ast_strdup(tmp)))
+ return -1;
+
+ if (!(tmp = ast_variable_retrieve(cfg, "global", "user"))) {
+ ast_log(LOG_WARNING,"PostgreSQL database user not specified. Assuming asterisk\n");
+ tmp = "asterisk";
+ }
+
+ if (!(pgdbuser = ast_strdup(tmp)))
+ return -1;
+
+ if (!(tmp = ast_variable_retrieve(cfg, "global", "password"))) {
ast_log(LOG_WARNING,"PostgreSQL database password not specified. Assuming blank\n");
tmp = "";
}
- pgpassword = strdup(tmp);
- if (pgpassword == NULL) {
- ast_log(LOG_ERROR,"Out of memory error.\n");
- return -1;
- }
-
- tmp = ast_variable_retrieve(cfg,"global","port");
- if (tmp == NULL) {
+
+ if (!(pgpassword = ast_strdup(tmp)))
+ return -1;
+
+ if (!(tmp = ast_variable_retrieve(cfg,"global","port"))) {
ast_log(LOG_WARNING,"PostgreSQL database port not specified. Using default 5432.\n");
tmp = "5432";
}
- pgdbport = strdup(tmp);
- if (pgdbport == NULL) {
- ast_log(LOG_ERROR,"Out of memory error.\n");
- return -1;
- }
-
- tmp = ast_variable_retrieve(cfg,"global","table");
- if (tmp == NULL) {
+
+ if (!(pgdbport = ast_strdup(tmp)))
+ return -1;
+
+ if (!(tmp = ast_variable_retrieve(cfg, "global", "table"))) {
ast_log(LOG_WARNING,"CDR table not specified. Assuming cdr\n");
tmp = "cdr";
}
- table = strdup(tmp);
- if (table == NULL) {
- ast_log(LOG_ERROR,"Out of memory error.\n");
- return -1;
- }
+
+ if (!(table = ast_strdup(tmp)))
+ return -1;
if (option_debug) {
- ast_log(LOG_DEBUG, "cdr_pgsql: got hostname of %s\n", pghostname);
+ if (ast_strlen_zero(pghostname))
+ ast_log(LOG_DEBUG, "cdr_pgsql: using default unix socket\n");
+ else
+ ast_log(LOG_DEBUG, "cdr_pgsql: got hostname of %s\n", pghostname);
ast_log(LOG_DEBUG, "cdr_pgsql: got port of %s\n", pgdbport);
- if (pgdbsock)
- ast_log(LOG_DEBUG, "cdr_pgsql: got sock file of %s\n", pgdbsock);
ast_log(LOG_DEBUG, "cdr_pgsql: got user of %s\n", pgdbuser);
ast_log(LOG_DEBUG, "cdr_pgsql: got dbname of %s\n", pgdbname);
ast_log(LOG_DEBUG, "cdr_pgsql: got password of %s\n", pgpassword);
@@ -309,24 +286,22 @@
connected = 0;
}
- res = ast_cdr_register(name, desc, pgsql_log);
- if (res) {
- ast_log(LOG_ERROR, "Unable to register PGSQL CDR handling\n");
- }
- return res;
+ return ast_cdr_register(name, desc, pgsql_log);
}
static int my_load_module(void)
{
struct ast_config *cfg;
int res;
- cfg = ast_config_load(config);
- if (!cfg) {
+
+ if (!(cfg = ast_config_load(config))) {
ast_log(LOG_WARNING, "Unable to load config for PostgreSQL CDR's: %s\n", config);
return 0;
}
+
res = process_my_load_module(cfg);
ast_config_destroy(cfg);
+
return res;
}
Modified: team/oej/test-this-branch/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_iax2.c?rev=29014&r1=29013&r2=29014&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_iax2.c (original)
+++ team/oej/test-this-branch/channels/chan_iax2.c Sat May 20 06:54:21 2006
@@ -5693,7 +5693,7 @@
iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr);
if (!ast_strlen_zero(p->mailbox)) {
int new, old;
- ast_app_messagecount(p->mailbox, &new, &old);
+ ast_app_inboxcount(p->mailbox, &new, &old);
if (new > 255)
new = 255;
if (old > 255)
@@ -6298,8 +6298,7 @@
struct ast_iax2_meta_trunk_hdr *mth;
struct ast_iax2_meta_trunk_entry *mte;
struct ast_iax2_meta_trunk_mini *mtm;
- char dblbuf[4096]; /* Declaration of dblbuf must immediately *preceed* fr on the stack */
- struct iax_frame fr;
+ struct iax_frame *fr;
struct iax_frame *cur;
char iabuf[INET_ADDRSTRLEN];
struct ast_frame f;
@@ -6322,8 +6321,9 @@
struct ast_codec_pref pref;
char *using_prefs = "mine";
- dblbuf[0] = 0; /* Keep GCC from whining */
- fr.callno = 0;
+ /* allocate an iax_frame with 4096 bytes of data buffer */
+ fr = alloca(sizeof(*fr) + 4096);
+ fr->callno = 0;
/* Copy frequently used parameters to the stack */
res = thread->iores;
@@ -6336,7 +6336,7 @@
}
if ((vh->zeros == 0) && (ntohs(vh->callno) & 0x8000)) {
/* This is a video frame, get call number */
- fr.callno = find_callno(ntohs(vh->callno) & ~0x8000, dcallno, &sin, new, 1, fd);
+ fr->callno = find_callno(ntohs(vh->callno) & ~0x8000, dcallno, &sin, new, 1, fd);
minivid = 1;
} else if (meta->zeros == 0) {
unsigned char metatype;
@@ -6387,16 +6387,16 @@
/* Stop if we don't have enough data */
if (len > res)
break;
- fr.callno = find_callno(callno & ~IAX_FLAG_FULL, 0, &sin, NEW_PREVENT, 1, fd);
- if (fr.callno) {
- ast_mutex_lock(&iaxsl[fr.callno]);
+ fr->callno = find_callno(callno & ~IAX_FLAG_FULL, 0, &sin, NEW_PREVENT, 1, fd);
+ if (fr->callno) {
+ ast_mutex_lock(&iaxsl[fr->callno]);
/* If it's a valid call, deliver the contents. If not, we
drop it, since we don't have a scallno to use for an INVAL */
/* Process as a mini frame */
f.frametype = AST_FRAME_VOICE;
- if (iaxs[fr.callno]) {
- if (iaxs[fr.callno]->voiceformat > 0) {
- f.subclass = iaxs[fr.callno]->voiceformat;
+ if (iaxs[fr->callno]) {
+ if (iaxs[fr->callno]->voiceformat > 0) {
+ f.subclass = iaxs[fr->callno]->voiceformat;
f.datalen = len;
if (f.datalen >= 0) {
if (f.datalen)
@@ -6404,11 +6404,11 @@
else
f.data = NULL;
if(trunked_ts) {
- fr.ts = (iaxs[fr.callno]->last & 0xFFFF0000L) | (trunked_ts & 0xffff);
+ fr->ts = (iaxs[fr->callno]->last & 0xFFFF0000L) | (trunked_ts & 0xffff);
} else
- fr.ts = fix_peerts(&rxtrunktime, fr.callno, ts);
+ fr->ts = fix_peerts(&rxtrunktime, fr->callno, ts);
/* Don't pass any packets until we're started */
- if (ast_test_flag(&iaxs[fr.callno]->state, IAX_STATE_STARTED)) {
+ if (ast_test_flag(&iaxs[fr->callno]->state, IAX_STATE_STARTED)) {
/* Common things */
f.src = "IAX2";
f.mallocd = 0;
@@ -6417,28 +6417,28 @@
f.samples = ast_codec_get_samples(&f);
else
f.samples = 0;
- fr.outoforder = 0;
- iax_frame_wrap(&fr, &f);
+ fr->outoforder = 0;
+ iax_frame_wrap(fr, &f);
#ifdef BRIDGE_OPTIMIZATION
- if (iaxs[fr.callno]->bridgecallno) {
+ if (iaxs[fr->callno]->bridgecallno) {
forward_delivery(&fr);
} else {
duped_fr = iaxfrdup2(&fr);
if (duped_fr) {
- schedule_delivery(duped_fr, updatehistory, 1, &fr.ts);
+ schedule_delivery(duped_fr, updatehistory, 1, &fr->ts);
}
}
#else
- duped_fr = iaxfrdup2(&fr);
+ duped_fr = iaxfrdup2(fr);
if (duped_fr) {
- schedule_delivery(duped_fr, updatehistory, 1, &fr.ts);
+ schedule_delivery(duped_fr, updatehistory, 1, &fr->ts);
}
#endif
- if (iaxs[fr.callno]->last < fr.ts) {
- iaxs[fr.callno]->last = fr.ts;
+ if (iaxs[fr->callno]->last < fr->ts) {
+ iaxs[fr->callno]->last = fr->ts;
#if 1
if (option_debug && iaxdebug)
- ast_log(LOG_DEBUG, "For call=%d, set last=%d\n", fr.callno, fr.ts);
+ ast_log(LOG_DEBUG, "For call=%d, set last=%d\n", fr->callno, fr->ts);
#endif
}
}
@@ -6447,10 +6447,10 @@
}
} else {
ast_log(LOG_WARNING, "Received trunked frame before first full voice frame\n ");
- iax2_vnak(fr.callno);
+ iax2_vnak(fr->callno);
}
}
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
}
ptr += len;
res -= len;
@@ -6483,13 +6483,13 @@
f.subclass = 0;
}
- if (!fr.callno)
- fr.callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &sin, new, 1, fd);
-
- if (fr.callno > 0)
- ast_mutex_lock(&iaxsl[fr.callno]);
-
- if (!fr.callno || !iaxs[fr.callno]) {
+ if (!fr->callno)
+ fr->callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &sin, new, 1, fd);
+
+ if (fr->callno > 0)
+ ast_mutex_lock(&iaxsl[fr->callno]);
+
+ if (!fr->callno || !iaxs[fr->callno]) {
/* A call arrived for a nonexistent destination. Unless it's an "inval"
frame, reply with an inval */
if (ntohs(mh->callno) & IAX_FLAG_FULL) {
@@ -6502,14 +6502,14 @@
raw_hangup(&sin, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS, ntohs(mh->callno) & ~IAX_FLAG_FULL,
fd);
}
- if (fr.callno > 0)
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ if (fr->callno > 0)
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
- if (ast_test_flag(iaxs[fr.callno], IAX_ENCRYPTED)) {
- if (decrypt_frame(fr.callno, fh, &f, &res)) {
+ if (ast_test_flag(iaxs[fr->callno], IAX_ENCRYPTED)) {
+ if (decrypt_frame(fr->callno, fh, &f, &res)) {
ast_log(LOG_NOTICE, "Packet Decrypt Failed!\n");
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
#ifdef DEBUG_SUPPORT
@@ -6519,24 +6519,24 @@
}
/* count this frame */
- iaxs[fr.callno]->frames_received++;
-
- if (!inaddrcmp(&sin, &iaxs[fr.callno]->addr) && !minivid &&
+ iaxs[fr->callno]->frames_received++;
+
+ if (!inaddrcmp(&sin, &iaxs[fr->callno]->addr) && !minivid &&
f.subclass != IAX_COMMAND_TXCNT && /* for attended transfer */
f.subclass != IAX_COMMAND_TXACC) /* for attended transfer */
- iaxs[fr.callno]->peercallno = (unsigned short)(ntohs(mh->callno) & ~IAX_FLAG_FULL);
+ iaxs[fr->callno]->peercallno = (unsigned short)(ntohs(mh->callno) & ~IAX_FLAG_FULL);
if (ntohs(mh->callno) & IAX_FLAG_FULL) {
if (option_debug && iaxdebug)
ast_log(LOG_DEBUG, "Received packet %d, (%d, %d)\n", fh->oseqno, f.frametype, f.subclass);
/* Check if it's out of order (and not an ACK or INVAL) */
- fr.oseqno = fh->oseqno;
- fr.iseqno = fh->iseqno;
- fr.ts = ntohl(fh->ts);
+ fr->oseqno = fh->oseqno;
+ fr->iseqno = fh->iseqno;
+ fr->ts = ntohl(fh->ts);
#ifdef IAXTESTS
if (test_resync) {
if (option_debug)
- ast_log(LOG_DEBUG, "Simulating frame ts resync, was %u now %u\n", fr.ts, fr.ts + test_resync);
- fr.ts += test_resync;
+ ast_log(LOG_DEBUG, "Simulating frame ts resync, was %u now %u\n", fr->ts, fr->ts + test_resync);
+ fr->ts += test_resync;
}
#endif /* IAXTESTS */
#if 0
@@ -6549,8 +6549,8 @@
#endif
if ((ntohs(fh->dcallno) & IAX_FLAG_RETRANS) || (f.frametype != AST_FRAME_VOICE))
updatehistory = 0;
- if ((iaxs[fr.callno]->iseqno != fr.oseqno) &&
- (iaxs[fr.callno]->iseqno ||
+ if ((iaxs[fr->callno]->iseqno != fr->oseqno) &&
+ (iaxs[fr->callno]->iseqno ||
((f.subclass != IAX_COMMAND_TXCNT) &&
(f.subclass != IAX_COMMAND_TXREADY) && /* for attended transfer */
(f.subclass != IAX_COMMAND_TXREL) && /* for attended transfer */
@@ -6570,8 +6570,8 @@
/* If it's not an ACK packet, it's out of order. */
if (option_debug)
ast_log(LOG_DEBUG, "Packet arrived out of order (expecting %d, got %d) (frametype = %d, subclass = %d)\n",
- iaxs[fr.callno]->iseqno, fr.oseqno, f.frametype, f.subclass);
- if (iaxs[fr.callno]->iseqno > fr.oseqno) {
+ iaxs[fr->callno]->iseqno, fr->oseqno, f.frametype, f.subclass);
+ if (iaxs[fr->callno]->iseqno > fr->oseqno) {
/* If we've already seen it, ack it XXX There's a border condition here XXX */
if ((f.frametype != AST_FRAME_IAX) ||
((f.subclass != IAX_COMMAND_ACK) && (f.subclass != IAX_COMMAND_INVAL))) {
@@ -6579,13 +6579,13 @@
ast_log(LOG_DEBUG, "Acking anyway\n");
/* XXX Maybe we should handle its ack to us, but then again, it's probably outdated anyway, and if
we have anything to send, we'll retransmit and get an ACK back anyway XXX */
- send_command_immediate(iaxs[fr.callno], AST_FRAME_IAX, IAX_COMMAND_ACK, fr.ts, NULL, 0,fr.iseqno);
+ send_command_immediate(iaxs[fr->callno], AST_FRAME_IAX, IAX_COMMAND_ACK, fr->ts, NULL, 0,fr->iseqno);
}
} else {
/* Send a VNAK requesting retransmission */
- iax2_vnak(fr.callno);
+ iax2_vnak(fr->callno);
}
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
} else {
@@ -6596,67 +6596,67 @@
(f.subclass != IAX_COMMAND_TXACC) &&
(f.subclass != IAX_COMMAND_VNAK)) ||
(f.frametype != AST_FRAME_IAX))
- iaxs[fr.callno]->iseqno++;
+ iaxs[fr->callno]->iseqno++;
}
/* A full frame */
if (res < sizeof(struct ast_iax2_full_hdr)) {
ast_log(LOG_WARNING, "midget packet received (%d of %d min)\n", res, (int)sizeof(struct ast_iax2_full_hdr));
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
f.datalen = res - sizeof(struct ast_iax2_full_hdr);
/* Handle implicit ACKing unless this is an INVAL, and only if this is
from the real peer, not the transfer peer */
- if (!inaddrcmp(&sin, &iaxs[fr.callno]->addr) &&
+ if (!inaddrcmp(&sin, &iaxs[fr->callno]->addr) &&
((f.subclass != IAX_COMMAND_INVAL) ||
(f.frametype != AST_FRAME_IAX))) {
unsigned char x;
/* XXX This code is not very efficient. Surely there is a better way which still
properly handles boundary conditions? XXX */
/* First we have to qualify that the ACKed value is within our window */
- for (x=iaxs[fr.callno]->rseqno; x != iaxs[fr.callno]->oseqno; x++)
- if (fr.iseqno == x)
+ for (x=iaxs[fr->callno]->rseqno; x != iaxs[fr->callno]->oseqno; x++)
+ if (fr->iseqno == x)
break;
- if ((x != iaxs[fr.callno]->oseqno) || (iaxs[fr.callno]->oseqno == fr.iseqno)) {
+ if ((x != iaxs[fr->callno]->oseqno) || (iaxs[fr->callno]->oseqno == fr->iseqno)) {
/* The acknowledgement is within our window. Time to acknowledge everything
that it says to */
- for (x=iaxs[fr.callno]->rseqno; x != fr.iseqno; x++) {
+ for (x=iaxs[fr->callno]->rseqno; x != fr->iseqno; x++) {
/* Ack the packet with the given timestamp */
if (option_debug && iaxdebug)
ast_log(LOG_DEBUG, "Cancelling transmission of packet %d\n", x);
ast_mutex_lock(&iaxq.lock);
for (cur = iaxq.head; cur ; cur = cur->next) {
/* If it's our call, and our timestamp, mark -1 retries */
- if ((fr.callno == cur->callno) && (x == cur->oseqno)) {
+ if ((fr->callno == cur->callno) && (x == cur->oseqno)) {
cur->retries = -1;
/* Destroy call if this is the end */
if (cur->final) {
if (iaxdebug && option_debug)
- ast_log(LOG_DEBUG, "Really destroying %d, having been acked on final message\n", fr.callno);
- iax2_destroy_nolock(fr.callno);
+ ast_log(LOG_DEBUG, "Really destroying %d, having been acked on final message\n", fr->callno);
+ iax2_destroy_nolock(fr->callno);
}
}
}
ast_mutex_unlock(&iaxq.lock);
}
/* Note how much we've received acknowledgement for */
- if (iaxs[fr.callno])
- iaxs[fr.callno]->rseqno = fr.iseqno;
+ if (iaxs[fr->callno])
+ iaxs[fr->callno]->rseqno = fr->iseqno;
else {
/* Stop processing now */
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
} else
- ast_log(LOG_DEBUG, "Received iseqno %d not within window %d->%d\n", fr.iseqno, iaxs[fr.callno]->rseqno, iaxs[fr.callno]->oseqno);
- }
- if (inaddrcmp(&sin, &iaxs[fr.callno]->addr) &&
+ ast_log(LOG_DEBUG, "Received iseqno %d not within window %d->%d\n", fr->iseqno, iaxs[fr->callno]->rseqno, iaxs[fr->callno]->oseqno);
+ }
+ if (inaddrcmp(&sin, &iaxs[fr->callno]->addr) &&
((f.frametype != AST_FRAME_IAX) ||
((f.subclass != IAX_COMMAND_TXACC) &&
(f.subclass != IAX_COMMAND_TXCNT)))) {
/* Only messages we accept from a transfer host are TXACC and TXCNT */
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
@@ -6664,7 +6664,7 @@
if (f.frametype == AST_FRAME_IAX) {
if (iax_parse_ies(&ies, thread->buf + sizeof(struct ast_iax2_full_hdr), f.datalen)) {
ast_log(LOG_WARNING, "Undecodable frame received from '%s'\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr));
- ast_mutex_unlock(&iaxsl[fr.callno]);
+ ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
f.data = NULL;
@@ -6678,59 +6678,59 @@
memset(&ies, 0, sizeof(ies));
}
if (f.frametype == AST_FRAME_VOICE) {
- if (f.subclass != iaxs[fr.callno]->voiceformat) {
- iaxs[fr.callno]->voiceformat = f.subclass;
+ if (f.subclass != iaxs[fr->callno]->voiceformat) {
+ iaxs[fr->callno]->voiceformat = f.subclass;
ast_log(LOG_DEBUG, "Ooh, voice format changed to %d\n", f.subclass);
- if (iaxs[fr.callno]->owner) {
+ if (iaxs[fr->callno]->owner) {
int orignative;
retryowner:
[... 2548 lines stripped ...]
More information about the svn-commits
mailing list