From 1fe598f5db3959e6c232e6b902ec5a6e879e347d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 27 Feb 2011 13:40:52 +0100 Subject: [PATCH] server: remove cb_free, not needed anymore https://bugs.freedesktop.org/show_bug.cgi?id=34795 --- server/reds.c | 19 ------------------- server/reds.h | 1 - 2 files changed, 0 insertions(+), 20 deletions(-) diff --git a/server/reds.c b/server/reds.c index 44fc396..c93afc8 100644 --- a/server/reds.c +++ b/server/reds.c @@ -326,14 +326,6 @@ static int reds_read(void *ctx, void *buf, size_t size) return (return_code); } -static int reds_free(RedsStream *peer) -{ - reds_channel_event(peer, SPICE_CHANNEL_EVENT_DISCONNECTED); - close(peer->socket); - free(peer); - return 0; -} - static int reds_ssl_write(void *ctx, void *buf, size_t size) { int return_code; @@ -392,15 +384,6 @@ static int reds_ssl_writev(void *ctx, const struct iovec *vector, int count) return return_code; } -static int reds_ssl_free(RedsStream* peer) -{ - reds_channel_event(peer, SPICE_CHANNEL_EVENT_DISCONNECTED); - SSL_free(peer->ssl); - close(peer->socket); - free(peer); - return 0; -} - static void reds_stream_remove_watch(RedsStream* s) { if (s->watch) { @@ -1910,7 +1893,6 @@ static RedLinkInfo *reds_accept_connection(int listen_socket) peer->cb_read = (int (*)(void *, void *, int))reds_read; peer->cb_write = (int (*)(void *, void *, int))reds_write; peer->cb_writev = (int (*)(void *, const struct iovec *vector, int count))writev; - peer->cb_free = (int (*)(RedsStream *))reds_free; return link; } @@ -1946,7 +1928,6 @@ static void reds_accept_ssl_connection(int fd, int event, void *data) link->peer->cb_write = (int (*)(void *, void *, int))reds_ssl_write; link->peer->cb_read = (int (*)(void *, void *, int))reds_ssl_read; link->peer->cb_writev = reds_ssl_writev; - link->peer->cb_free = (int (*)(RedsStream *))reds_ssl_free; return_code = SSL_accept(link->peer->ssl); if (return_code == 1) { diff --git a/server/reds.h b/server/reds.h index 235e532..0817253 100644 --- a/server/reds.h +++ b/server/reds.h @@ -47,7 +47,6 @@ struct RedsStream { int (*cb_read)(void *, void *, int); int (*cb_writev)(void *, const struct iovec *vector, int count); - int (*cb_free)(struct RedsStream *); /* private */ ssize_t (*read)(RedsStream *s, void *buf, size_t nbyte); -- 1.7.4