[asterisk-commits] file: trunk r53635 - /trunk/main/manager.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 8 13:39:42 MST 2007


Author: file
Date: Thu Feb  8 14:39:41 2007
New Revision: 53635

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53635
Log:
It is with pleasure that I announce the return of rawman support through the HTTP server. (issue #9013 reported by Jynger)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=53635&r1=53634&r2=53635
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Feb  8 14:39:41 2007
@@ -2809,16 +2809,17 @@
 	if (s->f != NULL) {	/* have temporary output */
 		char *buf;
 		size_t l = ftell(s->f);
-
-		if (format == FORMAT_XML || format == FORMAT_HTML) {
-			if (l) {
-				if ((buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_SHARED, s->fd, 0))) {
+		
+		if (l) {
+			if ((buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_SHARED, s->fd, 0))) {
+				if (format == FORMAT_XML || format == FORMAT_HTML)
 					xml_translate(&out, buf, params, format);
-					munmap(buf, l);
-				}
-			} else {
-				xml_translate(&out, "", params, format);
+				else
+					ast_str_append(&out, 0, buf);
+				munmap(buf, l);
 			}
+		} else if (format == FORMAT_XML || format == FORMAT_HTML) {
+			xml_translate(&out, "", params, format);
 		}
 		fclose(s->f);
 		s->f = NULL;



More information about the asterisk-commits mailing list