[asterisk-commits] tzafrir: branch tzafrir/monitor-rtp-14 r213887 - /team/tzafrir/monitor-rtp-14...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 24 18:02:56 CDT 2009


Author: tzafrir
Date: Mon Aug 24 18:02:53 2009
New Revision: 213887

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=213887
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-14/main/file.c

Modified: team/tzafrir/monitor-rtp-14/main/file.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp-14/main/file.c?view=diff&rev=213887&r1=213886&r2=213887
==============================================================================
--- team/tzafrir/monitor-rtp-14/main/file.c (original)
+++ team/tzafrir/monitor-rtp-14/main/file.c Mon Aug 24 18:02:53 2009
@@ -1073,6 +1073,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);
+	}
 	if (AST_LIST_LOCK(&formats)) {
 		ast_log(LOG_WARNING, "Unable to lock format list\n");
 		return NULL;




More information about the asterisk-commits mailing list