[BACK]Return to session.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/session.c between version 1.123 and 1.124

version 1.123, 2002/02/03 17:53:25 version 1.124, 2002/02/06 14:37:22
Line 1471 
Line 1471 
 session_exit_message(Session *s, int status)  session_exit_message(Session *s, int status)
 {  {
         Channel *c;          Channel *c;
         if (s == NULL)  
                 fatal("session_close: no session");          if ((c = channel_lookup(s->chanid)) == NULL)
         c = channel_lookup(s->chanid);  
         if (c == NULL)  
                 fatal("session_exit_message: session %d: no channel %d",                  fatal("session_exit_message: session %d: no channel %d",
                     s->self, s->chanid);                      s->self, s->chanid);
         debug("session_exit_message: session %d channel %d pid %d",          debug("session_exit_message: session %d channel %d pid %d",
             s->self, s->chanid, s->pid);              s->self, s->chanid, s->pid);
   
         if (WIFEXITED(status)) {          if (WIFEXITED(status)) {
                 channel_request_start(s->chanid,                  channel_request_start(s->chanid, "exit-status", 0);
                     "exit-status", 0);  
                 packet_put_int(WEXITSTATUS(status));                  packet_put_int(WEXITSTATUS(status));
                 packet_send();                  packet_send();
         } else if (WIFSIGNALED(status)) {          } else if (WIFSIGNALED(status)) {
                 channel_request_start(s->chanid,                  channel_request_start(s->chanid, "exit-signal", 0);
                     "exit-signal", 0);  
                 packet_put_int(WTERMSIG(status));                  packet_put_int(WTERMSIG(status));
                 packet_put_char(WCOREDUMP(status));                  packet_put_char(WCOREDUMP(status));
                 packet_put_cstring("");                  packet_put_cstring("");

Legend:
Removed from v.1.123  
changed lines
  Added in v.1.124