[svn-commits] jrose: branch jrose/mixmonitor_bugfix r309851 - /team/jrose/mixmonitor_bugfix...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 7 09:57:37 CST 2011


Author: jrose
Date: Mon Mar  7 09:57:30 2011
New Revision: 309851

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=309851
Log:
bug fix for '.' in path name and no extension

Modified:
    team/jrose/mixmonitor_bugfix/apps/app_mixmonitor.c

Modified: team/jrose/mixmonitor_bugfix/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/mixmonitor_bugfix/apps/app_mixmonitor.c?view=diff&rev=309851&r1=309850&r2=309851
==============================================================================
--- team/jrose/mixmonitor_bugfix/apps/app_mixmonitor.c (original)
+++ team/jrose/mixmonitor_bugfix/apps/app_mixmonitor.c Mon Mar  7 09:57:30 2011
@@ -280,6 +280,7 @@
 	struct ast_filestream **fs = NULL;
 	unsigned int oflags;
 	char *ext;
+	char *last_slash;
 	int errflag = 0;
 	struct ast_format format_slin;
 
@@ -313,7 +314,8 @@
 				oflags = O_CREAT | O_WRONLY;
 				oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
 
-				if ((ext = strrchr(mixmonitor->filename, '.')))
+				last_slash = strrchr(mixmonitor->filename, '/');
+				if ((ext = strrchr(mixmonitor->filename, '.')) && (ext > last_slash))
 					*(ext++) = '\0';
 				else
 					ext = "raw";




More information about the svn-commits mailing list