Binkp fixes and version bump
This commit is contained in:
parent
c62614ef84
commit
3b852d7c3f
13
ChangeLog
13
ChangeLog
@ -1,6 +1,12 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
v0.39.8 26-Jan-2004
|
v0.39.9 29-Jan-2004
|
||||||
|
|
||||||
|
|
||||||
|
v0.39.8 26-Jan-2004 - 29-Jan-2004
|
||||||
|
|
||||||
|
warning:
|
||||||
|
Avoid this version, binkp compression is buggy.
|
||||||
|
|
||||||
libcommon.a:
|
libcommon.a:
|
||||||
Fixed compiler directive for Linux in execute function.
|
Fixed compiler directive for Linux in execute function.
|
||||||
@ -12,6 +18,11 @@ v0.39.8 26-Jan-2004
|
|||||||
Fixed binkp master timer reset points, this should make session
|
Fixed binkp master timer reset points, this should make session
|
||||||
timeout work.
|
timeout work.
|
||||||
Code cleanup.
|
Code cleanup.
|
||||||
|
The filelist function didn't add files from fileboxes.
|
||||||
|
Added refresh heartbeat in binkp driver to prevent broken
|
||||||
|
sessions after 10 minutes.
|
||||||
|
Added more logging to investigate the tty hangup problem
|
||||||
|
Fixed zlib (un)compress buffersize init.
|
||||||
|
|
||||||
|
|
||||||
v0.39.7 14-Jan-2004 - 26-Jan-2004
|
v0.39.7 14-Jan-2004 - 26-Jan-2004
|
||||||
|
4
TODO
4
TODO
@ -1,6 +1,6 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
MBSE BBS V0.39.8 TODO list.
|
MBSE BBS V0.39.9 TODO list.
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
These are a list of things that must be implemented one way or
|
These are a list of things that must be implemented one way or
|
||||||
@ -118,6 +118,8 @@ mbfido:
|
|||||||
in the toberep database and will be multiple times announced.
|
in the toberep database and will be multiple times announced.
|
||||||
|
|
||||||
mbcico:
|
mbcico:
|
||||||
|
U: Further investigate binkp tty_error hangup.
|
||||||
|
|
||||||
L: Implement binkp option ND.
|
L: Implement binkp option ND.
|
||||||
|
|
||||||
N: Implement PLZ turn off m_get command.
|
N: Implement PLZ turn off m_get command.
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -1275,7 +1275,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html
|
|||||||
PACKAGE="mbsebbs"
|
PACKAGE="mbsebbs"
|
||||||
MAJOR="0"
|
MAJOR="0"
|
||||||
MINOR="39"
|
MINOR="39"
|
||||||
REVISION="8"
|
REVISION="9"
|
||||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||||
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"
|
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"
|
||||||
SHORTRIGHT="Copyright (C) 1997-2004 M. Broek"
|
SHORTRIGHT="Copyright (C) 1997-2004 M. Broek"
|
||||||
|
@ -13,7 +13,7 @@ dnl
|
|||||||
PACKAGE="mbsebbs"
|
PACKAGE="mbsebbs"
|
||||||
MAJOR="0"
|
MAJOR="0"
|
||||||
MINOR="39"
|
MINOR="39"
|
||||||
REVISION="8"
|
REVISION="9"
|
||||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||||
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"
|
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"
|
||||||
SHORTRIGHT="Copyright (C) 1997-2004 M. Broek"
|
SHORTRIGHT="Copyright (C) 1997-2004 M. Broek"
|
||||||
|
@ -1605,6 +1605,7 @@ int binkp_send_frame(int cmd, char *buf, int len)
|
|||||||
*/
|
*/
|
||||||
if ((bp.PLZflag == Active) && (len > 20) && (!cmd)) {
|
if ((bp.PLZflag == Active) && (len > 20) && (!cmd)) {
|
||||||
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
||||||
|
zlen = BINKP_PLZ_BLOCK -1;
|
||||||
rcz = compress2(zbuf, &zlen, buf, len, 9);
|
rcz = compress2(zbuf, &zlen, buf, len, 9);
|
||||||
if (rcz == Z_OK) {
|
if (rcz == Z_OK) {
|
||||||
Syslog('b', "Binkp: compressed OK, srclen=%d, destlen=%d, will send compressed=%s",
|
Syslog('b', "Binkp: compressed OK, srclen=%d, destlen=%d, will send compressed=%s",
|
||||||
@ -1642,6 +1643,7 @@ int binkp_send_frame(int cmd, char *buf, int len)
|
|||||||
bp.cmpblksize = SND_BLKSIZE;
|
bp.cmpblksize = SND_BLKSIZE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Syslog('+', "Binkp: compress error %d", rcz);
|
||||||
rc = PUTCHAR((header >> 8) & 0x00ff);
|
rc = PUTCHAR((header >> 8) & 0x00ff);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
rc = PUTCHAR(header & 0x00ff);
|
rc = PUTCHAR(header & 0x00ff);
|
||||||
@ -1673,6 +1675,7 @@ int binkp_send_frame(int cmd, char *buf, int len)
|
|||||||
|
|
||||||
FLUSHOUT();
|
FLUSHOUT();
|
||||||
binkp_settimer(BINKP_TIMEOUT);
|
binkp_settimer(BINKP_TIMEOUT);
|
||||||
|
Nopper();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1779,23 +1782,30 @@ int binkp_recv_command(char *buf, unsigned long *len, int *cmd)
|
|||||||
*len = *cmd = 0;
|
*len = *cmd = 0;
|
||||||
|
|
||||||
b0 = GETCHAR(BINKP_TIMEOUT);
|
b0 = GETCHAR(BINKP_TIMEOUT);
|
||||||
if (tty_status)
|
if (tty_status) {
|
||||||
|
Syslog('-', "Binkp: tty_status with b0");
|
||||||
goto to;
|
goto to;
|
||||||
|
}
|
||||||
if (b0 & 0x80)
|
if (b0 & 0x80)
|
||||||
*cmd = 1;
|
*cmd = 1;
|
||||||
|
|
||||||
b1 = GETCHAR(BINKP_TIMEOUT / 2);
|
b1 = GETCHAR(BINKP_TIMEOUT / 2);
|
||||||
if (tty_status)
|
if (tty_status) {
|
||||||
|
Syslog('-', "Binkp: tty_status with b1");
|
||||||
goto to;
|
goto to;
|
||||||
|
}
|
||||||
|
|
||||||
*len = (b0 & 0x7f) << 8;
|
*len = (b0 & 0x7f) << 8;
|
||||||
*len += b1;
|
*len += b1;
|
||||||
|
|
||||||
GET(buf, *len, BINKP_TIMEOUT / 2);
|
GET(buf, *len, BINKP_TIMEOUT / 2);
|
||||||
buf[*len] = '\0';
|
buf[*len] = '\0';
|
||||||
if (tty_status)
|
if (tty_status) {
|
||||||
|
Syslog('-', "Binkp: tty_status with block len=%d", *len);
|
||||||
goto to;
|
goto to;
|
||||||
|
}
|
||||||
binkp_settimer(BINKP_TIMEOUT);
|
binkp_settimer(BINKP_TIMEOUT);
|
||||||
|
Nopper();
|
||||||
|
|
||||||
to:
|
to:
|
||||||
if (tty_status)
|
if (tty_status)
|
||||||
@ -1901,7 +1911,6 @@ int binkp_poll_frame(void)
|
|||||||
{
|
{
|
||||||
int c, rc = 0, bcmd;
|
int c, rc = 0, bcmd;
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
int plz = FALSE;
|
|
||||||
unsigned long zlen;
|
unsigned long zlen;
|
||||||
char *zbuf;
|
char *zbuf;
|
||||||
#endif
|
#endif
|
||||||
@ -1939,7 +1948,6 @@ int binkp_poll_frame(void)
|
|||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
if (bp.PLZflag == Active) {
|
if (bp.PLZflag == Active) {
|
||||||
bp.blklen = bp.header & 0x3fff;
|
bp.blklen = bp.header & 0x3fff;
|
||||||
plz = bp.header & BINKP_PLZ_BLOCK;
|
|
||||||
} else {
|
} else {
|
||||||
bp.blklen = bp.header & 0x7fff;
|
bp.blklen = bp.header & 0x7fff;
|
||||||
}
|
}
|
||||||
@ -1950,8 +1958,10 @@ int binkp_poll_frame(void)
|
|||||||
if ((bp.rxlen == (bp.blklen + 1) && (bp.rxlen >= 1))) {
|
if ((bp.rxlen == (bp.blklen + 1) && (bp.rxlen >= 1))) {
|
||||||
bp.GotFrame = TRUE;
|
bp.GotFrame = TRUE;
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
if (plz) {
|
if ((bp.PLZflag == Active) && (bp.header & BINKP_PLZ_BLOCK)) {
|
||||||
|
Syslog('b', "Binkp: got a compressed block %d bytes", bp.blklen);
|
||||||
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
zbuf = calloc(BINKP_ZIPBUFLEN, sizeof(char));
|
||||||
|
zlen = BINKP_PLZ_BLOCK -1;
|
||||||
rc = uncompress(zbuf, &zlen, bp.rxbuf, bp.rxlen -1);
|
rc = uncompress(zbuf, &zlen, bp.rxbuf, bp.rxlen -1);
|
||||||
if (rc == Z_OK) {
|
if (rc == Z_OK) {
|
||||||
bp.rxcompressed += (zlen - (bp.rxlen -1));
|
bp.rxcompressed += (zlen - (bp.rxlen -1));
|
||||||
@ -1960,7 +1970,7 @@ int binkp_poll_frame(void)
|
|||||||
bp.blklen = zlen;
|
bp.blklen = zlen;
|
||||||
} else {
|
} else {
|
||||||
free(zbuf);
|
free(zbuf);
|
||||||
Syslog('!', "Binkp: uncompress error");
|
Syslog('!', "Binkp: uncompress error %d", rc);
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
free(zbuf);
|
free(zbuf);
|
||||||
@ -1978,6 +1988,7 @@ int binkp_poll_frame(void)
|
|||||||
Syslog('b', "Binkp: rcvd data (%d)", bp.rxlen -1);
|
Syslog('b', "Binkp: rcvd data (%d)", bp.rxlen -1);
|
||||||
}
|
}
|
||||||
binkp_settimer(BINKP_TIMEOUT);
|
binkp_settimer(BINKP_TIMEOUT);
|
||||||
|
Nopper();
|
||||||
rc = 1;
|
rc = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -219,8 +219,8 @@ static void check_flo(file_list **lst, char *nm)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void check_filebox(char *, file_list *);
|
void check_filebox(char *, file_list **);
|
||||||
void check_filebox(char *boxpath, file_list *st)
|
void check_filebox(char *boxpath, file_list **st)
|
||||||
{
|
{
|
||||||
char *temp;
|
char *temp;
|
||||||
DIR *dp;
|
DIR *dp;
|
||||||
@ -245,7 +245,7 @@ void check_filebox(char *boxpath, file_list *st)
|
|||||||
* We own the file
|
* We own the file
|
||||||
*/
|
*/
|
||||||
if ((stbuf.st_mode & S_IRUSR) && (stbuf.st_mode & S_IWUSR)) {
|
if ((stbuf.st_mode & S_IRUSR) && (stbuf.st_mode & S_IWUSR)) {
|
||||||
add_list(&st, temp, de->d_name, KFS, 0L, NULL, 1);
|
add_list(st, temp, de->d_name, KFS, 0L, NULL, 1);
|
||||||
} else {
|
} else {
|
||||||
Syslog('+', "No R/W permission on %s", temp);
|
Syslog('+', "No R/W permission on %s", temp);
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ void check_filebox(char *boxpath, file_list *st)
|
|||||||
* We own the file group
|
* We own the file group
|
||||||
*/
|
*/
|
||||||
if ((stbuf.st_mode & S_IRGRP) && (stbuf.st_mode & S_IWGRP)) {
|
if ((stbuf.st_mode & S_IRGRP) && (stbuf.st_mode & S_IWGRP)) {
|
||||||
add_list(&st, temp, de->d_name, KFS, 0L, NULL, 1);
|
add_list(st, temp, de->d_name, KFS, 0L, NULL, 1);
|
||||||
} else {
|
} else {
|
||||||
Syslog('+', "No R/W permission on %s", temp);
|
Syslog('+', "No R/W permission on %s", temp);
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ void check_filebox(char *boxpath, file_list *st)
|
|||||||
* No owner of file
|
* No owner of file
|
||||||
*/
|
*/
|
||||||
if ((stbuf.st_mode & S_IROTH) && (stbuf.st_mode & S_IWOTH)) {
|
if ((stbuf.st_mode & S_IROTH) && (stbuf.st_mode & S_IWOTH)) {
|
||||||
add_list(&st, temp, de->d_name, KFS, 0L, NULL, 1);
|
add_list(st, temp, de->d_name, KFS, 0L, NULL, 1);
|
||||||
} else {
|
} else {
|
||||||
Syslog('+', "No R/W permission on %s", temp);
|
Syslog('+', "No R/W permission on %s", temp);
|
||||||
}
|
}
|
||||||
@ -309,7 +309,7 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
|||||||
if ((tmpa->addr) && Loaded && strlen(nodes.OutBox) &&
|
if ((tmpa->addr) && Loaded && strlen(nodes.OutBox) &&
|
||||||
(tmpa->addr->zone == nodes.Aka[0].zone) && (tmpa->addr->net == nodes.Aka[0].net) &&
|
(tmpa->addr->zone == nodes.Aka[0].zone) && (tmpa->addr->net == nodes.Aka[0].net) &&
|
||||||
(tmpa->addr->node == nodes.Aka[0].node) && (tmpa->addr->point == nodes.Aka[0].point)) {
|
(tmpa->addr->node == nodes.Aka[0].node) && (tmpa->addr->point == nodes.Aka[0].point)) {
|
||||||
check_filebox(nodes.OutBox, st);
|
check_filebox(nodes.OutBox, &st);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -429,7 +429,7 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
|||||||
if ((fa->zone==tmpa->addr->zone) && (fa->net==tmpa->addr->net) &&
|
if ((fa->zone==tmpa->addr->zone) && (fa->net==tmpa->addr->net) &&
|
||||||
(fa->node==tmpa->addr->node) && (fa->point==tmpa->addr->point) &&
|
(fa->node==tmpa->addr->node) && (fa->point==tmpa->addr->point) &&
|
||||||
strchr(fl, flavor))
|
strchr(fl, flavor))
|
||||||
check_filebox(temp, st);
|
check_filebox(temp, &st);
|
||||||
}
|
}
|
||||||
tidy_faddr(fa);
|
tidy_faddr(fa);
|
||||||
}
|
}
|
||||||
@ -464,7 +464,7 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
|||||||
if ((fa->zone==tmpa->addr->zone) && (fa->net==tmpa->addr->net) &&
|
if ((fa->zone==tmpa->addr->zone) && (fa->net==tmpa->addr->net) &&
|
||||||
(fa->node==tmpa->addr->node) && (fa->point==tmpa->addr->point) &&
|
(fa->node==tmpa->addr->node) && (fa->point==tmpa->addr->point) &&
|
||||||
strchr(fl, flavor))
|
strchr(fl, flavor))
|
||||||
check_filebox(temp, st);
|
check_filebox(temp, &st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tidy_faddr(fa);
|
tidy_faddr(fa);
|
||||||
@ -477,6 +477,8 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
|||||||
}
|
}
|
||||||
free(temp);
|
free(temp);
|
||||||
|
|
||||||
|
|
||||||
|
Syslog('o', "B4 FTS-0001 checkpoint");
|
||||||
/*
|
/*
|
||||||
* For FTS-0001 we need to create at least one packet.
|
* For FTS-0001 we need to create at least one packet.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user