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

Diff for /src/usr.bin/ssh/sftp-server.c between version 1.135 and 1.136

version 1.135, 2022/01/01 01:55:30 version 1.136, 2022/01/08 07:33:54
Line 526 
Line 526 
 }  }
   
 static void  static void
 send_status(u_int32_t id, u_int32_t status)  send_status_errmsg(u_int32_t id, u_int32_t status, const char *errmsg)
 {  {
         struct sshbuf *msg;          struct sshbuf *msg;
         int r;          int r;
Line 542 
Line 542 
             (r = sshbuf_put_u32(msg, status)) != 0)              (r = sshbuf_put_u32(msg, status)) != 0)
                 fatal_fr(r, "compose");                  fatal_fr(r, "compose");
         if (version >= 3) {          if (version >= 3) {
                 if ((r = sshbuf_put_cstring(msg,                  if ((r = sshbuf_put_cstring(msg, errmsg == NULL ?
                     status_to_message(status))) != 0 ||                      status_to_message(status) : errmsg)) != 0 ||
                     (r = sshbuf_put_cstring(msg, "")) != 0)                      (r = sshbuf_put_cstring(msg, "")) != 0)
                         fatal_fr(r, "compose message");                          fatal_fr(r, "compose message");
         }          }
         send_msg(msg);          send_msg(msg);
         sshbuf_free(msg);          sshbuf_free(msg);
 }  }
   
   static void
   send_status(u_int32_t id, u_int32_t status)
   {
           return send_status_errmsg(id, status, NULL);
   }
   
 static void  static void
 send_data_or_handle(char type, u_int32_t id, const u_char *data, int dlen)  send_data_or_handle(char type, u_int32_t id, const u_char *data, int dlen)
 {  {

Legend:
Removed from v.1.135  
changed lines
  Added in v.1.136