asterisk/main
George Joseph 3017f09f22 file.c/__ast_file_read_dirs: Fix issues on filesystems without d_type
One of the code paths in __ast_file_read_dirs will only get executed if
the OS doesn't support dirent->d_type OR if the filesystem the
particular file is on doesn't support it.  So, while standard Linux
systems support the field, some filesystems like XFS do not.  In this
case, we need to call stat() to determine whether the directory entry
is a file or directory so we append the filename to the supplied
directory path and call stat.  We forgot to truncate path back to just
the directory afterwards though so we were passing a complete file name
to the callback in the dir_name parameter instead of just the directory
name.

The logic has been re-written to only create a full_path if we need to
call stat() or if we need to descend into another directory.

Change-Id: I54e4228bd8355fad65200c6df3ec4c9c8a98dfba
2016-11-15 21:21:59 -05:00
..
editline BuildSystem: Avoid 'ar cru' and use 'ar cr' instead. 2016-06-07 09:32:11 +02:00
stdtime Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
.gitignore build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
Makefile pjproject_bundled: Fix issue where "/version.mak" wasn't found 2016-10-28 17:03:33 -05:00
abstract_jb.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
acl.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
adsi.c Allow Asterisk to compile under GCC 4.10 2014-05-09 22:49:26 +00:00
alaw.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
aoc.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
app.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ast_expr2.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ast_expr2.fl Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -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 Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ast_expr2f.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
asterisk.c rtp_engine: Allow more than 32 dynamic payload types. 2016-11-02 08:44:26 -05:00
asterisk.dynamics Fix error loading res_monitor. 2014-04-23 15:02:39 +00:00
asterisk.exports.in pjproject_bundled: Various fixes discovered during testing of OSes 2016-05-03 07:56:18 -05:00
astfd.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
astmm.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
astobj2.c astobj2: Declare private variable data_size for AO2_DEBUG only. 2016-10-29 11:19:53 -04:00
astobj2_container.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -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 Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04: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 Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
audiohook.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
autochan.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
autoservice.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
backtrace.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
bridge.c main/bridge: Add some verbose logging for video source changes 2016-11-04 15:50:24 -05:00
bridge_after.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
bridge_basic.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
bridge_channel.c main/bridge_channel: Fix channel reference leak on video source 2016-11-04 15:50:41 -05:00
bridge_roles.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
bucket.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
buildinfo.c fix a few small things found by using sparse 2008-10-30 16:49:02 +00:00
callerid.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ccss.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
cdr.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
cel.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
channel.c Revert "Add API for channel frame deferral." 2016-11-10 08:34:10 -05:00
channel_internal_api.c Revert "Add API for channel frame deferral." 2016-11-10 08:34:10 -05:00
chanvars.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
cli.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
codec.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
codec_builtin.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
config.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
config_options.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
core_local.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
core_unreal.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
crypt.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
cygload.c Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
data.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
datastore.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
db.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
devicestate.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dial.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_core.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_naptr.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_query_set.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_recurring.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_srv.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_system_resolver.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dns_test.c dns: Fix build when TEST_FRAMEWORK is not defined. 2015-04-10 13:32:24 +00:00
dns_tlsa.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dnsmgr.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
dsp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ecdisa.h Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
endpoints.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
enum.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
event.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
features.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
features_config.c Fix issue with CLI not returning to prompt after running "features show" 2016-10-20 09:53:24 +11:00
file.c file.c/__ast_file_read_dirs: Fix issues on filesystems without d_type 2016-11-15 21:21:59 -05:00
fixedjitterbuf.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fixedjitterbuf.h Kill off red blobs in most of main/* 2012-03-22 19:51:16 +00:00
format.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
format_cache.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
format_cap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
format_compatibility.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
frame.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
framehook.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fskmodem.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
fskmodem_float.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
fskmodem_int.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
global_datastores.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
hashtab.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
heap.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
http.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
image.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
indications.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
io.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
jitterbuf.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
json.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
libasteriskpj.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
libasteriskssl.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
libasteriskssl.exports.in Address OpenSSL initialization issues when using third-party libraries. 2012-01-30 21:21:16 +00:00
loader.c Fix shutdown crash caused by modules being left open. 2016-10-28 10:24:26 -05:00
lock.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
logger.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
manager.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
manager_bridges.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
manager_channels.c manager: Add documentation for NewConnectedLine event. 2016-10-31 14:46:54 -04:00
manager_endpoints.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
manager_mwi.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
manager_system.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
max_forwards.c Detect potential forwarding loops based on count. 2015-04-17 15:58:07 -05:00
md5.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
media_cache.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
media_index.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
message.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
mixmonitor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
named_acl.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
named_locks.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
netsock.c netsock.c: fix includes for HURD 2016-11-01 11:48:06 +02:00
netsock2.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
optional_api.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
parking.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_app.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_builtins.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_functions.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_hangup_handler.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_ignorepat.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_include.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_private.h pbx: Create pbx_sw.c for management of 'struct ast_sw'. 2016-07-21 13:58:26 -04:00
pbx_sw.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_switch.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_timing.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pbx_variables.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
pickup.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
plc.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
poll.c Merged revisions 285268 via svnmerge from 2010-09-07 19:09:08 +00:00
presencestate.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
privacy.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
rtp_engine.c rtp_engine: Allow more than 32 dynamic payload types. 2016-11-02 08:44:26 -05:00
say.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
sched.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
sdp_srtp.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
security_events.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
sem.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -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 Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
smoother.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
sorcery.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04: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 Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_bridges.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_cache.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_cache_pattern.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_channels.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_endpoints.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_message.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_message_router.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stasis_system.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
strcompat.c Add builtin roundf() for systems lacking it. 2013-01-19 20:54:07 +00:00
stringfields.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
strings.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
stun.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
syslog.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
taskprocessor.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
tcptls.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
tdd.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
term.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
test.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
threadpool.c threadpool: Fix leak in ast_threadpool_serializer_group error path. 2016-07-13 11:47:56 -05:00
threadstorage.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
timing.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
translate.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
udptl.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
ulaw.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -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 Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
uuid.c Fix printf problems with high ascii characters after r413586 (1.8). 2014-12-17 10:23:32 +00:00
xml.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00
xmldoc.c Remove ASTERISK_REGISTER_FILE. 2016-10-27 09:53:55 -04:00