[asterisk-commits] tilghman: branch group/dialplan_aesthetics r71949 - in /team/group/dialplan_a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 26 16:41:57 CDT 2007


Author: tilghman
Date: Tue Jun 26 16:41:57 2007
New Revision: 71949

URL: http://svn.digium.com/view/asterisk?view=rev&rev=71949
Log:
Merged revisions 71914,71916 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r71914 | mmichelson | 2007-06-26 15:34:46 -0500 (Tue, 26 Jun 2007) | 3 lines

Create directory if it does not exist.
(Closes issue 10061, Reported and patched by eliel)

................
r71916 | qwell | 2007-06-26 15:36:50 -0500 (Tue, 26 Jun 2007) | 12 lines

Merged revisions 71915 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r71915 | qwell | 2007-06-26 15:36:09 -0500 (Tue, 26 Jun 2007) | 4 lines

Don't dereference a pointer that may be NULL here.

Issue 10017.

........

................

Modified:
    team/group/dialplan_aesthetics/   (props changed)
    team/group/dialplan_aesthetics/apps/app_record.c
    team/group/dialplan_aesthetics/main/rtp.c

Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/dialplan_aesthetics/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jun 26 16:41:57 2007
@@ -1,1 +1,1 @@
-/trunk:1-71911
+/trunk:1-71948

Modified: team/group/dialplan_aesthetics/apps/app_record.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/apps/app_record.c?view=diff&rev=71949&r1=71948&r2=71949
==============================================================================
--- team/group/dialplan_aesthetics/apps/app_record.c (original)
+++ team/group/dialplan_aesthetics/apps/app_record.c Tue Jun 26 16:41:57 2007
@@ -98,7 +98,7 @@
 	int res = 0;
 	int count = 0;
 	char *ext = NULL, *opts[0];
-	char *parse;
+	char *parse, *dir, *file;
 	int i = 0;
 	char tmp[256];
 
@@ -262,6 +262,11 @@
 		ast_dsp_set_threshold(sildet, 256);
 	} 
 
+	/* Create the directory if it does not exist. */
+	dir = ast_strdupa(tmp);
+	if ((file = strrchr(dir, '/')))
+		*file++ = '\0';
+	ast_mkdir (dir, 0777);
 
 	ioflags = ast_test_flag(&flags, OPTION_APPEND) ? O_CREAT|O_APPEND|O_WRONLY : O_CREAT|O_TRUNC|O_WRONLY;
 	s = ast_writefile(tmp, ext, NULL, ioflags, 0, AST_FILE_MODE);

Modified: team/group/dialplan_aesthetics/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/group/dialplan_aesthetics/main/rtp.c?view=diff&rev=71949&r1=71948&r2=71949
==============================================================================
--- team/group/dialplan_aesthetics/main/rtp.c (original)
+++ team/group/dialplan_aesthetics/main/rtp.c Tue Jun 26 16:41:57 2007
@@ -2709,6 +2709,9 @@
 	struct ast_rtp *rtp = data;
 	int res;
 	
+	if (!rtp || !rtp->rtcp)
+		return 0;
+
 	if (rtp->txcount > rtp->rtcp->lastsrtxcount)
 		res = ast_rtcp_write_sr(data);
 	else




More information about the asterisk-commits mailing list