summaryrefslogtreecommitdiffstats
path: root/jnlib
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2004-12-21 20:05:15 +0100
committerWerner Koch <wk@gnupg.org>2004-12-21 20:05:15 +0100
commit01f3f2515834876e2131d077e34c3cae4f9a2dc0 (patch)
tree6033e9b66eb3aa8cb46c8fa88cdf80ac29923dba /jnlib
parent* homedir.c: New. Use CSIDL_APPDATA for W32 as the default home (diff)
downloadgnupg2-01f3f2515834876e2131d077e34c3cae4f9a2dc0.tar.xz
gnupg2-01f3f2515834876e2131d077e34c3cae4f9a2dc0.zip
* preset-passphrase.c (preset_passphrase): Handle --passphrase.
* Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that pwquery may use stuff from jnlib. Conditionally add -lwsock2 (gpg_protect_tool_LDADD): Ditto. * preset-passphrase.c (main): Use default_homedir(). (main) [W32]: Initialize sockets. * simple-pwquery.c (agent_open) [W32]: Implement for W32. (readline) [W32]: Use recv instead of read. (writen) [W32]: Use send instead of write. (my_stpcpy): Define a stpcpy replacement so that this file continues to be self-contained. (agent_send_all_options) [W32]: Don't call ttyname. * gnupg-badge-openpgp.eps, gnupg-badge-openpgp.jpg: New * gnupg.texi: Add a logo. * sysnotes.texi: New. * gpgsm.c (main): Use default_homedir(). (main) [W32]: Default to disabled CRL checks. * gpgconf-comp.c (get_config_pathname) [DOSISH]: Detect absolute pathnames with a drive letter.
Diffstat (limited to 'jnlib')
-rw-r--r--jnlib/w32-afunix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/jnlib/w32-afunix.c b/jnlib/w32-afunix.c
index eac4f9560..c93d389da 100644
--- a/jnlib/w32-afunix.c
+++ b/jnlib/w32-afunix.c
@@ -49,17 +49,18 @@ _w32_sock_connect (int sockfd, struct sockaddr * addr, int addrlen)
struct sockaddr_in myaddr;
struct sockaddr_un * unaddr;
FILE * fp;
- int port = 0;
+ int port;
unaddr = (struct sockaddr_un *)addr;
fp = fopen (unaddr->sun_path, "rb");
if (!fp)
- return -1;
+ return -1;
fscanf (fp, "%d", &port);
fclose (fp);
+
/* XXX: set errno in this case */
if (port < 0 || port > 65535)
- return -1;
+ return -1;
myaddr.sin_family = AF_INET;
myaddr.sin_port = port;