[asterisk-commits] murf: branch murf/masqpark r160546 - in /team/murf/masqpark: ./ agi/ apps/ ch...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 3 10:14:08 CST 2008
Author: murf
Date: Wed Dec 3 10:14:07 2008
New Revision: 160546
URL: http://svn.digium.com/view/asterisk?view=rev&rev=160546
Log:
Merged revisions 158483,158539,158600,158603,158629,159025,159096,159158,159246,159269,159316,159476,159571,159808,159897,159900,159976,160003,160207,160266,160297,160390,160411,160480 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r158483 | murf | 2008-11-21 14:19:47 -0700 (Fri, 21 Nov 2008) | 11 lines
(closes issue #13871)
Reported by: mdu113
This one is totally my fault. The code doesn't even
create a bridge if the channel CDR has POST_DISABLED.
I didn't check for that at the end of the bridge.
Fixed with a few small insertions. Tested. Looks
good. No cdr generated, no crash, no unnecc. data
objects created either.
................
r158539 | russell | 2008-11-21 15:05:55 -0700 (Fri, 21 Nov 2008) | 2 lines
When compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock
................
r158600 | tilghman | 2008-11-21 16:07:46 -0700 (Fri, 21 Nov 2008) | 5 lines
The passed extension may not be the same in the list as the current entry,
because we strip spaces when copying the extension into the structure.
Therefore, use the copied item to place the item into the list.
(found by lmadsen on -dev, fixed by me)
................
r158603 | murf | 2008-11-21 16:14:50 -0700 (Fri, 21 Nov 2008) | 11 lines
In reference to the fix made for 13871, I was
merging the fix into 1.6.0 and realized I missed
the code in the h-exten block, and didn't catch it
because my test case had the h-exten commented out.
So, this corrects the code I missed, as a
preventative against another crash report.
Tested with the h-exten defined, all is well.
................
r158629 | jpeeler | 2008-11-21 17:04:36 -0700 (Fri, 21 Nov 2008) | 5 lines
(closes issue #13786)
Reported by: tzafrir
When compiling against Zaptel dahdi_compat will now only define all the DAHDI defines if the Zaptel define is present. Also, there is no such thing as DAHDI_PRI.
................
r159025 | tilghman | 2008-11-24 21:50:00 -0700 (Mon, 24 Nov 2008) | 3 lines
System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)
................
r159096 | twilson | 2008-11-25 09:23:38 -0700 (Tue, 25 Nov 2008) | 2 lines
Add missing variable declaration in the PPC code
................
r159158 | russell | 2008-11-25 10:34:50 -0700 (Tue, 25 Nov 2008) | 2 lines
Add ao2_trylock() to go along with ao2_lock() and ao2_unlock()
................
r159246 | tilghman | 2008-11-25 14:40:28 -0700 (Tue, 25 Nov 2008) | 14 lines
Merged revisions 159245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r159245 | tilghman | 2008-11-25 15:37:06 -0600 (Tue, 25 Nov 2008) | 7 lines
Regression fix for last security fix. Set the iseqno correctly.
(closes issue #13918)
Reported by: ffloimair
Patches:
20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
Tested by: ffloimair
........
................
r159269 | tilghman | 2008-11-25 14:56:48 -0700 (Tue, 25 Nov 2008) | 7 lines
Don't try to send a response on a NULL pvt.
(closes issue #13919)
Reported by: barthpbx
Patches:
chan_iax2.c.patch uploaded by eliel (license 64)
Tested by: barthpbx
................
r159316 | murf | 2008-11-25 15:41:10 -0700 (Tue, 25 Nov 2008) | 15 lines
(closes issue #12694)
Reported by: yraber
Patches:
12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav
Thanks to file (Joshua Colp) for his IAX fix.
the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.
................
r159476 | kpfleming | 2008-11-26 11:36:24 -0700 (Wed, 26 Nov 2008) | 7 lines
simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
add channels/busy.h and channels/ringtone.h to the repository instead of generating them repeatedtly; most users do not change the settings to build them, but the Makefile rules are still there if they wish to do so
ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode
................
r159571 | kpfleming | 2008-11-26 13:21:04 -0700 (Wed, 26 Nov 2008) | 2 lines
rename these files so as to avoid conflicts when users update their working copies and have unversioned files already in place
................
r159808 | kpfleming | 2008-11-29 09:58:29 -0700 (Sat, 29 Nov 2008) | 7 lines
update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors
since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them
format attributes in a consistent way
................
r159897 | mvanbaak | 2008-12-01 07:05:41 -0700 (Mon, 01 Dec 2008) | 4 lines
make manager compile on OpenBSD.
The last (10th) argument to ast_channel_alloc here should be a pointer
and NULL is not really a pointer.
................
r159900 | russell | 2008-12-01 07:52:56 -0700 (Mon, 01 Dec 2008) | 2 lines
Force a "make clean" to avoid a bizarre build issue ...
................
r159976 | mvanbaak | 2008-12-01 09:08:36 -0700 (Mon, 01 Dec 2008) | 3 lines
Get rid of the useless format string and argument in the Bogus/ manager channelname.
Noted by kpfleming and name Bogus/manager suggested by eliel
................
r160003 | russell | 2008-12-01 10:27:30 -0700 (Mon, 01 Dec 2008) | 6 lines
Apply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
both have the potential to send control frames in the middle of call setup. We
have to wait until we have received a message back from the remote end before
we try to send any more frames. Otherwise, the remote end will consider it
invalid, and we'll get stuck in an INVAL/VNAK storm.
................
r160207 | tilghman | 2008-12-01 17:25:16 -0700 (Mon, 01 Dec 2008) | 3 lines
Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
and glibc.
................
r160266 | twilson | 2008-12-01 18:16:30 -0700 (Mon, 01 Dec 2008) | 2 lines
make compile with dev mode and malloc debug
................
r160297 | tilghman | 2008-12-02 10:42:09 -0700 (Tue, 02 Dec 2008) | 10 lines
When the text does not match exactly (e.g. RTP/SAVP), then the %n conversion
fails, and the resulting integer is garbage. Thus, we must initialize the
integer and check it afterwards for success.
(closes issue #14000)
Reported by: folke
Patches:
asterisk-sipbg-sscanf-1.4.22.diff uploaded by folke (license 626)
asterisk-sipbg-sscanf-1.6.0.1.diff uploaded by folke (license 626)
asterisk-sipbg-sscanf-trunk-r159896.diff uploaded by folke (license 626)
................
r160390 | twilson | 2008-12-02 16:04:23 -0700 (Tue, 02 Dec 2008) | 6 lines
A situation like A calls B, A builtin_atxfers B to C, C parks B would lead to a crash. Thanks to file for telling me how to fix it!
(closes issue #13854)
Reported by: Adam Lee
Tested by: otherwiseguy
................
r160411 | twilson | 2008-12-02 16:58:08 -0700 (Tue, 02 Dec 2008) | 2 lines
Channel is masqueraded, don't keep alive
................
r160480 | tilghman | 2008-12-03 07:09:35 -0700 (Wed, 03 Dec 2008) | 7 lines
Jon Bonilla (Manwe) pointed out on the -dev list:
"I guess that having only ip-phones in mind is not a good approach. Since it is
possible to have a sip proxy connected to asterisk we could receive a 407
(unauthorized) or 483 (too many hops) as response and dialog ending would not be
a good behavior."
So modified.
................
Added:
team/murf/masqpark/channels/busy_tone.h
- copied unchanged from r160480, branches/1.4/channels/busy_tone.h
team/murf/masqpark/channels/ring_tone.h
- copied unchanged from r160480, branches/1.4/channels/ring_tone.h
Modified:
team/murf/masqpark/ (props changed)
team/murf/masqpark/.cleancount
team/murf/masqpark/Makefile
team/murf/masqpark/Makefile.moddir_rules
team/murf/masqpark/Makefile.rules
team/murf/masqpark/agi/Makefile
team/murf/masqpark/apps/app_festival.c
team/murf/masqpark/apps/app_rpt.c
team/murf/masqpark/apps/app_voicemail.c
team/murf/masqpark/channels/ (props changed)
team/murf/masqpark/channels/Makefile
team/murf/masqpark/channels/chan_agent.c
team/murf/masqpark/channels/chan_alsa.c
team/murf/masqpark/channels/chan_dahdi.c
team/murf/masqpark/channels/chan_iax2.c
team/murf/masqpark/channels/chan_misdn.c
team/murf/masqpark/channels/chan_oss.c
team/murf/masqpark/channels/chan_sip.c
team/murf/masqpark/channels/chan_vpb.cc
team/murf/masqpark/configure
team/murf/masqpark/configure.ac
team/murf/masqpark/include/asterisk/astmm.h
team/murf/masqpark/include/asterisk/astobj2.h
team/murf/masqpark/include/asterisk/autoconfig.h.in
team/murf/masqpark/include/asterisk/channel.h
team/murf/masqpark/include/asterisk/cli.h
team/murf/masqpark/include/asterisk/dahdi_compat.h
team/murf/masqpark/include/asterisk/devicestate.h
team/murf/masqpark/include/asterisk/dundi.h
team/murf/masqpark/include/asterisk/linkedlists.h
team/murf/masqpark/include/asterisk/lock.h
team/murf/masqpark/include/asterisk/logger.h
team/murf/masqpark/include/asterisk/manager.h
team/murf/masqpark/include/asterisk/module.h
team/murf/masqpark/include/asterisk/res_odbc.h
team/murf/masqpark/include/asterisk/stringfields.h
team/murf/masqpark/include/asterisk/strings.h
team/murf/masqpark/include/asterisk/threadstorage.h
team/murf/masqpark/include/asterisk/utils.h
team/murf/masqpark/include/jitterbuf.h
team/murf/masqpark/main/ast_expr2.c
team/murf/masqpark/main/astobj2.c
team/murf/masqpark/main/cdr.c
team/murf/masqpark/main/dns.c
team/murf/masqpark/main/enum.c
team/murf/masqpark/main/frame.c
team/murf/masqpark/main/jitterbuf.c
team/murf/masqpark/main/logger.c
team/murf/masqpark/main/manager.c
team/murf/masqpark/main/pbx.c
team/murf/masqpark/main/srv.c
team/murf/masqpark/makeopts.in
team/murf/masqpark/res/res_agi.c
team/murf/masqpark/res/res_features.c
team/murf/masqpark/utils/Makefile
team/murf/masqpark/utils/astman.c
team/murf/masqpark/utils/check_expr.c
team/murf/masqpark/utils/frame.c
Propchange: team/murf/masqpark/
------------------------------------------------------------------------------
automerge = yes
Propchange: team/murf/masqpark/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/murf/masqpark/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Dec 3 10:14:07 2008
@@ -1,1 +1,1 @@
-/branches/1.4:1-158336
+/branches/1.4:1-160544
Modified: team/murf/masqpark/.cleancount
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/.cleancount?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/.cleancount (original)
+++ team/murf/masqpark/.cleancount Wed Dec 3 10:14:07 2008
@@ -1,1 +1,1 @@
-32
+33
Modified: team/murf/masqpark/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/Makefile?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/Makefile (original)
+++ team/murf/masqpark/Makefile Wed Dec 3 10:14:07 2008
@@ -204,7 +204,14 @@
ASTCFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
ifeq ($(AST_DEVMODE),yes)
- ASTCFLAGS+=-Werror -Wunused $(AST_DECLARATION_AFTER_STATEMENT)
+ ASTCFLAGS+=-Werror
+ ASTCFLAGS+=-Wunused
+ ASTCFLAGS+=$(AST_DECLARATION_AFTER_STATEMENT)
+ ASTCFLAGS+=$(AST_FORTIFY_SOURCE)
+# ASTCFLAGS+=-Wundef
+ ASTCFLAGS+=-Wformat -Wformat-security
+ ASTCFLAGS+=-Wmissing-format-attribute
+# ASTCFLAGS+=-Wformat=2
endif
ifneq ($(findstring BSD,$(OSARCH)),)
Modified: team/murf/masqpark/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/Makefile.moddir_rules?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/Makefile.moddir_rules (original)
+++ team/murf/masqpark/Makefile.moddir_rules Wed Dec 3 10:14:07 2008
@@ -65,7 +65,7 @@
clean::
rm -f *.so *.o *.oo *.s *.i *.ii
- rm -f .*.o.d .*.oo.d
+ rm -f .*.d
rm -f modules.link
install:: all
@@ -76,7 +76,6 @@
dist-clean::
rm -f .*.moduleinfo .moduleinfo
rm -f .*.makeopts .makeopts
- rm -f .*.d
.%.moduleinfo: %.c
@echo "<member name=\"$*\" displayname=\"$(shell $(GREP) -e AST_MODULE_INFO $< | head -n 1 | cut -d '"' -f 2)\" remove_on_change=\"$(SUBDIR)/$*.o $(SUBDIR)/$*.so\">" > $@
Modified: team/murf/masqpark/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/Makefile.rules?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/Makefile.rules (original)
+++ team/murf/masqpark/Makefile.rules Wed Dec 3 10:14:07 2008
@@ -18,6 +18,11 @@
-include $(ASTTOPDIR)/makeopts
.PHONY: dist-clean
+
+# If 'make' decides to create intermediate files to satisfy a build requirement
+# (like producing a .i from a .c), we want to keep them, so tell make to keep
+# all intermediate files
+.SECONDARY:
# extra cflags to build dependencies. Recursively expanded.
MAKE_DEPS=-MD -MT $@ -MF .$(subst /,_,$@).d -MP
@@ -74,13 +79,9 @@
endif
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
+ifneq ($(COMPILE_DOUBLE),yes)
%.o: %.c
$(ECHO_PREFIX) echo " [CC] $< -> $@"
-ifeq ($(COMPILE_DOUBLE),yes)
- $(CMD_PREFIX) $(CC) -o $(@:%.o=%.i) -E $< $(CC_CFLAGS) $(MAKE_DEPS)
- $(CMD_PREFIX) $(CC) -o /dev/null -c $(@:%.o=%.i) $(CC_CFLAGS) $(OPTIMIZE)
- $(CMD_PREFIX) $(CC) -o $@ -c $(@:%.o=%.i) $(CC_CFLAGS)
-else
$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(MAKE_DEPS)
endif
@@ -95,13 +96,9 @@
endif
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
+ifneq ($(COMPILE_DOUBLE),yes)
%.oo: %.cc
$(ECHO_PREFIX) echo " [CXX] $< -> $@"
-ifeq ($(COMPILE_DOUBLE),yes)
- $(CMD_PREFIX) $(CXX) -o $(@:%.oo=%.ii) -E $< $(CXX_CFLAGS) $(MAKE_DEPS)
- $(CMD_PREFIX) $(CXX) -o /dev/null -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS) $(OPTIMIZE)
- $(CMD_PREFIX) $(CXX) -o $@ -c $(@:%.oo=%.ii) $(CXX_CFLAGS) $(MAKE_DEPS)
-else
$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(MAKE_DEPS)
endif
Modified: team/murf/masqpark/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/agi/Makefile?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/agi/Makefile (original)
+++ team/murf/masqpark/agi/Makefile Wed Dec 3 10:14:07 2008
@@ -39,7 +39,7 @@
clean:
rm -f *.so *.o look eagi-test eagi-sphinx-test
- rm -f .*.o.d .*.oo.d *.s *.i
+ rm -f .*.d *.s *.i
rm -f strcompat.c
ifneq ($(wildcard .*.d),)
Modified: team/murf/masqpark/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/apps/app_festival.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/apps/app_festival.c (original)
+++ team/murf/masqpark/apps/app_festival.c Wed Dec 3 10:14:07 2008
@@ -130,6 +130,7 @@
int x;
#ifdef __PPC__
char c;
+ int x;
#endif
sigset_t fullset, oldset;
Modified: team/murf/masqpark/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/apps/app_rpt.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/apps/app_rpt.c (original)
+++ team/murf/masqpark/apps/app_rpt.c Wed Dec 3 10:14:07 2008
@@ -273,7 +273,9 @@
#include <sys/time.h>
#include <sys/file.h>
#include <sys/ioctl.h>
+#ifdef HAVE_SYS_IO_H
#include <sys/io.h>
+#endif
#include <sys/vfs.h>
#include <math.h>
#include <netinet/in.h>
@@ -3362,6 +3364,7 @@
{
res = set_ic706(myrpt);
}
+#ifdef HAVE_IOPERM
else if(!strcmp(myrpt->remote, remote_rig_rbi))
{
if (ioperm(myrpt->p.iobase,1,1) == -1)
@@ -3372,6 +3375,7 @@
}
else res = setrbi(myrpt);
}
+#endif
else if(!strcmp(myrpt->remote, remote_rig_kenwood))
{
res = setkenwood(myrpt);
@@ -10987,6 +10991,7 @@
}
rpt_mutex_lock(&myrpt->lock);
}
+#ifdef HAVE_IOPERM
if ((!strcmp(myrpt->remote, remote_rig_rbi)) &&
(ioperm(myrpt->p.iobase,1,1) == -1))
{
@@ -10994,6 +10999,7 @@
ast_log(LOG_WARNING, "Cant get io permission on IO port %x hex\n",myrpt->p.iobase);
return -1;
}
+#endif
myrpt->remoteon = 1;
#ifdef OLD_ASTERISK
LOCAL_USER_ADD(u);
Modified: team/murf/masqpark/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/apps/app_voicemail.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/apps/app_voicemail.c (original)
+++ team/murf/masqpark/apps/app_voicemail.c Wed Dec 3 10:14:07 2008
@@ -2287,7 +2287,9 @@
}
}
}
- truncate(full_fn, fdlen);
+ if (truncate(full_fn, fdlen) < 0) {
+ ast_log(LOG_WARNING, "Unable to truncate '%s': %s\n", full_fn, strerror(errno));
+ }
}
} else {
SQLLEN ind;
Propchange: team/murf/masqpark/channels/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Dec 3 10:14:07 2008
@@ -7,7 +7,5 @@
*.moduleinfo
*.s
*.so
-busy.h
gentone
modules.link
-ringtone.h
Modified: team/murf/masqpark/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/Makefile?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/Makefile (original)
+++ team/murf/masqpark/channels/Makefile Wed Dec 3 10:14:07 2008
@@ -66,7 +66,7 @@
include $(ASTTOPDIR)/Makefile.moddir_rules
clean::
- rm -f busy.h ringtone.h gentone
+ rm -f gentone
$(MAKE) -C misdn clean
ifneq ($(wildcard h323/Makefile.ast),)
@@ -94,17 +94,13 @@
$(CMD_PREFIX) $(HOST_CC) $(STATIC_BUILD) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(LIBS)
gentone: LIBS+=-lm
-busy.h: gentone
- ./gentone busy 480 620
+busy_tone.h:
+ ./gentone busy_tone 480 620
-ringtone.h: gentone
- ./gentone ringtone 440 480
-
-chan_oss.o: busy.h ringtone.h
+ring_tone.h:
+ ./gentone ring_tone 440 480
$(if $(filter chan_iax2,$(EMBEDDED_MODS)),modules.link,chan_iax2.so): iax2-parser.o iax2-provision.o
-
-chan_alsa.o: busy.h ringtone.h
ifeq ($(OSARCH),linux-gnu)
chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
Modified: team/murf/masqpark/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_agent.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_agent.c (original)
+++ team/murf/masqpark/channels/chan_agent.c Wed Dec 3 10:14:07 2008
@@ -1035,7 +1035,7 @@
}
#endif
if (p->pending)
- tmp = ast_channel_alloc(0, state, 0, 0, "", p->chan ? p->chan->exten:"", p->chan ? p->chan->context:"", 0, "Agent/P%s-%d", p->agent, ast_random() & 0xffff);
+ tmp = ast_channel_alloc(0, state, 0, 0, "", p->chan ? p->chan->exten:"", p->chan ? p->chan->context:"", 0, "Agent/P%s-%d", p->agent, (int) ast_random() & 0xffff);
else
tmp = ast_channel_alloc(0, state, 0, 0, "", p->chan ? p->chan->exten:"", p->chan ? p->chan->context:"", 0, "Agent/%s", p->agent);
if (!tmp) {
Modified: team/murf/masqpark/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_alsa.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_alsa.c (original)
+++ team/murf/masqpark/channels/chan_alsa.c Wed Dec 3 10:14:07 2008
@@ -63,8 +63,8 @@
#include "asterisk/abstract_jb.h"
#include "asterisk/musiconhold.h"
-#include "busy.h"
-#include "ringtone.h"
+#include "busy_tone.h"
+#include "ring_tone.h"
#include "ring10.h"
#include "answer.h"
Modified: team/murf/masqpark/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_dahdi.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_dahdi.c (original)
+++ team/murf/masqpark/channels/chan_dahdi.c Wed Dec 3 10:14:07 2008
@@ -11998,7 +11998,7 @@
* AST_MODULE_INFO(, , "DAHDI Telephony"
*/
-#ifdef DAHDI_PRI
+#ifdef HAVE_PRI
#define tdesc "DAHDI Telephony w/PRI"
#else
#define tdesc "DAHDI Telephony"
Modified: team/murf/masqpark/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_iax2.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_iax2.c (original)
+++ team/murf/masqpark/channels/chan_iax2.c Wed Dec 3 10:14:07 2008
@@ -770,7 +770,7 @@
ast_log(LOG_WARNING, "%s", data);
}
-static void jb_error_output(const char *fmt, ...)
+static void __attribute__((format(printf, 1, 2))) jb_error_output(const char *fmt, ...)
{
va_list args;
char buf[1024];
@@ -782,7 +782,7 @@
ast_log(LOG_ERROR, "%s", buf);
}
-static void jb_warning_output(const char *fmt, ...)
+static void __attribute__((format(printf, 1, 2))) jb_warning_output(const char *fmt, ...)
{
va_list args;
char buf[1024];
@@ -794,7 +794,7 @@
ast_log(LOG_WARNING, "%s", buf);
}
-static void jb_debug_output(const char *fmt, ...)
+static void __attribute__((format(printf, 1, 2))) jb_debug_output(const char *fmt, ...)
{
va_list args;
char buf[1024];
@@ -3225,7 +3225,7 @@
static int send_apathetic_reply(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int command, int ts, unsigned char seqno)
{
struct ast_iax2_full_hdr f = { .scallno = htons(0x8000 | callno), .dcallno = htons(dcallno),
- .ts = htonl(ts), .iseqno = seqno, .oseqno = seqno, .type = AST_FRAME_IAX,
+ .ts = htonl(ts), .iseqno = seqno, .oseqno = 0, .type = AST_FRAME_IAX,
.csub = compress_subclass(command) };
return sendto(defaultsockfd, &f, sizeof(f), 0, (struct sockaddr *)sin, sizeof(*sin));
@@ -3481,6 +3481,28 @@
return 0;
}
+/*!
+ * \note expects the pvt to be locked
+ */
+static int wait_for_peercallno(struct chan_iax2_pvt *pvt)
+{
+ unsigned short callno = pvt->callno;
+
+ if (!pvt->peercallno) {
+ /* We don't know the remote side's call number, yet. :( */
+ int count = 10;
+ while (count-- && pvt && !pvt->peercallno) {
+ DEADLOCK_AVOIDANCE(&iaxsl[callno]);
+ pvt = iaxs[callno];
+ }
+ if (!pvt->peercallno) {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
static int iax2_setoption(struct ast_channel *c, int option, void *data, int datalen)
{
struct ast_option_header *h;
@@ -3493,8 +3515,23 @@
errno = ENOSYS;
return -1;
default:
- if (!(h = ast_malloc(datalen + sizeof(*h))))
+ {
+ unsigned short callno = PTR_TO_CALLNO(c->tech_pvt);
+ struct chan_iax2_pvt *pvt;
+
+ ast_mutex_lock(&iaxsl[callno]);
+ pvt = iaxs[callno];
+
+ if (wait_for_peercallno(pvt)) {
+ ast_mutex_unlock(&iaxsl[callno]);
return -1;
+ }
+
+ ast_mutex_unlock(&iaxsl[callno]);
+
+ if (!(h = ast_malloc(datalen + sizeof(*h)))) {
+ return -1;
+ }
h->flag = AST_OPTION_FLAG_REQUEST;
h->option = htons(option);
@@ -3504,6 +3541,7 @@
datalen + sizeof(*h), -1);
free(h);
return res;
+ }
}
}
@@ -3724,17 +3762,9 @@
ast_mutex_lock(&iaxsl[callno]);
pvt = iaxs[callno];
- if (!pvt->peercallno) {
- /* We don't know the remote side's call number, yet. :( */
- int count = 10;
- while (count-- && pvt && !pvt->peercallno) {
- DEADLOCK_AVOIDANCE(&iaxsl[callno]);
- pvt = iaxs[callno];
- }
- if (!pvt->peercallno) {
- res = -1;
- goto done;
- }
+ if (wait_for_peercallno(pvt)) {
+ res = -1;
+ goto done;
}
switch (condition) {
@@ -6271,7 +6301,7 @@
/* Make sure our call still exists, an INVAL at the right point may make it go away */
if (!iaxs[callno]) {
- res = 0;
+ res = -1;
goto return_unref;
}
@@ -7225,7 +7255,7 @@
/* Deal with POKE/PONG without allocating a callno */
if (f.frametype == AST_FRAME_IAX && f.subclass == IAX_COMMAND_POKE) {
/* Reply back with a PONG, but don't care about the result. */
- send_apathetic_reply(1, ntohs(fh->scallno), &sin, IAX_COMMAND_PONG, ntohs(fh->ts), fh->oseqno);
+ send_apathetic_reply(1, ntohs(fh->scallno), &sin, IAX_COMMAND_PONG, ntohs(fh->ts), fh->iseqno + 1);
return 1;
} else if (f.frametype == AST_FRAME_IAX && f.subclass == IAX_COMMAND_ACK && dcallno == 1) {
/* Ignore */
@@ -7532,6 +7562,13 @@
if (option_debug)
ast_log(LOG_DEBUG, "Ooh, video format changed to %d\n", f.subclass & ~0x1);
iaxs[fr->callno]->videoformat = f.subclass & ~0x1;
+ }
+ }
+ if (f.frametype == AST_FRAME_CONTROL && iaxs[fr->callno]->owner) {
+ if (f.subclass == AST_CONTROL_BUSY) {
+ iaxs[fr->callno]->owner->hangupcause = AST_CAUSE_BUSY;
+ } else if (f.subclass == AST_CONTROL_CONGESTION) {
+ iaxs[fr->callno]->owner->hangupcause = AST_CAUSE_CONGESTION;
}
}
if (f.frametype == AST_FRAME_IAX) {
Modified: team/murf/masqpark/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_misdn.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_misdn.c (original)
+++ team/murf/masqpark/channels/chan_misdn.c Wed Dec 3 10:14:07 2008
@@ -291,7 +291,7 @@
static int *misdn_ports;
static void chan_misdn_log(int level, int port, char *tmpl, ...)
- __attribute__ ((format (printf, 3, 4)));
+ __attribute__((format(printf, 3, 4)));
static struct ast_channel *misdn_new(struct chan_list *cl, int state, char *exten, char *callerid, int format, int port, int c);
static void send_digit_to_chan(struct chan_list *cl, char digit );
Modified: team/murf/masqpark/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_oss.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_oss.c (original)
+++ team/murf/masqpark/channels/chan_oss.c Wed Dec 3 10:14:07 2008
@@ -77,8 +77,8 @@
#include "asterisk/musiconhold.h"
/* ringtones we use */
-#include "busy.h"
-#include "ringtone.h"
+#include "busy_tone.h"
+#include "ring_tone.h"
#include "ring10.h"
#include "answer.h"
Modified: team/murf/masqpark/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_sip.c?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_sip.c (original)
+++ team/murf/masqpark/channels/chan_sip.c Wed Dec 3 10:14:07 2008
@@ -1813,7 +1813,7 @@
/* z9hG4bK is a magic cookie. See RFC 3261 section 8.1.1.7 */
ast_string_field_build(p, via, "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x%s",
- ast_inet_ntoa(p->ourip), ourport, p->branch, rport);
+ ast_inet_ntoa(p->ourip), ourport, (int) p->branch, rport);
}
/*! \brief NAT fix - decide which IP address to use for ASterisk server?
@@ -1859,10 +1859,10 @@
#define append_history(p, event, fmt , args... ) append_history_full(p, "%-15s " fmt, event, ## args)
static void append_history_full(struct sip_pvt *p, const char *fmt, ...)
- __attribute__ ((format (printf, 2, 3)));
+ __attribute__((format(printf, 2, 3)));
/*! \brief Append to SIP dialog history with arg list */
-static void append_history_va(struct sip_pvt *p, const char *fmt, va_list ap)
+static void __attribute__((format(printf, 2, 0))) append_history_va(struct sip_pvt *p, const char *fmt, va_list ap)
{
char buf[80], *c = buf; /* max history length */
struct sip_history *hist;
@@ -5185,8 +5185,9 @@
int audio = FALSE;
numberofports = 1;
- if ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2) ||
- (sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1)) {
+ len = -1;
+ if ((sscanf(m, "audio %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
+ (sscanf(m, "audio %d RTP/AVP %n", &x, &len) == 1 && len > 0)) {
audio = TRUE;
numberofmediastreams++;
/* Found audio stream in this media definition */
@@ -5201,8 +5202,8 @@
ast_verbose("Found RTP audio format %d\n", codec);
ast_rtp_set_m_type(newaudiortp, codec);
}
- } else if ((sscanf(m, "video %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2) ||
- (sscanf(m, "video %d RTP/AVP %n", &x, &len) == 1)) {
+ } else if ((sscanf(m, "video %d/%d RTP/AVP %n", &x, &numberofports, &len) == 2 && len > 0) ||
+ (sscanf(m, "video %d RTP/AVP %n", &x, &len) == 1 && len >= 0)) {
/* If it is not audio - is it video ? */
ast_clear_flag(&p->flags[0], SIP_NOVIDEO);
numberofmediastreams++;
@@ -5217,8 +5218,8 @@
ast_verbose("Found RTP video format %d\n", codec);
ast_rtp_set_m_type(newvideortp, codec);
}
- } else if (p->udptl && ( (sscanf(m, "image %d udptl t38%n", &x, &len) == 1) ||
- (sscanf(m, "image %d UDPTL t38%n", &x, &len) == 1) )) {
+ } else if (p->udptl && ( (sscanf(m, "image %d udptl t38%n", &x, &len) == 1 && len > 0) ||
+ (sscanf(m, "image %d UDPTL t38%n", &x, &len) == 1 && len >= 0) )) {
if (debug)
ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
udptlportno = x;
@@ -12872,13 +12873,12 @@
/* RFC 3261 Section 15 specifies that if we receive a 408 or 481
* in response to a BYE, then we should end the current dialog
- * and session. There is no mention in the spec of other 4XX responses,
- * but it is known that at least one phone manufacturer potentially
- * will send a 404 in response to a BYE, so we'll be liberal in what
- * we accept and end the dialog and session if we receive any 4XX
- * response to a BYE.
+ * and session. It is known that at least one phone manufacturer
+ * potentially will send a 404 in response to a BYE, so we'll be
+ * liberal in what we accept and end the dialog and session if we
+ * receive any of those responses to a BYE.
*/
- if (resp >= 400 && resp < 500 && sipmethod == SIP_BYE) {
+ if ((resp == 404 || resp == 408 || resp == 481) && sipmethod == SIP_BYE) {
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
return;
}
Modified: team/murf/masqpark/channels/chan_vpb.cc
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/channels/chan_vpb.cc?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/channels/chan_vpb.cc (original)
+++ team/murf/masqpark/channels/chan_vpb.cc Wed Dec 3 10:14:07 2008
@@ -2495,7 +2495,7 @@
}
ast_verb(4, "%s: New call for context [%s]\n", me->dev, context);
- tmp = ast_channel_alloc(1, state, 0, 0, "", me->ext, me->context, 0, me->dev);
+ tmp = ast_channel_alloc(1, state, 0, 0, "", me->ext, me->context, 0, "%s", me->dev);
if (tmp) {
if (use_ast_ind == 1){
tmp->tech = &vpb_tech_indicate;
Modified: team/murf/masqpark/configure.ac
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/configure.ac?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/configure.ac (original)
+++ team/murf/masqpark/configure.ac Wed Dec 3 10:14:07 2008
@@ -223,7 +223,7 @@
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
AC_SYS_LARGEFILE
@@ -265,7 +265,7 @@
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf])
+AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf ioperm])
# some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])
@@ -351,18 +351,28 @@
AC_MSG_RESULT(yes)
AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
else
- AC_MSG_RESULT(no)
- AST_DECLARATION_AFTER_STATEMENT=
+ AC_MSG_RESULT(no)
+ AST_DECLARATION_AFTER_STATEMENT=
fi
AC_SUBST(AST_DECLARATION_AFTER_STATEMENT)
+
+AC_MSG_CHECKING(for _FORTIFY_SOURCE support)
+if $(${CC} -D_FORTIFY_SOURCE=2 -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+ AC_MSG_RESULT(yes)
+ AST_FORTIFY_SOURCE=-D_FORTIFY_SOURCE=2
+else
+ AC_MSG_RESULT(no)
+ AST_FORTIFY_SOURCE=
+fi
+AC_SUBST(AST_FORTIFY_SOURCE)
AC_MSG_CHECKING(for -fno-strict-overflow)
if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
AC_MSG_RESULT(yes)
AST_NO_STRICT_OVERFLOW=-fno-strict-overflow
else
- AC_MSG_RESULT(no)
- AST_NO_STRICT_OVERFLOW=
+ AC_MSG_RESULT(no)
+ AST_NO_STRICT_OVERFLOW=
fi
AC_SUBST(AST_NO_STRICT_OVERFLOW)
Modified: team/murf/masqpark/include/asterisk/astmm.h
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/include/asterisk/astmm.h?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/include/asterisk/astmm.h (original)
+++ team/murf/masqpark/include/asterisk/astmm.h Wed Dec 3 10:14:07 2008
@@ -50,8 +50,8 @@
void *__ast_realloc(void *ptr, size_t size, const char *file, int lineno, const char *func);
char *__ast_strdup(const char *s, const char *file, int lineno, const char *func);
char *__ast_strndup(const char *s, size_t n, const char *file, int lineno, const char *func);
-int __ast_asprintf(const char *file, int lineno, const char *func, char **strp, const char *format, ...);
-int __ast_vasprintf(char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func);
+int __ast_asprintf(const char *file, int lineno, const char *func, char **strp, const char *format, ...) __attribute__((format(printf, 5, 6)));
+int __ast_vasprintf(char **strp, const char *format, va_list ap, const char *file, int lineno, const char *func) __attribute__((format(printf, 2, 0)));
void __ast_mm_init(void);
Modified: team/murf/masqpark/include/asterisk/astobj2.h
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/include/asterisk/astobj2.h?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/include/asterisk/astobj2.h (original)
+++ team/murf/masqpark/include/asterisk/astobj2.h Wed Dec 3 10:14:07 2008
@@ -185,7 +185,19 @@
* \param a A pointer to the object we want lock.
* \return 0 on success, other values on error.
*/
+#ifndef DEBUG_THREADS
int ao2_lock(void *a);
+#else
+#define ao2_lock(a) _ao2_lock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
+int _ao2_lock(void *a, const char *file, const char *func, int line, const char *var);
+#endif
+
+#ifndef DEBUG_THREADS
+int ao2_trylock(void *a);
+#else
+#define ao2_trylock(a) _ao2_trylock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
+int _ao2_trylock(void *a, const char *file, const char *func, int line, const char *var);
+#endif
/*!
* Unlock an object.
@@ -193,7 +205,12 @@
* \param a A pointer to the object we want unlock.
* \return 0 on success, other values on error.
*/
+#ifndef DEBUG_THREADS
int ao2_unlock(void *a);
+#else
+#define ao2_unlock(a) _ao2_unlock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a)
+int _ao2_unlock(void *a, const char *file, const char *func, int line, const char *var);
+#endif
/*!
*
Modified: team/murf/masqpark/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/include/asterisk/autoconfig.h.in?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/include/asterisk/autoconfig.h.in (original)
+++ team/murf/masqpark/include/asterisk/autoconfig.h.in Wed Dec 3 10:14:07 2008
@@ -178,6 +178,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `ioperm' function. */
+#undef HAVE_IOPERM
+
/* Define to 1 if your system has PMTU discovery on UDP sockets. */
#undef HAVE_IP_MTU_DISCOVER
@@ -460,6 +463,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/io.h> header file. */
+#undef HAVE_SYS_IO_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
Modified: team/murf/masqpark/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/include/asterisk/channel.h?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
--- team/murf/masqpark/include/asterisk/channel.h (original)
+++ team/murf/masqpark/include/asterisk/channel.h Wed Dec 3 10:14:07 2008
@@ -627,7 +627,7 @@
by default set to the "default" context and
extension "s"
*/
-struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const int amaflag, const char *name_fmt, ...);
+struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const int amaflag, const char *name_fmt, ...) __attribute__((format(printf, 9, 10)));
/*! \brief Queue an outgoing frame */
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f);
@@ -1152,8 +1152,7 @@
/*! return a mallocd string with the result of sprintf of the fmt and following args */
-char *ast_safe_string_alloc(const char *fmt, ...);
-
+char __attribute__((format(printf, 1, 2))) *ast_safe_string_alloc(const char *fmt, ...);
/*! Start a tone going */
Modified: team/murf/masqpark/include/asterisk/cli.h
URL: http://svn.digium.com/view/asterisk/team/murf/masqpark/include/asterisk/cli.h?view=diff&rev=160546&r1=160545&r2=160546
==============================================================================
[... 1365 lines stripped ...]
More information about the asterisk-commits
mailing list