[asterisk-commits] twilson: branch 1.6.0 r168589 - in /branches/1.6.0: ./ main/http.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 13 17:11:19 CST 2009


Author: twilson
Date: Tue Jan 13 17:11:19 2009
New Revision: 168589

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168589
Log:
Merged revisions 168588 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r168588 | twilson | 2009-01-13 17:05:43 -0600 (Tue, 13 Jan 2009) | 5 lines
  
  Fully overwrite a same-named file when uploading
  
  (closes issue #14190)
  Reported by: timking
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/http.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/http.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/http.c?view=diff&rev=168589&r1=168588&r2=168589
==============================================================================
--- branches/1.6.0/main/http.c (original)
+++ branches/1.6.0/main/http.c Tue Jan 13 17:11:19 2009
@@ -386,7 +386,7 @@
 
 	ast_debug(1, "Posting raw data to %s\n", filename);
 
-	if ((fd = open(filename, O_CREAT | O_WRONLY, 0666)) == -1) {
+	if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666)) == -1) {
 		ast_log(LOG_WARNING, "Unable to open %s for writing file from a POST!\n", filename);
 		return;
 	}




More information about the asterisk-commits mailing list