asterisk/main
Matt Jordan 13efea24f7 main/app: Only look to end of file if ':end' is specified, and not just ':'
There is a little known feature in app_controlplayback that will cause the
specified offset to be used relative to the end of a file if a ':end' is
detected within the filename.

This feature is pretty bad, but okay.

However, a bug exists in this code where a ':' detected in the filename
will cause the end pointer to be non-NULL, even if the full ':end' isn't
specified. This causes us to treat an unspecified offset (0) as being
"start playing from the end of the file", resulting in no file playback
occurring.

This patch fixes this bug by resetting the end pointer if ':end' is not
found in the filename.

Change-Id: Ib4c7b1b45283e4effd622a970055c51146892f35
2016-03-23 13:53:31 -03:00
..
editline main/editline: Add .gitignore. 2015-04-12 07:12:45 -04:00
stdtime test_time: Provide a timeout when waiting. 2015-12-28 14:11:14 -06:00
.gitignore build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
Makefile build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
abstract_jb.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
acl.c Restrict functionality when ACLs are misconfigured. 2015-04-30 10:43:51 -05:00
adsi.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
alaw.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
aoc.c json: Audit ast_json_* usage for thread safety. 2015-12-16 15:21:14 -06:00
app.c main/app: Only look to end of file if ':end' is specified, and not just ':' 2016-03-23 13:53:31 -03:00
ast_expr2.c MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC. 2015-05-13 21:55:07 -04:00
ast_expr2.fl Git Conversion: Switch Non-C files to ASTERISK_REGISTER_FILE. 2015-04-29 01:02:10 -04:00
ast_expr2.h Allow the REALTIME() function to report errors back to the caller. 2012-07-11 17:16:50 +00:00
ast_expr2.y MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC. 2015-05-13 21:55:07 -04:00
ast_expr2f.c MALLOC_DEBUG: Replace WRAP_LIBC_MALLOC with ASTMM_LIBC. 2015-05-13 21:55:07 -04:00
asterisk.c build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
asterisk.dynamics Fix error loading res_monitor. 2014-04-23 15:02:39 +00:00
asterisk.exports.in Add _IO_stdin_used in version-script to fix SIGBUSes on Sparc. 2013-08-22 08:26:55 +00:00
astfd.c astfd: Adds a timestamp for each entry. 2015-09-19 19:52:36 +02:00
astmm.c astmm.c: Add more stats to CLI "memory show" commands. 2016-01-14 19:57:29 -06:00
astobj2.c Astobj2: Run weakproxy subscription callbacks in reverse order. 2015-05-22 17:09:47 -05:00
astobj2_container.c Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
astobj2_container_private.h Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
astobj2_hash.c Astobj2: Correctly treat hash_fn returning INT_MIN 2015-05-25 02:18:58 -05:00
astobj2_private.h Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
astobj2_rbtree.c Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
audiohook.c Fix crash in audiohook translate to slin 2015-12-03 15:31:28 -06:00
autochan.c app_chanspy: Fix occasional deadlock with ChanSpy and Local channels. 2016-03-11 16:05:30 -06:00
autoservice.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
backtrace.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
bridge.c bridge.c: Crash during attended transfer when missing a local channel half 2016-03-03 14:03:14 -06:00
bridge_after.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
bridge_basic.c Merge "bridge_basic: don't play an attended transfer fail sound after target hangs up" 2016-01-16 08:29:58 -06:00
bridge_channel.c bridge core: Add owed T.38 terminate when channel leaves a bridge. 2016-02-29 12:50:43 -06:00
bridge_roles.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
bucket.c media cache: Add a core API and facade for a backend agnostic media cache 2015-07-12 20:44:16 -05:00
buildinfo.c fix a few small things found by using sparse 2008-10-30 16:49:02 +00:00
callerid.c SIP diversion: Fix REDIRECTING(reason) value inconsistencies. 2016-03-01 20:21:58 -06:00
ccss.c ccss.c: Replace space in taskprocessor name. 2016-01-08 21:05:16 -06:00
cdr.c Merge "main/cdr: Allow setting properties on a finalized CDR if it is the last one" 2016-01-04 09:02:54 -06:00
cel.c cel.c: Fix mismatch in ast_cel_track_event() return type. 2016-02-17 14:06:58 -06:00
channel.c bridge core: Add owed T.38 terminate when channel leaves a bridge. 2016-02-29 12:50:43 -06:00
channel_internal_api.c channel api: Create is_t38_active accessor functions. 2016-02-29 12:50:43 -06:00
chanvars.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
cli.c main/cli.c: Refactor function to print seconds formatted 2016-03-07 03:42:18 -03:00
codec.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
codec_builtin.c format: Update the maximum packetization time for iLBC 30. 2015-10-21 12:10:36 -05:00
config.c main/config: Clean config maps on shutdown. 2016-01-15 20:00:08 -06:00
config_options.c Merge "config: Allow options to register when documentation is unavailable." 2016-01-28 15:56:30 -06:00
core_local.c bridge.c: Crash during attended transfer when missing a local channel half 2016-03-03 14:03:14 -06:00
core_unreal.c Local channels: Alternate solution to ringback problem. 2015-07-24 09:35:17 -05:00
crypt.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
cygload.c Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
data.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
datastore.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
db.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
devicestate.c devicestate: Cleanup engine thread during graceful shutdown. 2016-01-10 17:16:28 -06:00
dial.c main/dial: Protect access to the format_cap structure of the requesting channel 2015-11-04 15:42:32 -05:00
dns.c dns: Change lookup failures from LOG_ERROR to debug 1. 2015-11-30 10:13:35 -07:00
dns_core.c dns_core: Allow zero-length DNS responses. 2015-07-31 09:44:20 -05:00
dns_naptr.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
dns_query_set.c DNS: Fix some corner cases. 2015-06-10 18:06:15 -05:00
dns_recurring.c dns: Fix crash when invoking cancel in DNS recurring unit test. 2015-07-02 08:54:51 -03:00
dns_srv.c dns_srv: Fix SRV sorting when records with priority zero exist with non-zero. 2015-05-10 10:39:32 -03:00
dns_system_resolver.c dns: Change lookup failures from LOG_ERROR to debug 1. 2015-11-30 10:13:35 -07:00
dns_test.c dns: Fix build when TEST_FRAMEWORK is not defined. 2015-04-10 13:32:24 +00:00
dns_tlsa.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
dnsmgr.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
dsp.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
ecdisa.h Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
endpoints.c endpoint/stasis: Eliminate duplicate events on endpoint status change 2015-12-28 11:39:26 -06:00
enum.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
event.c Clang: change previous tautological-compare fixes. 2015-04-23 11:39:13 -05:00
features.c Remove unneeded uses of optional_api providers. 2015-05-02 19:31:12 -05:00
features_config.c bridge_basic: don't cache xferfailsound during an attended transfer 2016-01-15 17:51:18 -06:00
file.c main/file: Add the ability to play media in the media cache 2016-03-23 13:53:31 -03:00
fixedjitterbuf.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
fixedjitterbuf.h Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
format.c format: Register format-attribute module with cached formats. 2015-11-13 09:32:52 +01:00
format_cache.c Astobj2: Allow reference debugging to be enabled/disabled by config. 2015-04-27 18:37:26 -04:00
format_cap.c ast_format_cap_append_by_type: Resolve codec reference leak. 2016-01-07 10:39:19 -05:00
format_compatibility.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
frame.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
framehook.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
fskmodem.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
fskmodem_float.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
fskmodem_int.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
global_datastores.c Detect potential forwarding loops based on count. 2015-04-17 15:58:07 -05:00
hashtab.c hashtab: Add NULL check when destroying iterator. 2015-11-14 08:06:48 -05:00
heap.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
http.c AST-2016-001 http: Provide greater control of TLS and set modern defaults. 2016-02-03 15:10:16 -06:00
image.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
indications.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
io.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
jitterbuf.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
json.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
libasteriskpj.c build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
libasteriskssl.c tcptls: Avoiding ERR_remove_state in OpenSSL. 2015-05-05 11:38:54 -05:00
libasteriskssl.exports.in Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
loader.c loader: Retry dlopen when loading fails 2016-03-03 15:38:01 -06:00
lock.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
logger.c logger.c: Fix buffer overrun found by address sanitizer. 2016-01-22 12:35:56 -06:00
manager.c build_system: Fix some warnings highlighted by clang 2016-02-01 19:22:40 -06:00
manager_bridges.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
manager_channels.c AMI: Add Linkedid to the standard channel snapshot AMI event headers. 2015-06-26 10:34:31 -05:00
manager_endpoints.c res_pjsip: Add AMI events for chan_pjsip contact lifecycle changes 2015-05-26 16:47:55 -05:00
manager_mwi.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
manager_system.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
max_forwards.c Detect potential forwarding loops based on count. 2015-04-17 15:58:07 -05:00
md5.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
media_cache.c main/media_cache: Provide an extension on the local file associated with a URI 2016-03-23 11:46:39 -03:00
media_index.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
message.c CHAOS: cleanup possible null vars on msg alloc failure 2016-03-02 11:56:51 -06:00
mixmonitor.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
named_acl.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
netsock.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
netsock2.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
optional_api.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
parking.c Modules: Make ast_module_info->self available to auxiliary sources. 2015-05-04 20:47:01 -04:00
pbx.c pbx: Deadlock between contexts container and context_merge locks 2016-01-11 13:46:25 -06:00
pbx_app.c main/pbx: Move dialplan application management routines to pbx_app.c. 2016-01-04 20:46:25 -05:00
pbx_builtins.c main/pbx: Move variable routines to pbx_variables.c. 2016-01-04 17:15:14 -05:00
pbx_functions.c main/pbx: Move custom function routines to pbx_functions.c. 2016-01-01 13:48:36 -05:00
pbx_hangup_handler.c main/pbx: Move hangup handler routines to pbx_hangup_handler.c. 2016-01-05 12:08:40 -05:00
pbx_private.h main/pbx: Move dialplan application management routines to pbx_app.c. 2016-01-04 20:46:25 -05:00
pbx_switch.c main/pbx: Move switch routines to pbx_switch.c. 2016-01-04 19:20:35 -05:00
pbx_timing.c main/pbx: Move timing routines to pbx_timing.c. 2016-01-04 19:00:23 -05:00
pbx_variables.c main/pbx: Move variable routines to pbx_variables.c. 2016-01-04 17:15:14 -05:00
pickup.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
plc.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
poll.c Merged revisions 285268 via svnmerge from 2010-09-07 19:09:08 +00:00
presencestate.c AMI: Escape string values. 2015-06-08 09:44:04 -05:00
privacy.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
rtp_engine.c Merge "json: Audit ast_json_* usage for thread safety." 2015-12-18 11:57:17 -06:00
say.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
sched.c sched.c: Ensure oldest expiring entry runs first. 2016-03-16 14:22:19 -05:00
sdp_srtp.c Merge "main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits" 2015-05-21 05:15:41 -05:00
security_events.c Clang: change previous tautological-compare fixes. 2015-04-23 11:39:13 -05:00
sem.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
sha1.c Doxygen Updates - janitor work 2012-09-21 17:14:59 +00:00
sip_api.c Don't make chan_sip export global symbols. 2012-10-11 15:49:02 +00:00
slinfactory.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
smoother.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
sorcery.c sorcery: Refactor create, update and delete to better deal with caches 2016-02-29 11:31:42 -06:00
sounds_index.c Replace most uses of ast_register_atexit with ast_register_cleanup. 2015-03-26 22:24:26 +00:00
srv.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
stasis.c Stasis: Create human friendly taskprocessor/serializer names. 2016-01-08 22:11:29 -06:00
stasis_bridges.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
stasis_cache.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
stasis_cache_pattern.c endpoint/stasis: Eliminate duplicate events on endpoint status change 2015-12-28 11:39:26 -06:00
stasis_channels.c json: Audit ast_json_* usage for thread safety. 2015-12-16 15:21:14 -06:00
stasis_endpoints.c main/stasis_endpoints: Fix ContactStatusChange JSON for roundtrip_usec field 2015-11-03 09:18:41 -05:00
stasis_message.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
stasis_message_router.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
stasis_system.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
strcompat.c Add builtin roundf() for systems lacking it. 2013-01-19 20:54:07 +00:00
strings.c strings.c: Fix __ast_str_helper() to always return a terminated string. 2015-10-21 16:49:13 -05:00
stun.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
syslog.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
taskprocessor.c Merge "taskprocessor.c: Increase CLI "core ping taskprocessor" timeout." 2016-01-20 14:19:02 -06:00
tcptls.c Check for OpenSSL defines before trying to use them. 2016-02-04 16:57:46 -06:00
tdd.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
term.c main: Slight refactor of main. Improve color situation. 2015-11-25 20:29:55 +01:00
test.c test.c: Add unit test registration checks for summary and description. 2015-06-24 17:13:31 -05:00
threadpool.c res_pjsip: Deny requests when threadpool queue is backed up. 2015-11-12 11:39:41 -05:00
threadstorage.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
timing.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
translate.c translate: Avoid a warning message when doing FEC within Opus Codec. 2015-12-08 10:48:02 +01:00
udptl.c AST-2016-003 udptl.c: Fix uninitialized values. 2016-02-03 15:07:04 -06:00
ulaw.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
uri.c uri: Quiet warning about type qualifiers ignored on function return type 2014-08-21 14:42:12 +00:00
utils.c main: Use ast_strdup instead of strdup 2016-01-07 10:34:15 +01:00
uuid.c Fix printf problems with high ascii characters after r413586 (1.8). 2014-12-17 10:23:32 +00:00
xml.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00
xmldoc.c xmldoc: Improve xmldoc wrapping of 'core show ...' output. 2015-11-06 08:46:24 -05:00