mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-01 23:33:42 +00:00
Remove compile dependency on ccnet.
This commit is contained in:
parent
0adc97f37e
commit
708bfacc86
@ -10,9 +10,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <ccnet.h>
|
|
||||||
#include <searpc-named-pipe-transport.h>
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
seafile_session_get_tmp_file_path (SeafileSession *session,
|
seafile_session_get_tmp_file_path (SeafileSession *session,
|
||||||
const char *basename,
|
const char *basename,
|
||||||
@ -353,33 +350,3 @@ load_ccnet_database_config (SeafileSession *session)
|
|||||||
|
|
||||||
return ret;
|
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
|
int
|
||||||
load_ccnet_database_config (struct _SeafileSession *session);
|
load_ccnet_database_config (struct _SeafileSession *session);
|
||||||
|
|
||||||
SearpcClient *
|
|
||||||
create_ccnet_rpc_client ();
|
|
||||||
|
|
||||||
void
|
|
||||||
release_ccnet_rpc_client (SearpcClient *client);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user