<div dir="ltr">Ok, still unused. I am not sure why this should be move higher up in classes (why at AsyncRead it wasn't nice enough)?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 2:20 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This replaces async_read_set_error_handler() which was unused. This sets a<br>
callback to be called when an async operation fails.<br>
---<br>
server/reds_stream.c | 7 +++----<br>
server/reds_stream.h | 5 ++---<br>
2 files changed, 5 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/server/reds_stream.c b/server/reds_stream.c<br>
index 57eb1d1..cb42561 100644<br>
--- a/server/reds_stream.c<br>
+++ b/server/reds_stream.c<br>
@@ -385,11 +385,10 @@ int reds_stream_enable_ssl(RedsStream *stream, SSL_CTX *ctx)<br>
return reds_stream_ssl_accept(stream);<br>
}<br>
<br>
-void async_read_set_error_handler(AsyncRead *async,<br>
- AsyncReadError error_handler,<br>
- void *opaque)<br>
+void reds_stream_set_async_error_handler(RedsStream *stream,<br>
+ AsyncReadError error_handler)<br>
{<br>
- async->error = error_handler;<br>
+ stream->priv->async_read.error = error_handler;<br>
}<br>
<br>
static inline void async_read_clear_handlers(AsyncRead *obj)<br>
diff --git a/server/reds_stream.h b/server/reds_stream.h<br>
index 866679a..a5b7a17 100644<br>
--- a/server/reds_stream.h<br>
+++ b/server/reds_stream.h<br>
@@ -39,9 +39,6 @@ typedef struct AsyncRead {<br>
} AsyncRead;<br>
<br>
void async_read_handler(int fd, int event, void *data);<br>
-void async_read_set_error_handler(AsyncRead *async,<br>
- AsyncReadError error_handler,<br>
- void *opaque);<br>
<br>
typedef struct RedsStreamPrivate RedsStreamPrivate;<br>
<br>
@@ -67,6 +64,8 @@ typedef enum {<br>
ssize_t reds_stream_read(RedsStream *s, void *buf, size_t nbyte);<br>
void reds_stream_async_read(RedsStream *stream, uint8_t *data, size_t size,<br>
AsyncReadDone read_done_cb, void *opaque);<br>
+void reds_stream_set_async_error_handler(RedsStream *stream,<br>
+ AsyncReadError error_handler);<br>
ssize_t reds_stream_write(RedsStream *s, const void *buf, size_t nbyte);<br>
ssize_t reds_stream_writev(RedsStream *s, const struct iovec *iov, int iovcnt);<br>
bool reds_stream_write_all(RedsStream *stream, const void *in_buf, size_t n);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.5.3<br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Marc-André Lureau
</div>