Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/soccr
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@virtuozzo.com>2017-01-16 11:07:10 +0300
committerPavel Emelyanov <xemul@virtuozzo.com>2017-01-16 11:07:10 +0300
commitb9b34d4276058c4a0d3a49139123444cc3350b1c (patch)
treec6c50e65f32e96fc323c9b109daf586a4e4df3bc /soccr
parent1fb852bb20043f7aa6dc58c0eb044c914ae57878 (diff)
soccr: Add call to release the soccr handler
It's the same as libsoccr_resume, but doesn't mess with the socket file descriptor. Just release the handle. Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'soccr')
-rw-r--r--soccr/soccr.c5
-rw-r--r--soccr/soccr.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/soccr/soccr.c b/soccr/soccr.c
index afa92dcce..7d093b1aa 100644
--- a/soccr/soccr.c
+++ b/soccr/soccr.c
@@ -141,6 +141,11 @@ struct libsoccr_sk *libsoccr_pause(int fd)
void libsoccr_resume(struct libsoccr_sk *sk)
{
tcp_repair_off(sk->fd);
+ libsoccr_release(sk);
+}
+
+void libsoccr_release(struct libsoccr_sk *sk)
+{
if (sk->flags & SK_FLAG_FREE_RQ)
free(sk->recv_queue);
if (sk->flags & SK_FLAG_FREE_SQ)
diff --git a/soccr/soccr.h b/soccr/soccr.h
index a30129d7f..a6562bfb7 100644
--- a/soccr/soccr.h
+++ b/soccr/soccr.h
@@ -124,6 +124,9 @@ struct libsoccr_sk_data {
struct libsoccr_sk *libsoccr_pause(int fd);
void libsoccr_resume(struct libsoccr_sk *sk);
+/* This one is like _resume, but doesn't turn repair off on socket. */
+void libsoccr_release(struct libsoccr_sk *sk);
+
/*
* Flags for calls below
*/