mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-05-12 10:06:28 +00:00
Remove compile dependency on ccnet.
This commit is contained in:
parent
0adc97f37e
commit
708bfacc86
common
@ -10,9 +10,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <ccnet.h>
|
||||
#include <searpc-named-pipe-transport.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user