s4-torture: Add function declarations to lease_break_handler.h
authorSachin Prabhu <sprabhu@redhat.com>
Sat, 16 Mar 2019 12:11:04 +0000 (12:11 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 19 Apr 2019 17:27:12 +0000 (17:27 +0000)
Do not completely depend on proto.h.

Also move torture_reset_break_info() to lease_break_handler.h so that
the layout is similar to that of oplock_break_handler.*

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/smb2/lease_break_handler.c
source4/torture/smb2/lease_break_handler.h

index b702344..5f8e325 100644 (file)
@@ -124,11 +124,3 @@ done:
 
        return;
 }
-
- void torture_reset_lease_break_info(struct torture_context *tctx,
-                                    struct lease_break_info *r)
-{
-       ZERO_STRUCTP(r);
-       r->tctx = tctx;
-}
-
index dc8841b..1e915e2 100644 (file)
@@ -118,5 +118,14 @@ struct lease_break_info {
 
 extern struct lease_break_info lease_break_info;
 
-void torture_reset_lease_break_info(struct torture_context *tctx,
-                                   struct lease_break_info *r);
+bool torture_lease_handler(struct smb2_transport *transport,
+                          const struct smb2_lease_break *lb,
+                          void *private_data);
+void torture_wait_for_lease_break(struct torture_context *tctx);
+
+static inline void torture_reset_lease_break_info(struct torture_context *tctx,
+                                                 struct lease_break_info *r)
+{
+       ZERO_STRUCTP(r);
+       r->tctx = tctx;
+}