diff options
author | Pavel Emelyanov <xemul@virtuozzo.com> | 2017-01-16 11:07:10 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2017-01-16 11:07:10 +0300 |
commit | b9b34d4276058c4a0d3a49139123444cc3350b1c (patch) | |
tree | c6c50e65f32e96fc323c9b109daf586a4e4df3bc /soccr | |
parent | 1fb852bb20043f7aa6dc58c0eb044c914ae57878 (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.c | 5 | ||||
-rw-r--r-- | soccr/soccr.h | 3 |
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 */ |