svn commit: samba r23740 - in branches/SAMBA_3_0_26/source/smbd: .
vlendec at samba.org
vlendec at samba.org
Sat Jul 7 09:17:07 GMT 2007
Author: vlendec
Date: 2007-07-07 09:17:07 +0000 (Sat, 07 Jul 2007)
New Revision: 23740
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23740
Log:
Merge r23725 from 3_0:
Remove get_current_mid()
Modified:
branches/SAMBA_3_0_26/source/smbd/open.c
branches/SAMBA_3_0_26/source/smbd/process.c
Changeset:
Modified: branches/SAMBA_3_0_26/source/smbd/open.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/open.c 2007-07-07 09:13:33 UTC (rev 23739)
+++ branches/SAMBA_3_0_26/source/smbd/open.c 2007-07-07 09:17:07 UTC (rev 23740)
@@ -648,6 +648,7 @@
static BOOL delay_for_oplocks(struct share_mode_lock *lck,
files_struct *fsp,
+ uint16 mid,
int pass_number,
int oplock_request)
{
@@ -732,7 +733,7 @@
DEBUG(10, ("Sending break request to PID %s\n",
procid_str_static(&exclusive->pid)));
- exclusive->op_mid = get_current_mid();
+ exclusive->op_mid = mid;
/* Create the message. */
share_mode_entry_to_message(msg, exclusive);
@@ -772,9 +773,9 @@
static void defer_open(struct share_mode_lock *lck,
struct timeval request_time,
struct timeval timeout,
+ uint16 mid,
struct deferred_open_record *state)
{
- uint16 mid = get_current_mid();
int i;
/* Paranoia check */
@@ -1069,7 +1070,9 @@
}
-static void schedule_defer_open(struct share_mode_lock *lck, struct timeval request_time)
+static void schedule_defer_open(struct share_mode_lock *lck,
+ struct timeval request_time,
+ uint16 mid)
{
struct deferred_open_record state;
@@ -1100,7 +1103,7 @@
state.id = lck->id;
if (!request_timed_out(request_time, timeout)) {
- defer_open(lck, request_time, timeout, &state);
+ defer_open(lck, request_time, timeout, mid, &state);
}
}
@@ -1447,8 +1450,10 @@
}
/* First pass - send break only on batch oplocks. */
- if (delay_for_oplocks(lck, fsp, 1, oplock_request)) {
- schedule_defer_open(lck, request_time);
+ if ((req != NULL)
+ && delay_for_oplocks(lck, fsp, req->mid, 1,
+ oplock_request)) {
+ schedule_defer_open(lck, request_time, req->mid);
TALLOC_FREE(lck);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
@@ -1465,8 +1470,11 @@
* status again. */
/* Second pass - send break for both batch or
* exclusive oplocks. */
- if (delay_for_oplocks(lck, fsp, 2, oplock_request)) {
- schedule_defer_open(lck, request_time);
+ if ((req != NULL)
+ && delay_for_oplocks(lck, fsp, req->mid, 2,
+ oplock_request)) {
+ schedule_defer_open(lck, request_time,
+ req->mid);
TALLOC_FREE(lck);
file_free(fsp);
return NT_STATUS_SHARING_VIOLATION;
@@ -1580,10 +1588,11 @@
state.delayed_for_oplocks = False;
state.id = id;
- if (!request_timed_out(request_time,
- timeout)) {
+ if ((req != NULL)
+ && !request_timed_out(request_time,
+ timeout)) {
defer_open(lck, request_time, timeout,
- &state);
+ req->mid, &state);
}
}
@@ -1671,8 +1680,10 @@
}
/* First pass - send break only on batch oplocks. */
- if (delay_for_oplocks(lck, fsp, 1, oplock_request)) {
- schedule_defer_open(lck, request_time);
+ if ((req != NULL)
+ && delay_for_oplocks(lck, fsp, req->mid, 1,
+ oplock_request)) {
+ schedule_defer_open(lck, request_time, req->mid);
TALLOC_FREE(lck);
fd_close(conn, fsp);
file_free(fsp);
@@ -1688,8 +1699,11 @@
* status again. */
/* Second pass - send break for both batch or
* exclusive oplocks. */
- if (delay_for_oplocks(lck, fsp, 2, oplock_request)) {
- schedule_defer_open(lck, request_time);
+ if ((req != NULL)
+ && delay_for_oplocks(lck, fsp, req->mid, 2,
+ oplock_request)) {
+ schedule_defer_open(lck, request_time,
+ req->mid);
TALLOC_FREE(lck);
fd_close(conn, fsp);
file_free(fsp);
@@ -1713,8 +1727,10 @@
* "goto top of this function", but don't tell
* anybody... */
- defer_open(lck, request_time, timeval_zero(),
- &state);
+ if (req != NULL) {
+ defer_open(lck, request_time, timeval_zero(),
+ req->mid, &state);
+ }
TALLOC_FREE(lck);
return status;
}
Modified: branches/SAMBA_3_0_26/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/process.c 2007-07-07 09:13:33 UTC (rev 23739)
+++ branches/SAMBA_3_0_26/source/smbd/process.c 2007-07-07 09:17:07 UTC (rev 23740)
@@ -49,15 +49,6 @@
extern BOOL global_machine_password_needs_changing;
extern int max_send;
-/****************************************************************************
- Function to return the current request mid from Inbuffer.
-****************************************************************************/
-
-uint16 get_current_mid(void)
-{
- return SVAL(InBuffer,smb_mid);
-}
-
/*
* Initialize a struct smb_request from an inbuf
*/
More information about the samba-cvs
mailing list