agent: Another minor fix to map_supervised_sockets.
authorWerner Koch <wk@gnupg.org>
Wed, 5 Oct 2016 09:48:59 +0000 (11:48 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 5 Oct 2016 09:48:59 +0000 (11:48 +0200)
* agent/gpg-agent.c (map_supervised_sockets): Remove debug message.
Provide correct fd in the second error case.

Signed-off-by: Werner Koch <wk@gnupg.org>
agent/gpg-agent.c

index dcc9bb6..a4025ce 100644 (file)
@@ -739,13 +739,11 @@ map_supervised_sockets (gnupg_fd_t *r_fd,
         {
           for (j = 0; j < DIM (tbl); j++)
             {
-              log_debug ("i=%d j=%d fdname=%s check=%s\n", i, j,
-                         fdnames[i], tbl[j].label);
               if (!strcmp (fdnames[i], tbl[j].label) || j == DIM(tbl)-1)
                 {
+                  fd = 3 + i;
                   if (**tbl[j].fdaddr == -1)
                     {
-                      fd = 3 + i;
                       name = get_socket_name (fd);
                       if (name)
                         {