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

vlendec at samba.org vlendec at samba.org
Thu Aug 2 19:48:45 GMT 2007


Author: vlendec
Date: 2007-08-02 19:48:44 +0000 (Thu, 02 Aug 2007)
New Revision: 24140

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

Log:
Convert call_trans2findnotifyfirst/next to the new API
Modified:
   branches/SAMBA_3_2/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/trans2.c	2007-08-02 19:35:27 UTC (rev 24139)
+++ branches/SAMBA_3_2/source/smbd/trans2.c	2007-08-02 19:48:44 UTC (rev 24140)
@@ -6482,16 +6482,19 @@
  We don't actually do this - we just send a null response.
 ****************************************************************************/
 
-static int call_trans2findnotifyfirst(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize,
-					char **pparams, int total_params, char **ppdata, int total_data,
-					unsigned int max_data_bytes)
+static void call_trans2findnotifyfirst(connection_struct *conn,
+				       struct smb_request *req,
+				       char **pparams, int total_params,
+				       char **ppdata, int total_data,
+				       unsigned int max_data_bytes)
 {
 	static uint16 fnf_handle = 257;
 	char *params = *pparams;
 	uint16 info_level;
 
 	if (total_params < 6) {
-		return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+		reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+		return;
 	}
 
 	info_level = SVAL(params,4);
@@ -6502,13 +6505,15 @@
 		case 2:
 			break;
 		default:
-			return ERROR_NT(NT_STATUS_INVALID_LEVEL);
+			reply_nterror(req, NT_STATUS_INVALID_LEVEL);
+			return;
 	}
 
 	/* Realloc the parameter and data sizes */
 	*pparams = (char *)SMB_REALLOC(*pparams,6);
 	if (*pparams == NULL) {
-		return ERROR_NT(NT_STATUS_NO_MEMORY);
+		reply_nterror(req, NT_STATUS_NO_MEMORY);
+		return;
 	}
 	params = *pparams;
 
@@ -6521,9 +6526,9 @@
 	if(fnf_handle == 0)
 		fnf_handle = 257;
 
-	send_trans2_replies(inbuf, outbuf, bufsize, params, 6, *ppdata, 0, max_data_bytes);
+	send_trans2_replies_new(req, params, 6, *ppdata, 0, max_data_bytes);
   
-	return(-1);
+	return;
 }
 
 /****************************************************************************
@@ -6531,9 +6536,11 @@
  changes). Currently this does nothing.
 ****************************************************************************/
 
-static int call_trans2findnotifynext(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize,
-					char **pparams, int total_params, char **ppdata, int total_data,
-					unsigned int max_data_bytes)
+static void call_trans2findnotifynext(connection_struct *conn,
+				      struct smb_request *req,
+				      char **pparams, int total_params,
+				      char **ppdata, int total_data,
+				      unsigned int max_data_bytes)
 {
 	char *params = *pparams;
 
@@ -6542,16 +6549,17 @@
 	/* Realloc the parameter and data sizes */
 	*pparams = (char *)SMB_REALLOC(*pparams,4);
 	if (*pparams == NULL) {
-		return ERROR_NT(NT_STATUS_NO_MEMORY);
+		reply_nterror(req, NT_STATUS_NO_MEMORY);
+		return;
 	}
 	params = *pparams;
 
 	SSVAL(params,0,0); /* No changes */
 	SSVAL(params,2,0); /* No EA errors */
 
-	send_trans2_replies(inbuf, outbuf, bufsize, params, 4, *ppdata, 0, max_data_bytes);
+	send_trans2_replies_new(req, params, 4, *ppdata, 0, max_data_bytes);
   
-	return(-1);
+	return;
 }
 
 /****************************************************************************
@@ -6783,11 +6791,10 @@
 	case TRANSACT2_FINDNOTIFYFIRST:
 	{
 		START_PROFILE(Trans2_findnotifyfirst);
-		outsize = call_trans2findnotifyfirst(
-			conn, inbuf, outbuf, size, bufsize, 
-			&state->param, state->total_param,
-			&state->data, state->total_data,
-			state->max_data_return);
+		call_trans2findnotifyfirst(conn, req,
+					   &state->param, state->total_param,
+					   &state->data, state->total_data,
+					   state->max_data_return);
 		END_PROFILE(Trans2_findnotifyfirst);
 		break;
 	}
@@ -6795,11 +6802,10 @@
 	case TRANSACT2_FINDNOTIFYNEXT:
 	{
 		START_PROFILE(Trans2_findnotifynext);
-		outsize = call_trans2findnotifynext(
-			conn, inbuf, outbuf, size, bufsize, 
-			&state->param, state->total_param,
-			&state->data, state->total_data,
-			state->max_data_return);
+		call_trans2findnotifynext(conn, req,
+					  &state->param, state->total_param,
+					  &state->data, state->total_data,
+					  state->max_data_return);
 		END_PROFILE(Trans2_findnotifynext);
 		break;
 	}



More information about the samba-cvs mailing list