returning error code on disconnect
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 15 Jun 2006 18:34:14 +0000 (18:34 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 15 Jun 2006 18:34:14 +0000 (18:34 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@736 9efc2488-bf62-4759-914b-345cdb29e865

src/libtransport/transport_session.c
src/utils/socket_bundle.c

index 82b5415..3de292f 100644 (file)
@@ -374,6 +374,7 @@ void startElementHandler(
 
        if( strcmp( name, "stream:error" ) == 0 ) {
                ses->state_machine->in_error = 1;
+               ses->state_machine->connected = 0;
                osrfLogWarning(  OSRF_LOG_MARK, "Received <stream:error> message from Jabber server" );
                return;
        }
index c865030..fc0f13a 100644 (file)
@@ -597,7 +597,10 @@ int _socket_route_data_id( socket_manager* mgr, int sock_id) {
                if(node->endpoint == CLIENT_SOCKET ) 
                        status = _socket_handle_client_data(mgr, node);
 
-               if(status == -1) socket_remove_node(mgr, sock_id);
+               if(status == -1) {
+                       socket_remove_node(mgr, sock_id);
+                       return -1;
+               }
                return 0;
        }