svn commit: samba r12238 - in branches/SAMBA_4_0/source/libcli/wrepl: .

metze at samba.org metze at samba.org
Wed Dec 14 18:22:38 GMT 2005


Author: metze
Date: 2005-12-14 18:22:38 +0000 (Wed, 14 Dec 2005)
New Revision: 12238

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

Log:
don't crash when an error happens while connecting and the packet_context isn't inplace yet

metze
Modified:
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c	2005-12-14 18:20:19 UTC (rev 12237)
+++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c	2005-12-14 18:22:38 UTC (rev 12238)
@@ -38,15 +38,18 @@
 	talloc_set_destructor(wrepl_socket, NULL);
 	wrepl_socket->dead = True;
 
-	if (wrepl_socket->event.fde) {
+	if (wrepl_socket->packet) {
 		packet_recv_disable(wrepl_socket->packet);
 		packet_set_fde(wrepl_socket->packet, NULL);
+		packet_set_socket(wrepl_socket->packet, NULL);
+	}
+
+	if (wrepl_socket->event.fde) {
 		talloc_free(wrepl_socket->event.fde);
 		wrepl_socket->event.fde = NULL;
 	}
 
 	if (wrepl_socket->sock) {
-		packet_set_socket(wrepl_socket->packet, NULL);
 		talloc_free(wrepl_socket->sock);
 		wrepl_socket->sock = NULL;
 	}



More information about the samba-cvs mailing list