Bugfixes for binkp driver

This commit is contained in:
Michiel Broek 2004-03-12 19:56:47 +00:00
parent a15239d0ff
commit 62bbdbe162
3 changed files with 42 additions and 4 deletions

View File

@ -29,6 +29,15 @@ v0.51.2 06-Mar-2004
mbcico:
Updated file request function to new files database structure.
Fixed a compile problem on FreeBSD 5.1
To test 3 bugfixes:
Fixed a bug when a m_get was received with file offset = file
size that would log a negative transfer time and transfer rate.
Fixed a bug when a m_get message was received with the current
file with offset = file size to properly close the file and
unlink from the outbound queue.
Fixed a bug when a m_get message was received on a file that
was already transmitted to remove that file from the outbound
queue.
mbfido:
When removing files during tic import due to replace or maximum

6
TODO
View File

@ -78,7 +78,7 @@ mbtask:
mbfido:
N: When importing a tic file with magic name, remove the magic from
the filerecord of the previous file.
the filerecord of the previous file. (Is no corrected by mbfile c).
N: The elist rules files are named (8.3) areaname.rul where areaname
is the first 8 characters of the area name and we use the full name
@ -127,10 +127,10 @@ mbfido:
N: When adding a record to the toberep database add check for existing
older entry to update the info with the later received file. Else
just handle the record as a dupe.
just handle the record as a dupe (In test again).
mbcico:
N: Further investigate binkp tty_error hangup.
N: Further investigate binkp tty_error hangup (Seems Oke).
L: Implement binkp option ND.

View File

@ -2052,6 +2052,12 @@ int binkp_process_messages(void)
if (cursend && (strcmp(lname, cursend->remote) == 0) &&
(lsize == cursend->size) && (ltime == cursend->date)) {
Syslog('b', "Got M_GET with offset == filesize for current file, close");
/*
* calculate time needed and bytes transferred
*/
gettimeofday(&txtvend, &bp.tz);
/*
* Close transmitter file
*/
@ -2066,11 +2072,34 @@ int binkp_process_messages(void)
txtvend.tv_sec - txtvstart.tv_sec);
}
cursend->state = IsSent;
cursend->state = Got; // 12-03-2004 changed from IsSent, bug from LdG with FT.
cursend = NULL;
bp.TxState = TxGNF;
for (tsl = tosend; tsl; tsl = tsl->next) { // Added 12-03
if (tsl->remote == NULL) {
execute_disposition(tsl);
} else {
if (strcmp(cursend->local, tsl->local) == 0) {
execute_disposition(tsl);
}
}
}
} else {
Syslog('+', "Binkp: requested offset = filesize, but is not the current file");
if (tmp->state == IsSent) { // Added 12-03
Syslog('b', "Binkp: file is sent, treat as m_got");
tmp->state = Got;
for (tsl = tosend; tsl; tsl = tsl->next) {
if (tsl->remote == NULL) {
execute_disposition(tsl);
} else {
if (strcmp(tmp->local, tsl->local) == 0) {
execute_disposition(tsl);
}
}
}
}
}
} else if (loffs < lsize) {
tmp->state = NoState;