gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 81/150: ssh: add two missing state names


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 81/150: ssh: add two missing state names
Date: Fri, 30 Mar 2018 16:48:55 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 797b21068ecbdcbd27ebc2d1d8f1a1ea3ffa1c14
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Feb 15 13:40:35 2018 +0100

    ssh: add two missing state names
    
    The list of state names (used in debug builds) was out of sync in
    relation to the list of states (used in all builds).
    
    I now added an assert to make sure the sizes of the two lists match, to
    aid in detecting this mistake better in the future.
    
    Regression since c92d2e14cf, shipped in 7.58.0.
    
    Reported-by: Somnath Kundu
    
    Fixes #2312
    Closes #2313
---
 lib/ssh.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/ssh.c b/lib/ssh.c
index b7a50a281..d3b5cac69 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -342,6 +342,7 @@ static void state(struct connectdata *conn, sshstate 
nowstate)
     "SSH_AUTH_HOST",
     "SSH_AUTH_KEY_INIT",
     "SSH_AUTH_KEY",
+    "SSH_AUTH_GSSAPI",
     "SSH_AUTH_DONE",
     "SSH_SFTP_INIT",
     "SSH_SFTP_REALPATH",
@@ -376,6 +377,7 @@ static void state(struct connectdata *conn, sshstate 
nowstate)
     "SSH_SCP_TRANS_INIT",
     "SSH_SCP_UPLOAD_INIT",
     "SSH_SCP_DOWNLOAD_INIT",
+    "SSH_SCP_DOWNLOAD",
     "SSH_SCP_DONE",
     "SSH_SCP_SEND_EOF",
     "SSH_SCP_WAIT_EOF",
@@ -386,6 +388,9 @@ static void state(struct connectdata *conn, sshstate 
nowstate)
     "QUIT"
   };
 
+  /* a precaution to make sure the lists are in sync */
+  DEBUGASSERT(sizeof(names)/sizeof(names[0]) == SSH_LAST);
+
   if(sshc->state != nowstate) {
     infof(conn->data, "SFTP %p state change from %s to %s\n",
           (void *)sshc, names[sshc->state], names[nowstate]);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]