]> andersk Git - openssh.git/blobdiff - serverloop.c
- (djm) Clean up. Strip some unnecessary differences with OpenBSD's code,
[openssh.git] / serverloop.c
index c2b2d0222e0a68585b916fba808eeb24123e6203..50e89aee83497c56c034b08eb984dab162bdc158 100644 (file)
@@ -110,7 +110,6 @@ sigchld_handler2(int sig)
        int save_errno = errno;
        debug("Received SIGCHLD.");
        child_terminated = 1;
-       child_has_selected = 0;
        errno = save_errno;
 }
 
@@ -389,7 +388,7 @@ drain_output()
 void
 process_buffered_input_packets()
 {
-       dispatch_run(DISPATCH_NONBLOCK, NULL);
+       dispatch_run(DISPATCH_NONBLOCK, NULL, NULL);
 }
 
 /*
@@ -675,10 +674,10 @@ server_loop2(void)
                                session_close_by_pid(pid, status);
                        child_terminated = 0;
                        signal(SIGCHLD, sigchld_handler2);
+                       if (used_sessions() == 0)
+                               break;
                }
                channel_after_select(&readset, &writeset);
-               if (child_terminated && child_has_selected)
-                       break;
                process_input(&readset);
                process_output(&writeset);
        }
@@ -689,7 +688,7 @@ server_loop2(void)
 }
 
 void
-server_input_stdin_data(int type, int plen)
+server_input_stdin_data(int type, int plen, void *ctxt)
 {
        char *data;
        unsigned int data_len;
@@ -706,7 +705,7 @@ server_input_stdin_data(int type, int plen)
 }
 
 void
-server_input_eof(int type, int plen)
+server_input_eof(int type, int plen, void *ctxt)
 {
        /*
         * Eof from the client.  The stdin descriptor to the
@@ -719,7 +718,7 @@ server_input_eof(int type, int plen)
 }
 
 void
-server_input_window_size(int type, int plen)
+server_input_window_size(int type, int plen, void *ctxt)
 {
        int row = packet_get_int();
        int col = packet_get_int();
@@ -765,7 +764,7 @@ input_direct_tcpip(void)
 }
 
 void
-server_input_channel_open(int type, int plen)
+server_input_channel_open(int type, int plen, void *ctxt)
 {
        Channel *c = NULL;
        char *ctype;
@@ -780,7 +779,7 @@ server_input_channel_open(int type, int plen)
        rwindow = packet_get_int();
        rmaxpack = packet_get_int();
 
-       debug("channel_input_open: ctype %s rchan %d win %d max %d",
+       debug("server_input_channel_open: ctype %s rchan %d win %d max %d",
            ctype, rchan, rwindow, rmaxpack);
 
        if (strcmp(ctype, "session") == 0) {
This page took 0.034167 seconds and 4 git commands to generate.