[asterisk-commits] branch crichter/0.2.1 - r7951 in
/team/crichter/0.2.1: ./ apps/ build_tools/ ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jan 10 16:41:58 CST 2006
Author: crichter
Date: Tue Jan 10 16:41:23 2006
New Revision: 7951
URL: http://svn.digium.com/view/asterisk?rev=7951&view=rev
Log:
Merged revisions 7425,7427,7429-7430,7433,7435,7448-7449,7451,7453,7468,7470,7482,7490,7497,7508,7510,7513,7515,7517,7519,7521,7523,7529,7546,7550,7552,7557,7577,7580,7582,7586,7595,7599,7601,7605-7606,7608,7634,7637,7641,7663,7665,7677,7706,7709,7736,7738,7740,7743,7746,7771,7773,7792,7795,7799-7800,7803,7805,7807,7809,7812,7819,7823,7825,7827,7829,7831,7848,7870-7871,7898-7900,7904,7908,7915,7917,7939 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r7425 | bweschke | 2005-12-10 19:10:50 +0100 (Sa, 10 Dez 2005) | 4 lines
Bug #5877
Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.
........
r7427 | tilghman | 2005-12-11 02:15:15 +0100 (So, 11 Dez 2005) | 2 lines
Bug 5967
........
r7429 | tilghman | 2005-12-11 02:26:51 +0100 (So, 11 Dez 2005) | 2 lines
Bug 5965 - major bug in AST_LIST_REMOVE
........
r7430 | russell | 2005-12-11 07:08:56 +0100 (So, 11 Dez 2005) | 2 lines
silence a couple of compiler warnings about pointer signedness
........
r7433 | tilghman | 2005-12-12 18:19:29 +0100 (Mo, 12 Dez 2005) | 2 lines
Typo
........
r7435 | kpfleming | 2005-12-12 18:30:59 +0100 (Mo, 12 Dez 2005) | 2 lines
set all the child file descriptors to non-blocking so that we don't hang if the child fails to send a newline-terminated command or error message
........
r7448 | kpfleming | 2005-12-13 05:25:14 +0100 (Di, 13 Dez 2005) | 2 lines
use the stream's current point when pausing/unpausing, instead of elapsed time (which doesn't work when the stream has been skipped forward or backward) (issue #5897)
........
r7449 | kpfleming | 2005-12-13 05:43:38 +0100 (Di, 13 Dez 2005) | 2 lines
only report AGENT_IDLE for callback mode agents when they are actually idle (issue #5902)
........
r7451 | kpfleming | 2005-12-13 06:14:27 +0100 (Di, 13 Dez 2005) | 2 lines
ensure that hangups while incoming calls are in early state are handled properly (issue #5919)
........
r7453 | kpfleming | 2005-12-13 06:53:00 +0100 (Di, 13 Dez 2005) | 2 lines
restore ability of caller to hangup calls that are still ringing (issue #5839)
........
r7468 | kpfleming | 2005-12-13 17:06:27 +0100 (Di, 13 Dez 2005) | 2 lines
correct broken math in tvfix() for timestamp values over one million
........
r7470 | kpfleming | 2005-12-13 19:54:22 +0100 (Di, 13 Dez 2005) | 2 lines
clarify substring documentation
........
r7482 | bweschke | 2005-12-15 03:51:54 +0100 (Do, 15 Dez 2005) | 3 lines
Bug #6003 - Don't free the channel structure until after having sent the manager event.
........
r7490 | crichter | 2005-12-15 11:52:30 +0100 (Do, 15 Dez 2005) | 9 lines
* Added mISDN/mISDNuser Echo cancel Patch
* Fixed Makefiles so that chan_misdn can be compiled again
* added some hints, that mISDN cannot be compiled against gcc-4, SMP, Spinlock Debug
* fixed some Minor issues in chan_misdn, regarding Type Of Number and Presentation
........
r7497 | tilghman | 2005-12-16 01:49:39 +0100 (Fr, 16 Dez 2005) | 2 lines
First field is truncated
........
r7508 | tilghman | 2005-12-17 02:02:29 +0100 (Sa, 17 Dez 2005) | 2 lines
We want to check the previous value, not the current value (which was just changed).
........
r7510 | kpfleming | 2005-12-17 03:20:04 +0100 (Sa, 17 Dez 2005) | 2 lines
fix some buglet when building team branch version strings
........
r7513 | kpfleming | 2005-12-17 04:44:30 +0100 (Sa, 17 Dez 2005) | 2 lines
forcibly expire previous subscriptions from a peer when they resubscribe (keeps them from building up and waiting for expiration, and stops us sending unwanted NOTIFY messages to devices)
........
r7515 | kpfleming | 2005-12-17 04:59:05 +0100 (Sa, 17 Dez 2005) | 2 lines
Max-Forwards headers must only be present on requests, not responses
........
r7517 | tilghman | 2005-12-17 18:19:32 +0100 (Sa, 17 Dez 2005) | 2 lines
Bug 6009 - off by one error
........
r7519 | tilghman | 2005-12-17 19:55:38 +0100 (Sa, 17 Dez 2005) | 2 lines
Document that curley braces must be on the same line as the keyword.
........
r7521 | tilghman | 2005-12-19 06:38:44 +0100 (Mo, 19 Dez 2005) | 2 lines
Bug 6026 - segfault for the sequence NoCDR(), SetAMAFlags()
........
r7523 | tilghman | 2005-12-19 20:06:46 +0100 (Mo, 19 Dez 2005) | 2 lines
Bug 5988 - record append option not working
........
r7529 | russell | 2005-12-20 00:47:23 +0100 (Di, 20 Dez 2005) | 5 lines
I messed up and accidently committed this to the trunk first ...
- add note on required values of sip_methods struct
- remove duplicate function prototype
- remove duplicate ast_mutex_lock (issue #6025)
........
r7546 | kpfleming | 2005-12-20 13:58:37 +0100 (Di, 20 Dez 2005) | 2 lines
backport fix for larger-than-20ms-frames from trunk (bug #5697)
........
r7550 | russell | 2005-12-20 18:34:00 +0100 (Di, 20 Dez 2005) | 2 lines
backport fix for segfault on directed pickup when no CDR is available (issue #5998)
........
r7552 | russell | 2005-12-20 19:05:45 +0100 (Di, 20 Dez 2005) | 2 lines
backport fix for reloading peer context (issue #6007)
........
r7557 | russell | 2005-12-20 21:21:26 +0100 (Di, 20 Dez 2005) | 2 lines
check array bounds when parsing arguments to AGI (issue #5868)
........
r7577 | tilghman | 2005-12-21 20:23:12 +0100 (Mi, 21 Dez 2005) | 2 lines
Bug 5777 - Remove parentheses on Goto in AEL, so that it parses correctly
........
r7580 | bweschke | 2005-12-21 20:53:49 +0100 (Mi, 21 Dez 2005) | 3 lines
Bug #6040 - Documentation correction
........
r7582 | tilghman | 2005-12-21 21:01:16 +0100 (Mi, 21 Dez 2005) | 2 lines
Allow a chan_alsa that failed to open sound devices to be unloaded.
........
r7586 | twisted | 2005-12-21 23:23:39 +0100 (Mi, 21 Dez 2005) | 3 lines
Actually put in the per-peer settings for sip video, as they didn't make it in at astricon somehow, and I've been too busy up until now to redo it.
........
r7595 | russell | 2005-12-22 17:17:43 +0100 (Do, 22 Dez 2005) | 2 lines
remove stray unlock (issue #5955)
........
r7599 | russell | 2005-12-22 21:36:47 +0100 (Do, 22 Dez 2005) | 3 lines
revert changes to videosupport to allow per-peer setting, since it isn't quite
complete and there is not an obvious fix at this point
........
r7601 | tilghman | 2005-12-22 23:04:13 +0100 (Do, 22 Dez 2005) | 2 lines
Bug 6050 SQL requires the use of single ticks to delimit values, not quotes
........
r7605 | bweschke | 2005-12-23 01:00:11 +0100 (Fr, 23 Dez 2005) | 3 lines
Another app documentation tweak.
........
r7606 | kpfleming | 2005-12-23 04:01:24 +0100 (Fr, 23 Dez 2005) | 3 lines
add license reference to copyright notice displayed when CLI session begins
add 'show warranty' and 'show license' CLI commands (still need a complete list of non-GPL components included in Asterisk)
........
r7608 | tilghman | 2005-12-23 07:38:08 +0100 (Fr, 23 Dez 2005) | 2 lines
Bug 6051 - VMCOUNT should work as documented and count all, not quit after finding 1
........
r7634 | russell | 2005-12-26 19:19:12 +0100 (Mo, 26 Dez 2005) | 2 lines
cast time_t to an int in printf/scanf (issue #5635)
........
r7637 | tilghman | 2005-12-26 21:32:50 +0100 (Mo, 26 Dez 2005) | 2 lines
Remove copy of code in libc, preferring code in utils.c (public domain code)
........
r7641 | kpfleming | 2005-12-27 01:07:45 +0100 (Di, 27 Dez 2005) | 2 lines
backport fix to ensure that DSP is never enabled on pseudo channels
........
r7663 | russell | 2005-12-27 22:07:08 +0100 (Di, 27 Dez 2005) | 2 lines
backport fix for permissions of created recordings (issue #6067)
........
r7665 | russell | 2005-12-28 18:35:56 +0100 (Mi, 28 Dez 2005) | 2 lines
fix memory leak in build_rpid (issue #6070)
........
r7677 | tilghman | 2005-12-30 15:54:19 +0100 (Fr, 30 Dez 2005) | 2 lines
Bug 6091 - Fix race condition around uniqueid
........
r7706 | bweschke | 2006-01-02 03:04:14 +0100 (Mo, 02 Jan 2006) | 3 lines
Fix compiler warnings.
........
r7709 | tilghman | 2006-01-02 08:31:54 +0100 (Mo, 02 Jan 2006) | 2 lines
Bug 6084 - MixMonitor after a 'cli stop monitor' deadlocks
........
r7736 | kpfleming | 2006-01-03 17:34:12 +0100 (Di, 03 Jan 2006) | 2 lines
don't leak memory for (most) expression evaluations
........
r7738 | kpfleming | 2006-01-03 18:00:01 +0100 (Di, 03 Jan 2006) | 2 lines
backport rport scanning fix from trunk (bug #6071)
........
r7740 | kpfleming | 2006-01-03 18:24:56 +0100 (Di, 03 Jan 2006) | 4 lines
revert incorrect fix for bug #6048 from revision 7709
put in correct (simpler) fix
add doxygen docs for channel spy 'state' values
........
r7743 | tilghman | 2006-01-03 19:15:12 +0100 (Di, 03 Jan 2006) | 2 lines
Bug 6121 - typo in application description
........
r7746 | kpfleming | 2006-01-03 21:22:18 +0100 (Di, 03 Jan 2006) | 2 lines
remove unused 'old' expression parser
........
r7771 | bweschke | 2006-01-04 06:27:38 +0100 (Mi, 04 Jan 2006) | 3 lines
Fix the 'if' clause to be true under the right conditions. Bug #6126
........
r7773 | russell | 2006-01-04 08:06:50 +0100 (Mi, 04 Jan 2006) | 2 lines
use a more correct way of determining the size of the destination buffer
........
r7792 | oej | 2006-01-04 22:43:14 +0100 (Mi, 04 Jan 2006) | 2 lines
Fixing typo in XML for video updates.
........
r7795 | oej | 2006-01-04 22:46:40 +0100 (Mi, 04 Jan 2006) | 2 lines
Issue #5980: Removing extra CR+LF in manager events - needs port to trunk
........
r7799 | kpfleming | 2006-01-05 00:02:38 +0100 (Do, 05 Jan 2006) | 2 lines
make monitoring more tolerant of peers that deliver frames in bursts
........
r7800 | kpfleming | 2006-01-05 00:27:57 +0100 (Do, 05 Jan 2006) | 2 lines
ensure that ulaw/alaw sound files are filled with silence when extended (not zeroes)
........
r7803 | kpfleming | 2006-01-05 00:45:34 +0100 (Do, 05 Jan 2006) | 2 lines
return properly after extending file
........
r7805 | kpfleming | 2006-01-05 00:51:03 +0100 (Do, 05 Jan 2006) | 2 lines
use proper fwrite() parameters and return value
........
r7807 | kpfleming | 2006-01-05 01:18:46 +0100 (Do, 05 Jan 2006) | 2 lines
doh... fseek() has no useful return value
........
r7809 | kpfleming | 2006-01-05 01:58:29 +0100 (Do, 05 Jan 2006) | 2 lines
send device state updates for auto-logoff of agents as well
........
r7812 | oej | 2006-01-05 10:13:21 +0100 (Do, 05 Jan 2006) | 2 lines
Fix copyright of changed file
........
r7819 | kpfleming | 2006-01-05 21:52:38 +0100 (Do, 05 Jan 2006) | 2 lines
ensure that variable is initialized
........
r7823 | tilghman | 2006-01-06 00:07:08 +0100 (Fr, 06 Jan 2006) | 2 lines
Bug 6081 - fix for memory leak, formatting fixes
........
r7825 | kpfleming | 2006-01-06 00:49:50 +0100 (Fr, 06 Jan 2006) | 3 lines
eliminate rounding errors that caused call time limits to be inaccurate (issue #5913)
round 'time left' reported during call limit warnings up to sound more accurate
........
r7827 | tilghman | 2006-01-06 00:53:07 +0100 (Fr, 06 Jan 2006) | 2 lines
Bug 6076 - Fix documentation of ast_trim_blank return value
........
r7829 | kpfleming | 2006-01-06 01:21:00 +0100 (Fr, 06 Jan 2006) | 2 lines
update agent persistence when an agent gets logged off by autologoff
........
r7831 | tilghman | 2006-01-06 01:34:40 +0100 (Fr, 06 Jan 2006) | 2 lines
Dumb error messages - "Context 'context' already included in 'in' context"
........
r7848 | tilghman | 2006-01-07 08:27:18 +0100 (Sa, 07 Jan 2006) | 2 lines
Bug 6156 - catch all threading errors, not just simple failure
........
r7870 | russell | 2006-01-09 05:52:16 +0100 (Mo, 09 Jan 2006) | 2 lines
backport fix for unnecessary unlock (issue #6171)
........
r7871 | russell | 2006-01-09 06:11:44 +0100 (Mo, 09 Jan 2006) | 2 lines
fix seg fault when using greek syntax in VoicemMailMain (issue #6142)
........
r7898 | kpfleming | 2006-01-09 19:08:07 +0100 (Mo, 09 Jan 2006) | 2 lines
fix breakage introduced in revision 7871
........
r7899 | kpfleming | 2006-01-09 19:09:53 +0100 (Mo, 09 Jan 2006) | 2 lines
backport fix from revision 7856 of trunk
........
r7900 | kpfleming | 2006-01-09 19:11:23 +0100 (Mo, 09 Jan 2006) | 2 lines
commit user/group-related changes from trunk
........
r7904 | tilghman | 2006-01-09 19:37:50 +0100 (Mo, 09 Jan 2006) | 2 lines
Update variable documentation to match the code
........
r7908 | tilghman | 2006-01-09 21:08:24 +0100 (Mo, 09 Jan 2006) | 2 lines
Bug 6157 - Memory leak
........
r7915 | russell | 2006-01-09 23:07:26 +0100 (Mo, 09 Jan 2006) | 2 lines
add missing unlock (issue #6112)
........
r7917 | kpfleming | 2006-01-09 23:48:48 +0100 (Mo, 09 Jan 2006) | 2 lines
re-initialize _all_ sequence numbers when transfer completes
........
r7939 | oej | 2006-01-10 09:48:14 +0100 (Di, 10 Jan 2006) | 3 lines
- Adding reference to README.tds
- Reformatting table
........
Removed:
team/crichter/0.2.1/ast_expr.y
Modified:
team/crichter/0.2.1/ (props changed)
team/crichter/0.2.1/app.c
team/crichter/0.2.1/apps/app_chanspy.c
team/crichter/0.2.1/apps/app_cut.c
team/crichter/0.2.1/apps/app_dial.c
team/crichter/0.2.1/apps/app_directed_pickup.c
team/crichter/0.2.1/apps/app_externalivr.c
team/crichter/0.2.1/apps/app_hasnewvoicemail.c
team/crichter/0.2.1/apps/app_meetme.c
team/crichter/0.2.1/apps/app_mixmonitor.c
team/crichter/0.2.1/apps/app_privacy.c
team/crichter/0.2.1/apps/app_queue.c
team/crichter/0.2.1/apps/app_sms.c
team/crichter/0.2.1/apps/app_stack.c
team/crichter/0.2.1/apps/app_voicemail.c
team/crichter/0.2.1/apps/app_waitforsilence.c
team/crichter/0.2.1/ast_expr2.fl
team/crichter/0.2.1/ast_expr2f.c
team/crichter/0.2.1/asterisk.c
team/crichter/0.2.1/build_tools/make_svn_branch_name
team/crichter/0.2.1/cdr.c
team/crichter/0.2.1/cdr/cdr_tds.c
team/crichter/0.2.1/channel.c
team/crichter/0.2.1/channels/chan_agent.c
team/crichter/0.2.1/channels/chan_alsa.c
team/crichter/0.2.1/channels/chan_iax2.c
team/crichter/0.2.1/channels/chan_sip.c
team/crichter/0.2.1/channels/chan_zap.c
team/crichter/0.2.1/channels/misdn/Makefile
team/crichter/0.2.1/cli.c
team/crichter/0.2.1/config.c
team/crichter/0.2.1/configs/sip.conf.sample
team/crichter/0.2.1/db.c
team/crichter/0.2.1/doc/README.ael
team/crichter/0.2.1/doc/README.cdr
team/crichter/0.2.1/doc/README.variables
team/crichter/0.2.1/file.c
team/crichter/0.2.1/formats/format_pcm.c
team/crichter/0.2.1/formats/format_pcm_alaw.c
team/crichter/0.2.1/funcs/func_moh.c
team/crichter/0.2.1/include/asterisk/chanspy.h
team/crichter/0.2.1/include/asterisk/linkedlists.h
team/crichter/0.2.1/include/asterisk/strings.h
team/crichter/0.2.1/manager.c
team/crichter/0.2.1/pbx.c
team/crichter/0.2.1/pbx/pbx_ael.c
team/crichter/0.2.1/pbx/pbx_config.c
team/crichter/0.2.1/pbx/pbx_dundi.c
team/crichter/0.2.1/pbx/pbx_spool.c
team/crichter/0.2.1/res/res_agi.c
team/crichter/0.2.1/res/res_features.c
team/crichter/0.2.1/res/res_monitor.c
team/crichter/0.2.1/utils.c
team/crichter/0.2.1/utils/astman.c
Propchange: team/crichter/0.2.1/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 10 16:41:23 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7410
+/branches/1.2:1-7950
Modified: team/crichter/0.2.1/app.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/app.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/app.c (original)
+++ team/crichter/0.2.1/app.c Tue Jan 10 16:41:23 2006
@@ -430,11 +430,11 @@
const char *stop, const char *pause,
const char *restart, int skipms)
{
- long elapsed = 0, last_elapsed = 0;
char *breaks = NULL;
char *end = NULL;
int blen = 2;
int res;
+ long pause_restart_point = 0;
if (stop)
blen += strlen(stop);
@@ -456,9 +456,6 @@
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
- if (chan)
- ast_stopstream(chan);
-
if (file) {
if ((end = strchr(file,':'))) {
if (!strcasecmp(end, ":end")) {
@@ -469,25 +466,18 @@
}
for (;;) {
- struct timeval started = ast_tvnow();
-
- if (chan)
- ast_stopstream(chan);
+ ast_stopstream(chan);
res = ast_streamfile(chan, file, chan->language);
if (!res) {
- if (end) {
+ if (pause_restart_point) {
+ ast_seekstream(chan->stream, pause_restart_point, SEEK_SET);
+ pause_restart_point = 0;
+ }
+ else if (end) {
ast_seekstream(chan->stream, 0, SEEK_END);
- end=NULL;
- }
- res = 1;
- if (elapsed) {
- ast_stream_fastforward(chan->stream, elapsed);
- last_elapsed = elapsed - 200;
- }
- if (res)
- res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
- else
- break;
+ end = NULL;
+ };
+ res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
}
if (res < 1)
@@ -496,17 +486,16 @@
/* We go at next loop if we got the restart char */
if (restart && strchr(restart, res)) {
ast_log(LOG_DEBUG, "we'll restart the stream here at next loop\n");
- elapsed=0; /* To make sure the next stream will start at beginning */
+ pause_restart_point = 0;
continue;
}
- if (pause != NULL && strchr(pause, res)) {
- elapsed = ast_tvdiff_ms(ast_tvnow(), started) + last_elapsed;
- for(;;) {
- if (chan)
- ast_stopstream(chan);
+ if (pause && strchr(pause, res)) {
+ pause_restart_point = ast_tellstream(chan->stream);
+ for (;;) {
+ ast_stopstream(chan);
res = ast_waitfordigit(chan, 1000);
- if (res == 0)
+ if (!res)
continue;
else if (res == -1 || strchr(pause, res) || (stop && strchr(stop, res)))
break;
@@ -516,17 +505,16 @@
continue;
}
}
+
if (res == -1)
break;
/* if we get one of our stop chars, return it to the calling function */
- if (stop && strchr(stop, res)) {
- /* res = 0; */
- break;
- }
- }
- if (chan)
- ast_stopstream(chan);
+ if (stop && strchr(stop, res))
+ break;
+ }
+
+ ast_stopstream(chan);
return res;
}
Modified: team/crichter/0.2.1/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_chanspy.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_chanspy.c (original)
+++ team/crichter/0.2.1/apps/app_chanspy.c Tue Jan 10 16:41:23 2006
@@ -208,9 +208,9 @@
static void stop_spying(struct ast_channel *chan, struct ast_channel_spy *spy)
{
- /* If our status has changed, then the channel we're spying on is gone....
+ /* If our status has changed to DONE, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
- if (spy->status != CHANSPY_RUNNING)
+ if (spy->status == CHANSPY_DONE)
return;
if (!chan)
@@ -439,8 +439,8 @@
if (recbase) {
char filename[512];
- snprintf(filename,sizeof(filename),"%s/%s.%ld.raw",ast_config_AST_MONITOR_DIR, recbase, time(NULL));
- if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC)) <= 0) {
+ snprintf(filename,sizeof(filename),"%s/%s.%d.raw",ast_config_AST_MONITOR_DIR, recbase, (int)time(NULL));
+ if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC, 0644)) <= 0) {
ast_log(LOG_WARNING, "Cannot open %s for recording\n", filename);
fd = 0;
}
@@ -482,7 +482,7 @@
}
}
- if (igrp && (!spec || ((strlen(spec) < strlen(peer->name) &&
+ if (igrp && (!spec || ((strlen(spec) <= strlen(peer->name) &&
!strncasecmp(peer->name, spec, strlen(spec)))))) {
if (peer && (!bronly || ast_bridged_channel(peer)) &&
!ast_check_hangup(peer) && !ast_test_flag(peer, AST_FLAG_SPYING)) {
Modified: team/crichter/0.2.1/apps/app_cut.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_cut.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_cut.c (original)
+++ team/crichter/0.2.1/apps/app_cut.c Tue Jan 10 16:41:23 2006
@@ -145,8 +145,9 @@
int blen = strlen(buffer);
if (element_count++) {
strncat(buffer + blen, ",", buflen - blen - 1);
- }
- strncat(buffer + blen + 1, sortable_keys[count2].key, buflen - blen - 2);
+ blen++;
+ }
+ strncat(buffer + blen, sortable_keys[count2].key, buflen - blen - 1);
}
return 0;
Modified: team/crichter/0.2.1/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_dial.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_dial.c (original)
+++ team/crichter/0.2.1/apps/app_dial.c Tue Jan 10 16:41:23 2006
@@ -962,7 +962,7 @@
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
- ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID);
+ ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP);
cur = args.peers;
do {
/* Remember where to start next time */
Modified: team/crichter/0.2.1/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_directed_pickup.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_directed_pickup.c (original)
+++ team/crichter/0.2.1/apps/app_directed_pickup.c Tue Jan 10 16:41:23 2006
@@ -77,7 +77,7 @@
/* Find a channel to pickup */
origin = ast_get_channel_by_exten_locked(exten, context);
- if (origin) {
+ if (origin && origin->cdr) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0);
if (tmp) {
@@ -89,6 +89,8 @@
}
ast_mutex_unlock(&origin->lock);
} else {
+ if (origin)
+ ast_mutex_unlock(&origin->lock);
ast_log(LOG_DEBUG, "No originating channel found.\n");
}
Modified: team/crichter/0.2.1/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_externalivr.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_externalivr.c (original)
+++ team/crichter/0.2.1/apps/app_externalivr.c Tue Jan 10 16:41:23 2006
@@ -94,9 +94,9 @@
char tmp[256];
if (!data) {
- snprintf(tmp, sizeof(tmp), "%c,%10ld", event, time(NULL));
+ snprintf(tmp, sizeof(tmp), "%c,%10d", event, (int)time(NULL));
} else {
- snprintf(tmp, sizeof(tmp), "%c,%10ld,%s", event, time(NULL), data);
+ snprintf(tmp, sizeof(tmp), "%c,%10d,%s", event, (int)time(NULL), data);
}
fprintf(handle, "%s\n", tmp);
@@ -345,8 +345,6 @@
goto exit;
}
- setvbuf(child_events, NULL, _IONBF, 0);
-
if (!(child_commands = fdopen(child_commands_fd, "r"))) {
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child commands\n");
goto exit;
@@ -356,6 +354,10 @@
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child errors\n");
goto exit;
}
+
+ setvbuf(child_events, NULL, _IONBF, 0);
+ setvbuf(child_commands, NULL, _IONBF, 0);
+ setvbuf(child_errors, NULL, _IONBF, 0);
res = 0;
Modified: team/crichter/0.2.1/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_hasnewvoicemail.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_hasnewvoicemail.c (original)
+++ team/crichter/0.2.1/apps/app_hasnewvoicemail.c Tue Jan 10 16:41:23 2006
@@ -90,7 +90,6 @@
while ((vment = readdir(vmdir))) {
if (!strncmp(vment->d_name + 7, ".txt", 4)) {
count++;
- break;
}
}
closedir(vmdir);
Modified: team/crichter/0.2.1/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_meetme.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_meetme.c (original)
+++ team/crichter/0.2.1/apps/app_meetme.c Tue Jan 10 16:41:23 2006
@@ -263,14 +263,17 @@
return "(not talking)";
}
-static int careful_write(int fd, unsigned char *data, int len)
+static int careful_write(int fd, unsigned char *data, int len, int block)
{
int res;
int x;
while (len) {
- x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
- res = ioctl(fd, ZT_IOMUX, &x);
+ if (block) {
+ x = ZT_IOMUX_WRITE | ZT_IOMUX_SIGEVENT;
+ res = ioctl(fd, ZT_IOMUX, &x);
+ } else
+ res = 0;
if (res >= 0)
res = write(fd, data, len);
if (res < 1) {
@@ -423,7 +426,7 @@
len = 0;
}
if (data)
- careful_write(conf->fd, data, len);
+ careful_write(conf->fd, data, len, 1);
ast_mutex_unlock(&conflock);
@@ -1307,7 +1310,11 @@
audio frames (in which case carefully writing would only
have delayed the audio even further).
*/
- write(fd, f->data, f->datalen);
+ /* As it turns out, we do want to use careful write. We just
+ don't want to block, but we do want to at least *try*
+ to write out all the samples.
+ */
+ careful_write(fd, f->data, f->datalen, 0);
}
} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
char tmp[2];
Modified: team/crichter/0.2.1/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_mixmonitor.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_mixmonitor.c (original)
+++ team/crichter/0.2.1/apps/app_mixmonitor.c Tue Jan 10 16:41:23 2006
@@ -112,9 +112,9 @@
static void stopmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
- /* If our status has changed, then the channel we're spying on is gone....
+ /* If our status has changed to DONE, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
- if (spy->status != CHANSPY_RUNNING)
+ if (spy->status == CHANSPY_DONE)
return;
if (!chan)
Modified: team/crichter/0.2.1/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_privacy.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_privacy.c (original)
+++ team/crichter/0.2.1/apps/app_privacy.c Tue Jan 10 16:41:23 2006
@@ -193,7 +193,7 @@
}
/*Got a number, play sounds and send them on their way*/
- if ((retries < maxretries) && res == 1 ) {
+ if ((retries < maxretries) && !res ) {
res = ast_streamfile(chan, "privacy-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
Modified: team/crichter/0.2.1/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_queue.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_queue.c (original)
+++ team/crichter/0.2.1/apps/app_queue.c Tue Jan 10 16:41:23 2006
@@ -484,11 +484,11 @@
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
- "LastCall: %ld\r\n"
+ "LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
- cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
+ cur->penalty, cur->calls, (int)cur->lastcall, cur->status, cur->paused);
}
}
}
@@ -1262,11 +1262,11 @@
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
- "LastCall: %ld\r\n"
+ "LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface, cur->dynamic ? "dynamic" : "static",
- cur->penalty, cur->calls, cur->lastcall, cur->status, cur->paused);
+ cur->penalty, cur->calls, (int)cur->lastcall, cur->status, cur->paused);
}
break;
}
@@ -2422,11 +2422,11 @@
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
- "LastCall: %ld\r\n"
+ "LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, new_member->interface, new_member->dynamic ? "dynamic" : "static",
- new_member->penalty, new_member->calls, new_member->lastcall, new_member->status, new_member->paused);
+ new_member->penalty, new_member->calls, (int)new_member->lastcall, new_member->status, new_member->paused);
if (dump)
dump_queue_members(q);
@@ -3436,13 +3436,13 @@
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
- "LastCall: %ld\r\n"
+ "LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n"
"%s"
"\r\n",
q->name, mem->interface, mem->dynamic ? "dynamic" : "static",
- mem->penalty, mem->calls, mem->lastcall, mem->status, mem->paused, idText);
+ mem->penalty, mem->calls, (int)mem->lastcall, mem->status, mem->paused, idText);
}
}
/* List Queue Entries */
Modified: team/crichter/0.2.1/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_sms.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_sms.c (original)
+++ team/crichter/0.2.1/apps/app_sms.c Tue Jan 10 16:41:23 2006
@@ -694,7 +694,7 @@
}
while (fgets (line, sizeof (line), s))
{ /* process line in file */
- char *p;
+ unsigned char *p;
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
*p = 0; /* strip eoln */
p = line;
@@ -1379,8 +1379,8 @@
ast_copy_string (h.cli, chan->cid.cid_num, sizeof (h.cli));
{
- char *d = data,
- *p,
+ unsigned char *p;
+ unsigned char *d = data,
answer = 0;
if (!*d || *d == '|') {
ast_log (LOG_ERROR, "Requires queue name\n");
@@ -1449,7 +1449,7 @@
d = p;
h.udl = 0;
while (*p && h.udl < SMSLEN)
- h.ud[h.udl++] = utf8decode((unsigned char **)&p);
+ h.ud[h.udl++] = utf8decode(&p);
if (is7bit (h.dcs) && packsms7 (0, h.udhl, h.udh, h.udl, h.ud) < 0)
ast_log (LOG_WARNING, "Invalid 7 bit GSM data\n");
if (is8bit (h.dcs) && packsms8 (0, h.udhl, h.udh, h.udl, h.ud) < 0)
Modified: team/crichter/0.2.1/apps/app_stack.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_stack.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_stack.c (original)
+++ team/crichter/0.2.1/apps/app_stack.c Tue Jan 10 16:41:23 2006
@@ -52,22 +52,18 @@
static const char *gosub_descrip =
"Gosub([[context|]exten|]priority)\n"
-" Jumps to the label specified, saving the return address.\n"
-" Returns 0 if the label exists or -1 otherwise.\n";
+" Jumps to the label specified, saving the return address.\n";
static const char *gosubif_descrip =
-"Gosub(condition?labeliftrue[:labeliffalse])\n"
+"GosubIf(condition?labeliftrue[:labeliffalse])\n"
" If the condition is true, then jump to labeliftrue. If false, jumps to\n"
"labeliffalse, if specified. In either case, a jump saves the return point\n"
-"in the dialplan, to be returned to with a Return.\n"
-" Returns 0 if the label exists or -1 otherwise.\n";
+"in the dialplan, to be returned to with a Return.\n";
static const char *return_descrip =
"Return()\n"
-" Jumps to the last label in the stack, removing it.\n"
-" Returns 0 if there's a label in the stack or -1 otherwise.\n";
+" Jumps to the last label on the stack, removing it.\n";
static const char *pop_descrip =
"StackPop()\n"
-" Removes last label in the stack, discarding it.\n"
-" Always returns 0, even if the stack is empty.\n";
+" Removes last label on the stack, discarding it.\n";
STANDARD_LOCAL_USER;
Modified: team/crichter/0.2.1/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_voicemail.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_voicemail.c (original)
+++ team/crichter/0.2.1/apps/app_voicemail.c Tue Jan 10 16:41:23 2006
@@ -582,7 +582,7 @@
while (cur) {
if (ast_test_flag((&globalflags), VM_SEARCH) && !strcasecmp(mailbox, cur->mailbox))
break;
- if ((!strcasecmp(context, cur->context)) && (!strcasecmp(mailbox, cur->mailbox)))
+ if (context && (!strcasecmp(context, cur->context)) && (!strcasecmp(mailbox, cur->mailbox)))
break;
cur=cur->next;
}
@@ -2005,7 +2005,7 @@
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
goto yuck;
}
- snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir like \"%%%s/%s/%s\"%c", odbc_table, context, tmp, "INBOX", '\0');
+ snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir LIKE '%%%s/%s/%s'", odbc_table, context, tmp, "INBOX");
res = SQLPrepare(stmt, sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -2038,7 +2038,7 @@
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
goto yuck;
}
- snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir like \"%%%s/%s/%s\"%c", odbc_table, context, tmp, "Old", '\0');
+ snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir like '%%%s/%s/%s'", odbc_table, context, tmp, "Old");
res = SQLPrepare(stmt, sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -2105,7 +2105,7 @@
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
goto yuck;
}
- snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir like \"%%%s/%s/%s\"%c", odbc_table, context, tmp, "INBOX", '\0');
+ snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir like '%%%s/%s/%s'", odbc_table, context, tmp, "INBOX");
res = SQLPrepare(stmt, sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -3919,9 +3919,9 @@
static int vm_play_folder_name_gr(struct ast_channel *chan, char *mbox)
{
int cmd;
- char buf[sizeof(mbox)+1];
-
- memset(buf, '\0', sizeof(char)*(sizeof(buf)));
+ char *buf;
+
+ buf = alloca(strlen(mbox)+2);
strcpy(buf, mbox);
strcat(buf,"s");
Modified: team/crichter/0.2.1/apps/app_waitforsilence.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/apps/app_waitforsilence.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/apps/app_waitforsilence.c (original)
+++ team/crichter/0.2.1/apps/app_waitforsilence.c Tue Jan 10 16:41:23 2006
@@ -56,7 +56,7 @@
"SILENCE - if silence of x ms was detected"
"TIMEOUT - if silence of x ms was not detected."
"Examples:\n"
-" - WaitForSilence(500,2) will wait for 1/2 second of silence, twice\n"
+" - WaitForSilence(500|2) will wait for 1/2 second of silence, twice\n"
" - WaitForSilence(1000) will wait for 1 second of silence, once\n";
STANDARD_LOCAL_USER;
Modified: team/crichter/0.2.1/ast_expr2.fl
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/ast_expr2.fl?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/ast_expr2.fl (original)
+++ team/crichter/0.2.1/ast_expr2.fl Tue Jan 10 16:41:23 2006
@@ -98,42 +98,42 @@
int ast_expr(char *expr, char *buf, int length)
{
- struct parse_io *io;
+ struct parse_io io;
+ int return_value = 0;
- io = calloc(sizeof(struct parse_io),1);
- io->string = expr; /* to pass to the error routine */
+ memset(&io, 0, sizeof(io));
+ io.string = expr; /* to pass to the error routine */
- ast_yylex_init(&io->scanner);
+ ast_yylex_init(&io.scanner);
- ast_yy_scan_string(expr, io->scanner);
+ ast_yy_scan_string(expr, io.scanner);
- ast_yyparse ((void *) io);
+ ast_yyparse ((void *) &io);
- ast_yylex_destroy(io->scanner);
+ ast_yylex_destroy(io.scanner);
- if (io->val == NULL) {
+ if (!io.val) {
if (length > 1) {
strcpy(buf, "0");
- return 1;
+ return_value = 1;
}
} else {
- if (io->val->type == AST_EXPR_integer) {
+ if (io.val->type == AST_EXPR_integer) {
int res_length;
- res_length = snprintf(buf, length, "%ld", (long int) io->val->u.i);
- return res_length <= length ? res_length : length;
+ res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
+ return_value = (res_length <= length) ? res_length : length;
} else {
#ifdef STANDALONE
- strncpy(buf, io->val->u.s, length - 1);
+ strncpy(buf, io.val->u.s, length - 1);
#else /* !STANDALONE */
- ast_copy_string(buf, io->val->u.s, length);
+ ast_copy_string(buf, io.val->u.s, length);
#endif /* STANDALONE */
- return strlen(buf);
+ return_value = strlen(buf);
}
- free(io->val);
+ free(io.val);
}
- free(io);
- return 0;
+ return return_value;
}
int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
Modified: team/crichter/0.2.1/ast_expr2f.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/ast_expr2f.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/ast_expr2f.c (original)
+++ team/crichter/0.2.1/ast_expr2f.c Tue Jan 10 16:41:23 2006
@@ -2562,42 +2562,42 @@
int ast_expr(char *expr, char *buf, int length)
{
- struct parse_io *io;
+ struct parse_io io;
+ int return_value = 0;
- io = calloc(sizeof(struct parse_io),1);
- io->string = expr; /* to pass to the error routine */
+ memset(&io, 0, sizeof(io));
+ io.string = expr; /* to pass to the error routine */
- ast_yylex_init(&io->scanner);
+ ast_yylex_init(&io.scanner);
- ast_yy_scan_string(expr, io->scanner);
+ ast_yy_scan_string(expr, io.scanner);
- ast_yyparse ((void *) io);
-
- ast_yylex_destroy(io->scanner);
-
- if (io->val == NULL) {
+ ast_yyparse ((void *) &io);
+
+ ast_yylex_destroy(io.scanner);
+
+ if (!io.val) {
if (length > 1) {
strcpy(buf, "0");
- return 1;
+ return_value = 1;
}
} else {
- if (io->val->type == AST_EXPR_integer) {
+ if (io.val->type == AST_EXPR_integer) {
int res_length;
- res_length = snprintf(buf, length, "%ld", (long int) io->val->u.i);
- return res_length <= length ? res_length : length;
+ res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
+ return_value = (res_length <= length) ? res_length : length;
} else {
#ifdef STANDALONE
- strncpy(buf, io->val->u.s, length - 1);
+ strncpy(buf, io.val->u.s, length - 1);
#else /* !STANDALONE */
- ast_copy_string(buf, io->val->u.s, length);
+ ast_copy_string(buf, io.val->u.s, length);
#endif /* STANDALONE */
- return strlen(buf);
+ return_value = strlen(buf);
}
- free(io->val);
+ free(io.val);
}
- free(io);
- return 0;
+ return return_value;
}
int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
Modified: team/crichter/0.2.1/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.2.1/asterisk.c?rev=7951&r1=7950&r2=7951&view=diff
==============================================================================
--- team/crichter/0.2.1/asterisk.c (original)
+++ team/crichter/0.2.1/asterisk.c Tue Jan 10 16:41:23 2006
@@ -126,9 +126,14 @@
#define NUM_MSGS 64
/*! \brief Welcome message when starting a CLI interface */
[... 1909 lines stripped ...]
More information about the asterisk-commits
mailing list