From f366859cc0ec66b2c9df29e1ca7eec3563072584 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Tue, 8 Apr 1997 00:57:16 +0200 Subject: [PATCH] Bugfixes. Rev: src/modules/files/file.c:1.34 --- src/modules/files/file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 9079a62999..0d3ade0609 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -6,7 +6,7 @@ #define READ_BUFFER 8192 #include "global.h" -RCSID("$Id: file.c,v 1.33 1997/03/27 02:28:25 grubba Exp $"); +RCSID("$Id: file.c,v 1.34 1997/04/07 22:57:16 marcus Exp $"); #include "types.h" #include "interpret.h" #include "svalue.h" @@ -1217,7 +1217,7 @@ static void file_open_socket(INT32 args) close(fd); error("Bad argument 1 to open_socket(), expected int\n"); } - if (args > 2) { + if (args > 1) { if (sp[1-args].type != T_STRING) { close(fd); error("Bad argument 2 to open_socket(), expected string\n"); @@ -1225,6 +1225,7 @@ static void file_open_socket(INT32 args) get_inet_addr(&addr, sp[1-args].u.string->str); } else { addr.sin_addr.s_addr = htonl(INADDR_ANY); + addr.sin_family = AF_INET; } addr.sin_port = htons( ((u_short)sp[-args].u.integer) ); -- GitLab