svn commit: samba r4919 - in branches/SAMBA_4_0/source/libcli/resolve: .

tridge at samba.org tridge at samba.org
Sat Jan 22 01:37:48 GMT 2005


Author: tridge
Date: 2005-01-22 01:37:48 +0000 (Sat, 22 Jan 2005)
New Revision: 4919

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

Log:
if a caller doesn't provide an event context to the resolver library,
then create one. This fixes a crash in the RAW-NEGNOWAIT test for
'host' resolution.

Modified:
   branches/SAMBA_4_0/source/libcli/resolve/resolve.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/resolve/resolve.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/resolve/resolve.c	2005-01-22 01:22:46 UTC (rev 4918)
+++ branches/SAMBA_4_0/source/libcli/resolve/resolve.c	2005-01-22 01:37:48 UTC (rev 4919)
@@ -138,7 +138,12 @@
 
 	c->state = SMBCLI_REQUEST_SEND;
 	c->private = state;
-	c->event_ctx = talloc_reference(c, event_ctx);
+	if (event_ctx == NULL) {
+		c->event_ctx = event_context_init(c);
+		if (c->event_ctx == NULL) goto failed;
+	} else {
+		c->event_ctx = talloc_reference(c, event_ctx);
+	}
 
 	state->req = setup_next_method(c);
 	if (state->req == NULL) goto failed;



More information about the samba-cvs mailing list