TODO no,no... s3:modules/onefs_cbrl: pass smbd_server_connection to onefs_cbrl_find_blr()
authorStefan Metzmacher <metze@samba.org>
Fri, 16 Dec 2011 16:08:29 +0000 (17:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:47:12 +0000 (18:47 +0200)
metze

source3/modules/onefs_cbrl.c

index 5d5d63f86b64d31b11e5290477f794717b960601..d776d15e59f3d8604583b6015cd174aa8dcfdf0f 100644 (file)
@@ -105,9 +105,9 @@ static void onefs_cbrl_enumerate_blq(struct smbd_server_connection *sconn,
        }
 }
 
-static struct blocking_lock_record *onefs_cbrl_find_blr(uint64_t id)
+static struct blocking_lock_record *onefs_cbrl_find_blr(struct smbd_server_connection *sconn,
+                                                       uint64_t id)
 {
-       struct smbd_server_connection *sconn = smbd_server_conn;
        struct blocking_lock_record *blr;
        struct onefs_cbrl_blr_state *bs;
 
@@ -156,6 +156,7 @@ static struct blocking_lock_record *onefs_cbrl_find_blr(uint64_t id)
 
 static void onefs_cbrl_async_success(uint64_t id)
 {
+       struct smbd_server_connection *sconn = smbd_server_conn;
        struct blocking_lock_record *blr;
        struct onefs_cbrl_blr_state *bs;
        uint16 num_locks;
@@ -163,7 +164,7 @@ static void onefs_cbrl_async_success(uint64_t id)
        DEBUG(10, ("CBRL async success!\n"));
 
        /* Find BLR with id. Its okay not to find one (race with cancel) */
-       blr = onefs_cbrl_find_blr(id);
+       blr = onefs_cbrl_find_blr(sconn, id);
        if (blr == NULL)
                return;
 
@@ -191,13 +192,14 @@ static void onefs_cbrl_async_success(uint64_t id)
 
 static void onefs_cbrl_async_failure(uint64_t id)
 {
+       struct smbd_server_connection *sconn = smbd_server_conn;
        struct blocking_lock_record *blr;
        struct onefs_cbrl_blr_state *bs;
 
        DEBUG(10, ("CBRL async failure!\n"));
 
        /* Find BLR with id. Its okay not to find one (race with cancel) */
-       blr = onefs_cbrl_find_blr(id);
+       blr = onefs_cbrl_find_blr(sconn, id);
        if (blr == NULL)
                return;