svn commit: samba r8665 - in branches/SAMBA_4_0/source/web_server: .

tridge at samba.org tridge at samba.org
Thu Jul 21 07:52:31 GMT 2005


Author: tridge
Date: 2005-07-21 07:52:31 +0000 (Thu, 21 Jul 2005)
New Revision: 8665

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8665

Log:
fixed a segv at high debug level in the web server
thanks to volker for finding this




Modified:
   branches/SAMBA_4_0/source/web_server/http.c


Changeset:
Modified: branches/SAMBA_4_0/source/web_server/http.c
===================================================================
--- branches/SAMBA_4_0/source/web_server/http.c	2005-07-21 07:15:55 UTC (rev 8664)
+++ branches/SAMBA_4_0/source/web_server/http.c	2005-07-21 07:52:31 UTC (rev 8665)
@@ -870,20 +870,22 @@
 	mprSetCtx(edata->application_data);
 	mprCopyVar(edata->application_data, &esp->variables[ESP_APPLICATION_OBJ], 
 		   MPR_DEEP_COPY);
+	mprSetCtx(esp);
 
 	/* copy any session data */
 	if (web->session) {
 		talloc_free(web->session->data);
 		web->session->data = talloc_zero(web->session, struct MprVar);
-		mprSetCtx(web->session->data);
 		if (esp->variables[ESP_SESSION_OBJ].properties == NULL ||
 		    esp->variables[ESP_SESSION_OBJ].properties[0].numItems == 0) {
 			talloc_free(web->session);
 			web->session = NULL;
 		} else {
+			mprSetCtx(web->session->data);
 			mprCopyVar(web->session->data, &esp->variables[ESP_SESSION_OBJ], 
 				   MPR_DEEP_COPY);
 			/* setup the timeout for the session data */
+			mprSetCtx(esp);
 			talloc_free(web->session->te);
 			web->session->te = event_add_timed(web->conn->event.ctx, web->session, 
 							   timeval_current_ofs(web->session->lifetime, 0), 
@@ -895,6 +897,7 @@
 	return;
 	
 internal_error:
+	mprSetCtx(esp);
 	talloc_free(esp);
 	http_error(web, 500, "Internal server error");
 }



More information about the samba-cvs mailing list