From 708bfacc867e4966235cea27ec977f7cb8766b35 Mon Sep 17 00:00:00 2001 From: Jonathan Xu Date: Mon, 4 May 2020 18:48:32 +0800 Subject: [PATCH] Remove compile dependency on ccnet. --- common/seaf-utils.c | 33 --------------------------------- common/seaf-utils.h | 6 ------ 2 files changed, 39 deletions(-) diff --git a/common/seaf-utils.c b/common/seaf-utils.c index 8f1ee44..30e21dc 100644 --- a/common/seaf-utils.c +++ b/common/seaf-utils.c @@ -10,9 +10,6 @@ #include #include -#include -#include - char * seafile_session_get_tmp_file_path (SeafileSession *session, const char *basename, @@ -353,33 +350,3 @@ load_ccnet_database_config (SeafileSession *session) return ret; } - -SearpcClient * -create_ccnet_rpc_client () -{ - SearpcNamedPipeClient *transport = NULL; - char *pipe_path = NULL; - - pipe_path = g_build_path ("/", seaf->ccnet_dir, CCNET_RPC_PIPE_NAME, NULL); - transport = searpc_create_named_pipe_client(pipe_path); - g_free(pipe_path); - if (!transport) - return NULL; - - if (searpc_named_pipe_client_connect(transport) < 0) { - seaf_warning ("Named pipe client failed to connect.\n"); - g_free (transport); - return NULL; - } - - return searpc_client_with_named_pipe_transport (transport, "ccnet-threaded-rpcserver"); -} - -void -release_ccnet_rpc_client (SearpcClient *client) -{ - if (!client) - return; - - searpc_free_client_with_pipe_transport (client); -} diff --git a/common/seaf-utils.h b/common/seaf-utils.h index c13fce8..2113c44 100644 --- a/common/seaf-utils.h +++ b/common/seaf-utils.h @@ -16,10 +16,4 @@ load_database_config (struct _SeafileSession *session); int load_ccnet_database_config (struct _SeafileSession *session); -SearpcClient * -create_ccnet_rpc_client (); - -void -release_ccnet_rpc_client (SearpcClient *client); - #endif