Hi,
I've included a patch for Neon in order to support status notification
when the connection is closed, something that atleast I found quite
useful to have for applications where it can be of some interest to be
notified when the connection is dropped.
Sincerely yours, Henrik Holst, Render Planet AB
Index: ne_session.c
===================================================================
--- ne_session.c (revision 1180)
+++ ne_session.c (working copy)
@@ -274,6 +274,12 @@
NE_DEBUG(NE_DBG_SOCKET, "Closing connection.\n");
ne_sock_close(sess->socket);
sess->socket = NULL;
+
+ if (sess->notify_cb) {
+ sess->notify_cb(sess->notify_ud, ne_status_connection_closed,
&sess->status);
+ }
+
+ notify_status(sess, ne_status_connection_closed);
NE_DEBUG(NE_DBG_SOCKET, "Connection closed.\n");
} else {
NE_DEBUG(NE_DBG_SOCKET, "(Not closing closed connection!).\n");
Index: ne_session.h
===================================================================
--- ne_session.h (revision 1180)
+++ ne_session.h (working copy)
@@ -92,6 +92,7 @@
ne_status_lookup = 0, /* looking up hostname */
ne_status_connecting, /* connecting to host */
ne_status_connected, /* connected to host */
+ ne_status_connection_closed, /* connection has been closed */
ne_status_sending, /* sending a request */
ne_status_recving /* receiving a response */
} ne_session_status;
_______________________________________________
neon mailing list
[email protected]
http://mailman.webdav.org/mailman/listinfo/neon