r14209: don't timeout notify requests in the cifs backend, as they are
authorAndrew Tridgell <tridge@samba.org>
Sat, 11 Mar 2006 13:06:17 +0000 (13:06 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:04 +0000 (13:57 -0500)
intended to wait forever
(This used to be commit 7d8da6611850a7eab964f02ccb1adaa8c2a4358f)

source4/ntvfs/cifs/vfs_cifs.c

index 2741e97d2da44a3bcd2c85b614648f1f79ff7415..9f3af5701659b330edb4b4bad25f28349e465259 100644 (file)
@@ -890,6 +890,7 @@ static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs,
 {
        struct cvfs_private *private = ntvfs->private_data;
        struct smbcli_request *c_req;
+       int saved_timeout = private->transport->options.request_timeout;
 
        SETUP_PID;
 
@@ -897,9 +898,15 @@ static NTSTATUS cvfs_notify(struct ntvfs_module_context *ntvfs,
        if (!(req->async_states->state & NTVFS_ASYNC_STATE_MAY_ASYNC)) {
                return NT_STATUS_INVALID_PARAMETER;
        }
-       
+
+       /* we must not timeout on notify requests - they wait
+          forever */
+       private->transport->options.request_timeout = 0;
+
        c_req = smb_raw_changenotify_send(private->tree, info);
 
+       private->transport->options.request_timeout = saved_timeout;
+
        ASYNC_RECV_TAIL(info, async_changenotify);
 }