[svn-commits] rizzo: branch rizzo/astobj2 r46119 - /team/rizzo/astobj2/main/manager.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Oct 24 10:04:54 MST 2006


Author: rizzo
Date: Tue Oct 24 12:04:53 2006
New Revision: 46119

URL: http://svn.digium.com/view/asterisk?rev=46119&view=rev
Log:
- make responses uncacheable;
- disable verbose debugging


Modified:
    team/rizzo/astobj2/main/manager.c

Modified: team/rizzo/astobj2/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/main/manager.c?rev=46119&r1=46118&r2=46119&view=diff
==============================================================================
--- team/rizzo/astobj2/main/manager.c (original)
+++ team/rizzo/astobj2/main/manager.c Tue Oct 24 12:04:53 2006
@@ -2451,7 +2451,8 @@
 		if (in && *in == '\n')		/* remove trailing \n if any */
 			in++;
 		ast_trim_blanks(val);
-		ast_verbose("inobj %d in_data %d line <%s>\n", inobj, in_data, val);
+		if (0)
+			ast_verbose("inobj %d in_data %d line <%s>\n", inobj, in_data, val);
 		if (ast_strlen_zero(val)) {
 			if (in_data) { /* close data */
 				ast_build_string(&tmp, &len, xml ? "'" : "</td></tr>\n");
@@ -2554,6 +2555,7 @@
 		char cookie[128];
 
 		ast_build_string(&c, &len, "Content-type: text/%s\r\n", contenttype[format]);
+		ast_build_string(&c, &len, "Cache-Control: no-cache;\r\n");
 		sprintf(tmp, "%08lx", s->managerid);
 		ast_build_string(&c, &len, "%s\r\n", ast_http_setcookie("mansession_id", tmp, httptimeout, cookie, sizeof(cookie)));
 	}
@@ -2605,7 +2607,8 @@
 			if (s->outputstr) {
 				lseek(s->fd, 0, SEEK_SET);
 				read(s->fd, buf, len);
-				ast_verbose("--- fd %d has %d bytes ---\n%s\n---\n", s->fd, (int)len, buf);
+				if (0)
+					ast_verbose("--- fd %d has %d bytes ---\n%s\n---\n", s->fd, (int)len, buf);
 				ast_dynamic_str_append(&s->outputstr, 0, "%s", buf);
 			}
 			free(buf);
@@ -2645,8 +2648,9 @@
 	ast_mutex_lock(&s->__lock);
 	/* Reset HTTP timeout.  If we're not authenticated, keep it extremely short */
 	s->sessiontimeout = time(NULL) + ((s->authenticated || httptimeout < 5) ? httptimeout : 5);
-	ast_verbose("die in %d seconds\n",
-		(int)(s->sessiontimeout - time(NULL)) );
+	if (0)
+		ast_verbose("die in %d seconds\n",
+			(int)(s->sessiontimeout - time(NULL)) );
 	if (s->needdestroy) {
 		if (s->inuse == 1) {
 			if (option_debug)



More information about the svn-commits mailing list