[Asterisk-code-review] stasis recording/stored: remove calls to deprecated readdir ... (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Wed Nov 2 16:30:40 CDT 2016
Hello Mark Michelson, Anonymous Coward #1000019,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/4222
to look at the new patch set (#3).
Change subject: stasis_recording/stored: remove calls to deprecated readdir_r function.
......................................................................
stasis_recording/stored: remove calls to deprecated readdir_r function.
The readdir_r function has been deprecated and should no longer be used. This
patch removes the readdir_r dependency (replaced it with readdir) and also moves
the directory search code to a more centralized spot (file.c)
Also removed a strict dependency on the dirent structure's d_type field as it
is not portable. The code now checks to see if the value is available. If so,
it tries to use it, but defaults back to using the stats function if necessary.
Lastly, for most implementations of readdir it *should* be thread-safe to make
concurrent calls to it as long as different directory streams are specified.
glibc falls into this category. However, since it is possible that there exist
some implementations that are not safe, locking has been added for those other
than glibc.
ASTERISK-26412
ASTERISK-26509 #close
Change-Id: Id8f54689b1e2873e82a09d0d0d2faf41964e80ba
---
M include/asterisk/file.h
M main/file.c
M res/stasis_recording/stored.c
A tests/test_file.c
4 files changed, 400 insertions(+), 151 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/4222/3
--
To view, visit https://gerrit.asterisk.org/4222
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id8f54689b1e2873e82a09d0d0d2faf41964e80ba
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list