s3-mdssvc: make mds_ctx_destructor_cb static
authorRalph Boehme <slow@samba.org>
Tue, 12 Mar 2019 14:29:48 +0000 (15:29 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 24 Apr 2019 18:32:15 +0000 (18:32 +0000)
This is only used in this compilation unit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/rpc_server/mdssvc/mdssvc.c
source3/rpc_server/mdssvc/mdssvc.h

index 693675fff6ff64dddaeedb028bfdb0d7a682fddc..7111f0e87ca84b531662f3d866b17bcf74d203d2 100644 (file)
@@ -1860,6 +1860,36 @@ bool mds_shutdown(void)
        return true;
 }
 
+/**
+ * Tear down connections and free all resources
+ **/
+static int mds_ctx_destructor_cb(struct mds_ctx *mds_ctx)
+{
+       /*
+        * We need to free query_list before ino_path_map
+        */
+       while (mds_ctx->query_list != NULL) {
+               /*
+                * slq destructor removes element from list.
+                * Don't use TALLOC_FREE()!
+                */
+               talloc_free(mds_ctx->query_list);
+       }
+       TALLOC_FREE(mds_ctx->ino_path_map);
+
+       if (mds_ctx->tracker_con != NULL) {
+               g_object_unref(mds_ctx->tracker_con);
+       }
+       if (mds_ctx->gcancellable != NULL) {
+               g_cancellable_cancel(mds_ctx->gcancellable);
+               g_object_unref(mds_ctx->gcancellable);
+       }
+
+       ZERO_STRUCTP(mds_ctx);
+
+       return 0;
+}
+
 /**
  * Initialise a context per RPC bind
  *
@@ -1919,36 +1949,6 @@ error:
        return NULL;
 }
 
-/**
- * Tear down connections and free all resources
- **/
-int mds_ctx_destructor_cb(struct mds_ctx *mds_ctx)
-{
-       /*
-        * We need to free query_list before ino_path_map
-        */
-       while (mds_ctx->query_list != NULL) {
-               /*
-                * slq destructor removes element from list.
-                * Don't use TALLOC_FREE()!
-                */
-               talloc_free(mds_ctx->query_list);
-       }
-       TALLOC_FREE(mds_ctx->ino_path_map);
-
-       if (mds_ctx->tracker_con != NULL) {
-               g_object_unref(mds_ctx->tracker_con);
-       }
-       if (mds_ctx->gcancellable != NULL) {
-               g_cancellable_cancel(mds_ctx->gcancellable);
-               g_object_unref(mds_ctx->gcancellable);
-       }
-
-       ZERO_STRUCTP(mds_ctx);
-
-       return 0;
-}
-
 /**
  * Dispatch a Spotlight RPC command
  **/
index b9e3e56f785a4d07202895fc29eb901f3cf40760..baf0e92f8f28dfb13e125caa938aa0f868626d1d 100644 (file)
@@ -129,7 +129,6 @@ extern struct mds_ctx *mds_init_ctx(TALLOC_CTX *mem_ctx,
                                    struct tevent_context *ev,
                                    struct auth_session_info *session_info,
                                    const char *path);
-extern int mds_ctx_destructor_cb(struct mds_ctx *mds_ctx);
 extern bool mds_dispatch(struct mds_ctx *query_ctx,
                         struct mdssvc_blob *request_blob,
                         struct mdssvc_blob *response_blob);