Fixed several compiler warnings

This commit is contained in:
Michiel Broek 2003-07-06 11:49:01 +00:00
parent fec08e6d2f
commit 42b0fd381b
7 changed files with 14 additions and 11 deletions

View File

@ -21,6 +21,7 @@ v0.37.4 10-May-2003
info in the messages also. info in the messages also.
Guess what, these packets do still exist in Fidonet, it took 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 5 years to find them! If you want to check, call 5:5/0
Fixed compiler warning in network code.
mbcico: mbcico:
The binkp transmitter does now escape the unsafe filename 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. risk of sending files back to the owner of that faulty program.
Added the same check for Seenby lines. Added the same check for Seenby lines.
mbtask:
Fixed compiler warnings in network code.
mbsebbs: mbsebbs:
Increased internal message buffer size to 700 lines. Increased internal message buffer size to 700 lines.
Fullscreen editor code cleanup, debug messages removed. Fullscreen editor code cleanup, debug messages removed.
unix:
Fixed compiler warning.
v0.37.3 09-Apr-2003 - 10-May-2003 v0.37.3 09-Apr-2003 - 10-May-2003

5
TODO
View File

@ -111,11 +111,6 @@ mbcico:
N: Add better check for stale outbound locks, check if the pid is from N: Add better check for stale outbound locks, check if the pid is from
a non-mbse program or add a age check. 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: mbfile:
N: Add a check to see if the magic filenames are (still) valid. N: Add a check to see if the magic filenames are (still) valid.

View File

@ -75,7 +75,7 @@ int socket_connect(char *user, char *prg, char *city)
clntaddr.sun_family = AF_UNIX; clntaddr.sun_family = AF_UNIX;
strcpy(clntaddr.sun_path, cpath); strcpy(clntaddr.sun_path, cpath);
if (bind(s, &clntaddr, sizeof(clntaddr)) < 0) { if (bind(s, (struct sockaddr *)&clntaddr, sizeof(clntaddr)) < 0) {
close(s); close(s);
perror(myname); perror(myname);
printf("Can't bind socket %s\n", cpath); printf("Can't bind socket %s\n", cpath);

View File

@ -225,7 +225,7 @@ int socket_connect(char *user)
clntaddr.sun_family = AF_UNIX; clntaddr.sun_family = AF_UNIX;
strcpy(clntaddr.sun_path, cpath); strcpy(clntaddr.sun_path, cpath);
if (bind(s, &clntaddr, sizeof(clntaddr)) < 0) { if (bind(s, (struct sockaddr *)&clntaddr, sizeof(clntaddr)) < 0) {
close(s); close(s);
perror("mbmon"); perror("mbmon");
printf("Can't bind socket %s\n", cpath); printf("Can't bind socket %s\n", cpath);

View File

@ -864,7 +864,7 @@ void scheduler(void)
servaddr.sun_family = AF_UNIX; servaddr.sun_family = AF_UNIX;
strcpy(servaddr.sun_path, spath); strcpy(servaddr.sun_path, spath);
if (bind(sock, &servaddr, sizeof(servaddr)) < 0) { if (bind(sock, (struct sockaddr *)&servaddr, sizeof(servaddr)) < 0) {
close(sock); close(sock);
sock = -1; sock = -1;
Syslog('?', "$Can't bind socket %s", spath); Syslog('?', "$Can't bind socket %s", spath);
@ -918,7 +918,7 @@ void scheduler(void)
*/ */
memset(&buf, 0, sizeof(buf)); memset(&buf, 0, sizeof(buf));
fromlen = sizeof(from); 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); do_cmd(buf);
} else { } else {
Syslog('-', "Return poll rc=%d, events=%04x", rc, pfd.revents); Syslog('-', "Return poll rc=%d, events=%04x", rc, pfd.revents);

View File

@ -555,7 +555,7 @@ void do_cmd(char *cmd)
Syslog('-', "> %s", buf); Syslog('-', "> %s", buf);
for (;;) { for (;;) {
slen = sendto(sock, buf, strlen(buf), 0, &from, fromlen); slen = sendto(sock, buf, strlen(buf), 0, (struct sockaddr *)&from, fromlen);
if (slen == -1) if (slen == -1)
Syslog('?', "$do_cmd(): sendto error %d %s", tries, from.sun_path); Syslog('?', "$do_cmd(): sendto error %d %s", tries, from.sun_path);
else if (slen != strlen(buf)) else if (slen != strlen(buf))

View File

@ -6,7 +6,7 @@
* Original Copyright ....: Julianne Frances Haugh and others. * Original Copyright ....: Julianne Frances Haugh and others.
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2003
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -63,6 +63,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#ifdef _XOPEN_CRYPT #ifdef _XOPEN_CRYPT
#include <crypt.h> #include <crypt.h>
#endif #endif