From 42b0fd381b234675c993db7db29a3de5aa05f22f Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 6 Jul 2003 11:49:01 +0000 Subject: [PATCH] Fixed several compiler warnings --- ChangeLog | 7 +++++++ TODO | 5 ----- lib/client.c | 2 +- mbmon/common.c | 2 +- mbtask/mbtask.c | 4 ++-- mbtask/taskcomm.c | 2 +- unix/encrypt.c | 3 ++- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8edf45e2..63cef017 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ v0.37.4 10-May-2003 info in the messages also. Guess what, these packets do still exist in Fidonet, it took 5 years to find them! If you want to check, call 5:5/0 + Fixed compiler warning in network code. mbcico: The binkp transmitter does now escape the unsafe filename @@ -35,10 +36,16 @@ v0.37.4 10-May-2003 risk of sending files back to the owner of that faulty program. Added the same check for Seenby lines. + mbtask: + Fixed compiler warnings in network code. + mbsebbs: Increased internal message buffer size to 700 lines. Fullscreen editor code cleanup, debug messages removed. + unix: + Fixed compiler warning. + v0.37.3 09-Apr-2003 - 10-May-2003 diff --git a/TODO b/TODO index a0d9ecfe..fc400ef0 100644 --- a/TODO +++ b/TODO @@ -111,11 +111,6 @@ mbcico: N: Add better check for stale outbound locks, check if the pid is from a non-mbse program or add a age check. - N: Irex sends GOT: SEAP\7eNZE.TGZ 15423 1042401790 on a file send as - send "/opt/mbse/var/boxes/ntbox/SEAP~NZE.TGZ" as "SEAP~NZE.TGZ". - Filenames in Irex inbound are named SEAP~NZE.TGZ, which is good. - We need to understand the escapes. - mbfile: N: Add a check to see if the magic filenames are (still) valid. diff --git a/lib/client.c b/lib/client.c index 473bf63d..72823585 100644 --- a/lib/client.c +++ b/lib/client.c @@ -75,7 +75,7 @@ int socket_connect(char *user, char *prg, char *city) clntaddr.sun_family = AF_UNIX; strcpy(clntaddr.sun_path, cpath); - if (bind(s, &clntaddr, sizeof(clntaddr)) < 0) { + if (bind(s, (struct sockaddr *)&clntaddr, sizeof(clntaddr)) < 0) { close(s); perror(myname); printf("Can't bind socket %s\n", cpath); diff --git a/mbmon/common.c b/mbmon/common.c index 579fcd1c..603406cb 100644 --- a/mbmon/common.c +++ b/mbmon/common.c @@ -225,7 +225,7 @@ int socket_connect(char *user) clntaddr.sun_family = AF_UNIX; strcpy(clntaddr.sun_path, cpath); - if (bind(s, &clntaddr, sizeof(clntaddr)) < 0) { + if (bind(s, (struct sockaddr *)&clntaddr, sizeof(clntaddr)) < 0) { close(s); perror("mbmon"); printf("Can't bind socket %s\n", cpath); diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index 1b1dca74..2ad3b64f 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -864,7 +864,7 @@ void scheduler(void) servaddr.sun_family = AF_UNIX; strcpy(servaddr.sun_path, spath); - if (bind(sock, &servaddr, sizeof(servaddr)) < 0) { + if (bind(sock, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) { close(sock); sock = -1; Syslog('?', "$Can't bind socket %s", spath); @@ -918,7 +918,7 @@ void scheduler(void) */ memset(&buf, 0, sizeof(buf)); fromlen = sizeof(from); - rlen = recvfrom(sock, buf, sizeof(buf) -1, 0, &from, &fromlen); + rlen = recvfrom(sock, buf, sizeof(buf) -1, 0, (struct sockaddr *)&from, &fromlen); do_cmd(buf); } else { Syslog('-', "Return poll rc=%d, events=%04x", rc, pfd.revents); diff --git a/mbtask/taskcomm.c b/mbtask/taskcomm.c index 53481fe6..9cda03f2 100644 --- a/mbtask/taskcomm.c +++ b/mbtask/taskcomm.c @@ -555,7 +555,7 @@ void do_cmd(char *cmd) Syslog('-', "> %s", buf); for (;;) { - slen = sendto(sock, buf, strlen(buf), 0, &from, fromlen); + slen = sendto(sock, buf, strlen(buf), 0, (struct sockaddr *)&from, fromlen); if (slen == -1) Syslog('?', "$do_cmd(): sendto error %d %s", tries, from.sun_path); else if (slen != strlen(buf)) diff --git a/unix/encrypt.c b/unix/encrypt.c index d3dcbb26..fa62bfe0 100644 --- a/unix/encrypt.c +++ b/unix/encrypt.c @@ -6,7 +6,7 @@ * Original Copyright ....: Julianne Frances Haugh and others. * ***************************************************************************** - * Copyright (C) 1997-2001 + * Copyright (C) 1997-2003 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -63,6 +63,7 @@ #include #include #include +#include #ifdef _XOPEN_CRYPT #include #endif