Fixed crash when receiving bad tics
This commit is contained in:
parent
545fcae26d
commit
ef3ea01f51
@ -2,6 +2,9 @@ $Id$
|
||||
|
||||
v0.83.2 16-Nov-2005
|
||||
|
||||
mbfido:
|
||||
Fixed crash when receiving bad tics.
|
||||
|
||||
|
||||
v0.83.1 12-Nov-2005 - 16-Nov-2005
|
||||
|
||||
|
@ -52,6 +52,7 @@ void fill_orphans(orphans **qal, char *TicName, char *Area, char *FileName, int
|
||||
orphans *tmp;
|
||||
|
||||
tmp = (orphans *)malloc(sizeof(orphans));
|
||||
tmp->next = *qal;
|
||||
snprintf(tmp->TicName, 13, TicName);
|
||||
snprintf(tmp->Area, 21, Area);
|
||||
snprintf(tmp->FileName, 81, FileName);
|
||||
|
11
mbfido/tic.c
11
mbfido/tic.c
@ -64,7 +64,7 @@ int Tic()
|
||||
DIR *dp;
|
||||
struct dirent *de;
|
||||
struct stat sbuf;
|
||||
int i, rc = 0;
|
||||
int i, rc = 0, first = TRUE;
|
||||
fd_list *fdl = NULL;
|
||||
orphans *opl = NULL, *tmp;
|
||||
|
||||
@ -153,9 +153,14 @@ int Tic()
|
||||
CreateSema((char *)"mbindex");
|
||||
|
||||
Syslog('f', "start tidy_orphans()");
|
||||
for (tmp = opl; tmp; tmp = opl->next) {
|
||||
for (tmp = opl; tmp; tmp = tmp->next) {
|
||||
if (first) {
|
||||
Syslog('f', "TIC file TIC area Filename ORP CRC");
|
||||
Syslog('f', "------------ -------------------- ------------ --- ---");
|
||||
first = FALSE;
|
||||
}
|
||||
Syslog('f', "%-12s %-20s %-12s %s %s", tmp->TicName, tmp->Area, tmp->FileName,
|
||||
tmp->Orphaned ? "ORP" : "n/a", tmp->BadCRC ? "CRC" : "n/a");
|
||||
tmp->Orphaned ? "Yes" : "No ", tmp->BadCRC ? "Yes" : "No ");
|
||||
}
|
||||
tidy_orphans(&opl);
|
||||
|
||||
|
Reference in New Issue
Block a user