[Home]

Summary:ASTERISK-09673: mixmonitor does not create missing monitor directories
Reporter:easymanaged (easymanaged)Labels:
Date Opened:2007-06-13 14:24:08Date Closed:2007-06-24 11:20:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_mixmonitor
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_mixmonitor.c.bug9990needed.patch
( 1) app_mixmonitor.c.patch
Description:We have been using Monitor to record our calls and want to move to MixMonitor.  However, we need to store them by date, ie, /directory/year/month/day/file.gsm
With Monitor, it checks to see if the directory exists, and create it if it does not.  MixMonitor does not try to create the directory, but I think it should.

****** ADDITIONAL INFORMATION ******

See res/res_monitor.c for the correct behavior.
Comments:By: Eliel Sardanons (eliel) 2007-06-14 22:14:48

Try this patch.
Disclaimer is on file.
SVN diff against trunk (rev. 69470)

By: easymanaged (easymanaged) 2007-06-17 12:41:22

That works for me, thanks!

By: Igor Goncharovsky (igorg) 2007-06-17 14:03:13

May be have some reason to change from using ast_safe_system to ast_mkdir as it done in Bug 9990: http://bugs.digium.com/view.php?id=9990



By: Eliel Sardanons (eliel) 2007-06-17 15:14:07

Ok, I review Corydon76 code and I will update a new patch BUT this patch will only work IF:
bug ASTERISK-9691 is commited with the fixes in bug note: ASTERISK-6348236.

By: Tilghman Lesher (tilghman) 2007-06-19 14:43:32

What's with the addition of libgen.h in this patch?

By: Eliel Sardanons (eliel) 2007-06-19 14:51:53

hmmm, function dirname(); but I think it is defined in another header cause app_voicemail.c is using dirname() and doesnt use <libgen.h>... I'm sure you have the answer :-)

By: Jason Parker (jparker) 2007-06-21 17:19:33

From Linux `man 3 dirname`


NOTES
      There are two different versions of basename() - the POSIX version described above, and the GNU version, which one gets after

          #define _GNU_SOURCE
          #include <string.h>

      The GNU version never modifies its argument, and returns the empty string when path has a trailing slash, and in particular also when it is "/".  There is no GNU version of dirname().

      With glibc, one gets the POSIX version of basename() when <libgen.h> is included, and the GNU version otherwise.

By: Eliel Sardanons (eliel) 2007-06-23 13:01:03

res_monitor.c is using dirname() and include libgen too.

By: Tilghman Lesher (tilghman) 2007-06-24 11:20:01

Committed to trunk in revision 71268.