svn commit: samba r20225 - in branches/SAMBA_4_0/source/libnet: .

metze at samba.org metze at samba.org
Sun Dec 17 13:33:43 GMT 2006


Author: metze
Date: 2006-12-17 13:33:43 +0000 (Sun, 17 Dec 2006)
New Revision: 20225

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

Log:
we can't use composite_error() in a _recv() function, as that would
trigger the caller to call the _recv() function again and will be an endless
loop.

this is just a fix the to prevent this, and use a more usefull error code
than NT_STATUS_UNSUCCESSFUL

I think we should move the checks about valid responses into the function
which receives the the response (here continue_name_found()),
so that the _recv() function only needs to transfer the output vars to the caller
without any logic to analyse the network response.

metze
Modified:
   branches/SAMBA_4_0/source/libnet/libnet_lookup.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_lookup.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_lookup.c	2006-12-17 13:20:57 UTC (rev 20224)
+++ branches/SAMBA_4_0/source/libnet/libnet_lookup.c	2006-12-17 13:33:43 UTC (rev 20225)
@@ -419,7 +419,9 @@
 			struct lsa_TransSidArray *sids = s->lookup.out.sids;
 
 			if (domains == NULL || sids == NULL) {
-				composite_error(c, NT_STATUS_UNSUCCESSFUL);
+				status = NT_STATUS_UNSUCCESSFUL;
+				io->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status));
+				goto done;
 			}
 
 			if (sids->count > 0) {
@@ -440,6 +442,7 @@
 		io->out.error_string = talloc_asprintf(mem_ctx, "Error: %s", nt_errstr(status));
 	}
 
+done:
 	talloc_free(c);
 	return status;
 }



More information about the samba-cvs mailing list