[Pkg-gnupg-commit] [libassuan] 58/437: 2002-11-20 Neal H. Walfield <neal at g10code.de>
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit 894928230ef8ee8a6f3f6bba1db2fcd0d278d6d6
Author: Neal Walfield <neal at walfield.org>
Date: Thu Nov 21 03:50:23 2002 +0000
2002-11-20 Neal H. Walfield <neal at g10code.de>
* assuan-socket-connect.c (assuan_socket_connect): Pass PF_LOCAL
to socket(), not AF_UNIX: it expects a PF_* macro and the former
is more portable.
(assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
POSIXy.
---
src/ChangeLog | 8 ++++++++
src/assuan-socket-connect.c | 4 ++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index ebf1764..4bb8434 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
2002-11-20 Neal H. Walfield <neal at g10code.de>
+ * assuan-socket-connect.c (assuan_socket_connect): Pass PF_LOCAL
+ to socket(), not AF_UNIX: it expects a PF_* macro and the former
+ is more portable.
+ (assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
+ POSIXy.
+
+2002-11-20 Neal H. Walfield <neal at g10code.de>
+
* assuan-defs.h (struct assuan_io): New structure.
(struct assuan_context_s): New field, io.
(_assuan_read): Depreciated.
diff --git a/src/assuan-socket-connect.c b/src/assuan-socket-connect.c
index c27c351..f6c5cae 100644
--- a/src/assuan-socket-connect.c
+++ b/src/assuan-socket-connect.c
@@ -117,7 +117,7 @@ assuan_socket_connect (ASSUAN_CONTEXT *r_ctx,
ctx->deinit_handler = do_deinit;
ctx->finish_handler = do_finish;
- fd = socket (AF_UNIX, SOCK_STREAM, 0);
+ fd = socket (PF_LOCAL, SOCK_STREAM, 0);
if (fd == -1)
{
LOGERROR1 ("can't create socket: %s\n", strerror (errno));
@@ -126,7 +126,7 @@ assuan_socket_connect (ASSUAN_CONTEXT *r_ctx,
}
memset (&srvr_addr, 0, sizeof srvr_addr );
- srvr_addr.sun_family = AF_UNIX;
+ srvr_addr.sun_family = AF_LOCAL;
strcpy (srvr_addr.sun_path, name);
len = (offsetof (struct sockaddr_un, sun_path)
+ strlen (srvr_addr.sun_path) + 1);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list