[asterisk-commits] tzafrir: branch tzafrir/monitor-rtp r214064 - /team/tzafrir/monitor-rtp/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 25 13:46:13 CDT 2009


Author: tzafrir
Date: Tue Aug 25 13:46:10 2009
New Revision: 214064

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214064
Log:
ast_writefile: check=1: use existing FD

Use the currently unused parameter 'check' to ast_writefile() to
mean "I already have an open file descriptor".

The file descriptor is passed in the "check" field itself.

Modified:
    team/tzafrir/monitor-rtp/main/file.c

Modified: team/tzafrir/monitor-rtp/main/file.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/main/file.c?view=diff&rev=214064&r1=214063&r2=214064
==============================================================================
--- team/tzafrir/monitor-rtp/main/file.c (original)
+++ team/tzafrir/monitor-rtp/main/file.c Tue Aug 25 13:46:10 2009
@@ -1062,6 +1062,12 @@
 	size_t size = 0;
 	int format_found = 0;
 
+	/*
+	 * Use 'check' for an open file descriptor
+	 */
+	if(check > 0) {
+		return ast_writefd((void *)filename, check, type);
+	}
 	AST_RWLIST_RDLOCK(&formats);
 
 	/* set the O_TRUNC flag if and only if there is no O_APPEND specified */




More information about the asterisk-commits mailing list