Added timeout check to mbuser
This commit is contained in:
parent
77ba5b42d9
commit
932601b885
@ -20,6 +20,9 @@ v0.37.3 09-Apr-2003.
|
||||
Added menu function display file.
|
||||
Display ascii textfiles now uses the More Y/n/= prompt.
|
||||
|
||||
mbuser:
|
||||
Added nopper code during pack.
|
||||
|
||||
mbcico:
|
||||
Removed some heavy debug code from ttyio functions to increase
|
||||
throughput.
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Hangup functions
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2002
|
||||
* Copyright (C) 1997-2003
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -77,7 +77,6 @@ void Good_Bye(int onsig)
|
||||
if ((pExitinfo = fopen(temp,"rb")) != NULL) {
|
||||
fread(&usrconfighdr, sizeof(usrconfighdr), 1, pUsrConfig);
|
||||
offset = usrconfighdr.hdrsize + (grecno * usrconfighdr.recsize);
|
||||
|
||||
fread(&exitinfo, sizeof(exitinfo), 1, pExitinfo);
|
||||
|
||||
usrconfig = exitinfo;
|
||||
@ -94,6 +93,7 @@ void Good_Bye(int onsig)
|
||||
usrconfig.iLastMsgArea = iMsgAreaNumber;
|
||||
|
||||
offset = usrconfighdr.hdrsize + (grecno * usrconfighdr.recsize);
|
||||
Syslog('b', "Good_Bye: write users.data at offset %ld", offset);
|
||||
if (fseek(pUsrConfig, offset, 0) != 0) {
|
||||
WriteError("Can't move pointer in file %s", temp);
|
||||
ExitClient(MBERR_GENERAL);
|
||||
|
@ -69,6 +69,7 @@ int InitExitinfo()
|
||||
|
||||
fread(&usrconfighdr, sizeof(usrconfighdr), 1, pUsrConfig);
|
||||
offset = usrconfighdr.hdrsize + (grecno * usrconfighdr.recsize);
|
||||
Syslog('b', "InitExitinfo: read users.data offset %ld", offset);
|
||||
if (fseek(pUsrConfig, offset, 0) != 0) {
|
||||
WriteError("$Can't move pointer in %s", temp);
|
||||
free(temp);
|
||||
|
@ -252,6 +252,7 @@ void UserPack(int days, int level, int pack)
|
||||
memset(&usr, 0, sizeof(usr));
|
||||
if (CFG.slow_util && do_quiet)
|
||||
usleep(1);
|
||||
Nopper();
|
||||
}
|
||||
fclose(fin);
|
||||
delete = 0;
|
||||
@ -311,6 +312,7 @@ void UserPack(int days, int level, int pack)
|
||||
if (CFG.slow_util && do_quiet)
|
||||
usleep(1);
|
||||
|
||||
Nopper();
|
||||
if (usr.Deleted) {
|
||||
if (!do_quiet) {
|
||||
printf("Delete user %s\n", usr.Name);
|
||||
@ -371,6 +373,7 @@ void UserPack(int days, int level, int pack)
|
||||
record = 0;
|
||||
|
||||
while (fread(&usr, sizeof(usr), 1,fout) == 1) {
|
||||
Nopper();
|
||||
record++;
|
||||
fwrite(&usr, sizeof(usr), 1, fin);
|
||||
if (record >= highest)
|
||||
|
Reference in New Issue
Block a user