svn commit: samba r24659 - in branches/SAMBA_3_2/source/smbd: .

vlendec at samba.org vlendec at samba.org
Sat Aug 25 19:47:58 GMT 2007


Author: vlendec
Date: 2007-08-25 19:47:57 +0000 (Sat, 25 Aug 2007)
New Revision: 24659

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

Log:
Some formatting changes helping to minimize the 3_2_0 diff
Modified:
   branches/SAMBA_3_2/source/smbd/negprot.c
   branches/SAMBA_3_2/source/smbd/nttrans.c
   branches/SAMBA_3_2/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/negprot.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/negprot.c	2007-08-25 16:48:35 UTC (rev 24658)
+++ branches/SAMBA_3_2/source/smbd/negprot.c	2007-08-25 19:47:57 UTC (rev 24659)
@@ -229,10 +229,9 @@
 		char *host_princ_s = NULL;
 		name_to_fqdn(myname, global_myname());
 		strlower_m(myname);
-		asprintf(&host_princ_s, "cifs/%s@%s", myname, lp_realm());
-		if (host_princ_s == NULL) {
-			blob = data_blob_null;
-			return blob;
+		if (asprintf(&host_princ_s, "cifs/%s@%s", myname, lp_realm())
+		    == -1) {
+			return data_blob_null;
 		}
 		blob = spnego_gen_negTokenInit(guid, OIDs_krb5, host_princ_s);
 		SAFE_FREE(host_princ_s);
@@ -540,7 +539,7 @@
 	num_cliprotos = 0;
 	cliprotos = NULL;
 
-	while (p < (smb_buf(req->inbuf) + bcc)) { 
+	while (p < (smb_buf(req->inbuf) + bcc)) {
 
 		char **tmp;
 

Modified: branches/SAMBA_3_2/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/nttrans.c	2007-08-25 16:48:35 UTC (rev 24658)
+++ branches/SAMBA_3_2/source/smbd/nttrans.c	2007-08-25 19:47:57 UTC (rev 24659)
@@ -859,19 +859,19 @@
 						create_options,
 						file_attributes,
 						&info, &fsp);
-
 		}
 	}
 
 	TALLOC_FREE(case_state);
 
-        if (!NT_STATUS_IS_OK(status)) {
-		END_PROFILE(SMBntcreateX);
+	if (!NT_STATUS_IS_OK(status)) {
 		if (open_was_deferred(req->mid)) {
 			/* We have re-scheduled this call. */
+			END_PROFILE(SMBntcreateX);
 			return;
 		}
 		reply_openerror(req, status);
+		END_PROFILE(SMBntcreateX);
 		return;
 	}
 

Modified: branches/SAMBA_3_2/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/reply.c	2007-08-25 16:48:35 UTC (rev 24658)
+++ branches/SAMBA_3_2/source/smbd/reply.c	2007-08-25 19:47:57 UTC (rev 24659)
@@ -486,7 +486,7 @@
 	SSVAL(req->outbuf,smb_vwv1,conn->cnum);
 	SSVAL(req->outbuf,smb_tid,conn->cnum);
 
-	DEBUG(3,("tcon service=%s cnum=%d\n", 
+	DEBUG(3,("tcon service=%s cnum=%d\n",
 		 service, conn->cnum));
 
 	END_PROFILE(SMBtcon);
@@ -1550,12 +1550,13 @@
 			&info, &fsp);
 
 	if (!NT_STATUS_IS_OK(status)) {
-		END_PROFILE(SMBopen);
 		if (open_was_deferred(req->mid)) {
+			END_PROFILE(SMBopen);
 			/* We have re-scheduled this call. */
 			return;
 		}
 		reply_openerror(req, status);
+		END_PROFILE(SMBopen);
 		return;
 	}
 
@@ -1876,7 +1877,7 @@
 
 	srvstr_get_path((char *)req->inbuf, req->flags2, fname,
                         smb_buf(req->inbuf) + 1, sizeof(fname), 0,
-		       	STR_TERMINATE, &status);
+			STR_TERMINATE, &status);
 	if (!NT_STATUS_IS_OK(status)) {
 		reply_nterror(req, status);
 		END_PROFILE(SMBcreate);
@@ -1947,7 +1948,6 @@
 	file_ntimes(conn, fname, ts);
 
 	reply_outbuf(req, 1, 0);
-
 	SSVAL(req->outbuf,smb_vwv0,fsp->fnum);
 
 	if (oplock_request && lp_fake_oplocks(SNUM(conn))) {
@@ -2059,12 +2059,13 @@
 	close(tmpfd);
 
 	if (!NT_STATUS_IS_OK(status)) {
-		END_PROFILE(SMBctemp);
 		if (open_was_deferred(req->mid)) {
 			/* We have re-scheduled this call. */
+			END_PROFILE(SMBctemp);
 			return;
 		}
 		reply_openerror(req, status);
+		END_PROFILE(SMBctemp);
 		return;
 	}
 
@@ -2668,7 +2669,7 @@
 
 	fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
 
-	/* 
+	/*
 	 * We have to do a check_fsp by hand here, as
 	 * we must always return 4 zero bytes on error,
 	 * not a NTSTATUS.
@@ -2760,7 +2761,7 @@
 	if (startpos >= size) {
 		nread = 0;
 	} else {
-		nread = MIN(maxcount,(size - startpos));	  
+		nread = MIN(maxcount,(size - startpos));
 	}
 
 #if 0 /* mincount appears to be ignored in a W2K server. JRA. */
@@ -3088,7 +3089,6 @@
 		TALLOC_FREE(req->outbuf);
 		return;
 	}
-
 #endif
 
 normal_read:



More information about the samba-cvs mailing list