* passphrase.c (agent_send_all_options): Use tty_get_ttyname to
authorWerner Koch <wk@gnupg.org>
Sat, 9 Nov 2002 17:48:41 +0000 (17:48 +0000)
committerWerner Koch <wk@gnupg.org>
Sat, 9 Nov 2002 17:48:41 +0000 (17:48 +0000)
get the default ttyname.

g10/ChangeLog
g10/passphrase.c

index 7201918..5edc87e 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-09  Werner Koch  <wk@gnupg.org>
+
+       * passphrase.c (agent_send_all_options): Use tty_get_ttyname to
+       get the default ttyname.
+
 2002-11-07  David Shaw  <dshaw@jabberwocky.com>
 
        * keyring.h, keyring.c (keyring_register_filename): Return the
index 3744c5b..ff733d0 100644 (file)
@@ -360,8 +360,8 @@ agent_send_all_options (int fd)
         return -1;
     }
 
-  if (!opt.ttyname && ttyname (1))
-    dft_ttyname = ttyname (1);
+  if (!opt.ttyname)
+    dft_ttyname = tty_get_ttyname ();
   if (opt.ttyname || dft_ttyname)
     {
       if (agent_send_option (fd, "ttyname",