diff --git a/lib/c/criu.c b/lib/c/criu.c index ad84e8837..00ececa1f 100644 --- a/lib/c/criu.c +++ b/lib/c/criu.c @@ -49,19 +49,10 @@ void criu_free_service(criu_opts *opts) } } -void criu_local_set_service_comm(criu_opts *opts, enum criu_service_comm comm) -{ - opts->service_comm = comm; -} - -void criu_set_service_comm(enum criu_service_comm comm) -{ - criu_local_set_service_comm(global_opts, comm); -} - int criu_local_set_service_address(criu_opts *opts, const char *path) { criu_free_service(opts); + opts->service_comm = CRIU_COMM_SK; if (path) { opts->service_address = strdup(path); } else { @@ -81,6 +72,7 @@ int criu_set_service_address(const char *path) void criu_local_set_service_fd(criu_opts *opts, int fd) { criu_free_service(opts); + opts->service_comm = CRIU_COMM_FD; opts->service_fd = fd; } @@ -92,6 +84,7 @@ void criu_set_service_fd(int fd) int criu_local_set_service_binary(criu_opts *opts, const char *path) { criu_free_service(opts); + opts->service_comm = CRIU_COMM_BIN; if (path) { opts->service_binary = strdup(path); } else { diff --git a/lib/c/criu.h b/lib/c/criu.h index f5095dd9b..c4d80a4fd 100644 --- a/lib/c/criu.h +++ b/lib/c/criu.h @@ -45,12 +45,6 @@ int criu_set_service_address(const char *path); void criu_set_service_fd(int fd); int criu_set_service_binary(const char *path); -/* - * You can choose if you want libcriu to connect to service socket - * by itself, use provided file descriptor or spawn swrk by itself - */ -void criu_set_service_comm(enum criu_service_comm); - /* * Set opts to defaults. _Must_ be called first before using any functions from * the list down below. 0 on success, -1 on fail. @@ -165,7 +159,6 @@ void criu_local_free_opts(criu_opts *opts); int criu_local_set_service_address(criu_opts *opts, const char *path); void criu_local_set_service_fd(criu_opts *opts, int fd); -void criu_local_set_service_comm(criu_opts *opts, enum criu_service_comm); void criu_local_set_service_fd(criu_opts *opts, int fd);