From 0f2277e9b9d45b335688ceb6dbb3c9ddf9b51999 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 10 May 2002 18:14:27 +0000 Subject: [PATCH] Logging changes --- ChangeLog | 16 ++++++++++++++++ mbcico/mbcico.c | 2 +- mbcico/mbout.c | 2 +- mbfido/mbaff.c | 2 +- mbfido/mbdiff.c | 2 +- mbfido/mbfadopt.c | 6 +++--- mbfido/mbfimport.c | 6 ++++-- mbfido/mbfutil.c | 8 +++++--- mbfido/mbindex.c | 2 +- mbfido/mbmsg.c | 2 +- mbmon/mbmon.c | 2 +- mbsebbs/mball.c | 2 +- mbsebbs/mbstat.c | 2 +- mbsebbs/timeout.c | 2 +- 14 files changed, 38 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9af157bb..bbf83383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4679,6 +4679,7 @@ v0.33.20 10-Feb-2002 mbmon: The top statusbar now displays the bbs Free/Down/Busy status. + Removed nonsense error message when stopped on a signal. mbfido: In AreaMgr and FileMgr changed aka matching for area @@ -4766,6 +4767,7 @@ v0.33.20 10-Feb-2002 mbmsg: When creating non-existend message bases, the path is created first if it doesn't exist. + Removed nonsense error message when stopped on a signal. mbfile: The mbfile index command now creates the html pages using the @@ -4776,16 +4778,26 @@ v0.33.20 10-Feb-2002 Missing download directories are created mode 0775. Moved check for empty areas to mbfile check function. The mbfile move command now also moves the thumbnails. + Better console error reporting when files are copied. + Removed nonsense error message when stopped on a signal. mball: Will not crash anymore when it needs more then 10 minutes to create the allfiles and newfiles lists. + Removed nonsense error message when stopped on a signal. mbaff: The High-ascii table to translate to lowercase has now the right values to translate the ansi graphics. Now uses the template newfiles and filefind to create the reports. + Removed nonsense error message when stopped on a signal. + + mbdiff: + Removed nonsense error message when stopped on a signal. + + mbindex: + Removed nonsense error message when stopped on a signal. mbtask: Removed some debug logging. @@ -4824,6 +4836,7 @@ v0.33.20 10-Feb-2002 All filetransfer times and cps rates are calculated in mSecs. Splitted no TCP settings in no IBN, no IFC and no ITN. Removed settings for Non-hold mail and Pickup Primary. + Removed nonsense error message when stopped on a signal. mbout: The status display has now 9 digits for the outbound size. @@ -4831,6 +4844,7 @@ v0.33.20 10-Feb-2002 nodes "try" counter, ie. make an undiable node try to call again. The status command displays the call attempts. + Removed nonsense error message when stopped on a signal. mbsebbs: On some systems the download taglists contained garbage after @@ -4848,9 +4862,11 @@ v0.33.20 10-Feb-2002 Fixed the problems with the safecracker door. Removed the cheat codes and added a delay for the display of the safe opening. + Removed nonsense error message when stopped on a signal. mbnewusr: New users have the default internal fullscreen editor. + Removed nonsense error message when stopped on a signal. mbuser: If a new user has registered and not yet used the bbs, mbuser diff --git a/mbcico/mbcico.c b/mbcico/mbcico.c index d1509847..bf034a4b 100644 --- a/mbcico/mbcico.c +++ b/mbcico/mbcico.c @@ -114,7 +114,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else Syslog('+', "Terminated with error %d", onsig); } diff --git a/mbcico/mbout.c b/mbcico/mbout.c index 92202099..fc491ff6 100644 --- a/mbcico/mbout.c +++ b/mbcico/mbout.c @@ -102,7 +102,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } diff --git a/mbfido/mbaff.c b/mbfido/mbaff.c index b884e0df..911409f7 100644 --- a/mbfido/mbaff.c +++ b/mbfido/mbaff.c @@ -70,7 +70,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } diff --git a/mbfido/mbdiff.c b/mbfido/mbdiff.c index 909c75ae..e6c385ed 100644 --- a/mbfido/mbdiff.c +++ b/mbfido/mbdiff.c @@ -94,7 +94,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } diff --git a/mbfido/mbfadopt.c b/mbfido/mbfadopt.c index 1c087ab2..d34b5169 100644 --- a/mbfido/mbfadopt.c +++ b/mbfido/mbfadopt.c @@ -52,7 +52,7 @@ void AdoptFile(int Area, char *File, char *Description) char Desc[256], TDesc[256]; int IsArchive = FALSE, MustRearc = FALSE, UnPacked = FALSE; int IsVirus = FALSE, File_Id = FALSE; - int i, j, k, lines = 0, File_id_cnt = 0; + int i, j, k, lines = 0, File_id_cnt = 0, rc; struct FILERecord fdb; Syslog('-', "Adopt(%d, %s, %s)", Area, MBSE_SS(File), MBSE_SS(Description)); @@ -83,10 +83,10 @@ void AdoptFile(int Area, char *File, char *Description) Syslog('+', "No known archive: %s", File); sprintf(temp2, "%s/tmp/arc/%s", getenv("MBSE_ROOT"), File); mkdirs(temp2, 0755); - if (file_cp(temp, temp2)) { + if ((rc = file_cp(temp, temp2))) { WriteError("Can't copy file to %s", temp2); if (!do_quiet) - printf("Can't copy file to %s\n", temp2); + printf("Can't copy file to %s, %s\n", temp2, strerror(rc)); die(0); } else { if (!do_quiet) { diff --git a/mbfido/mbfimport.c b/mbfido/mbfimport.c index 0b735a36..51943a54 100644 --- a/mbfido/mbfimport.c +++ b/mbfido/mbfimport.c @@ -49,7 +49,7 @@ void ImportFiles(int Area) { char *pwd, *temp, *temp2, *String, *token, *dest, *unarc; FILE *fbbs; - int Append = FALSE, Files = 0, i, j = 0, k = 0, x, Doit; + int Append = FALSE, Files = 0, rc, i, j = 0, k = 0, x, Doit; int Imported = 0, Errors = 0, Present = FALSE; struct FILERecord fdb; struct stat statfile; @@ -104,8 +104,10 @@ void ImportFiles(int Area) Syslog('+', "Unknown archive format %s", temp); sprintf(temp2, "%s/tmp/arc/%s", getenv("MBSE_ROOT"), fdb.LName); mkdirs(temp2, 0755); - if (file_cp(temp, temp2)) { + if ((rc = file_cp(temp, temp2))) { WriteError("Can't copy file to %s", temp2); + if (!do_quiet) + printf("Can't copy file to %s, %s\n", temp2, strerror(rc)); Doit = FALSE; } else { if (!do_quiet) { diff --git a/mbfido/mbfutil.c b/mbfido/mbfutil.c index 92365da2..9117286f 100644 --- a/mbfido/mbfutil.c +++ b/mbfido/mbfutil.c @@ -87,7 +87,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } @@ -309,11 +309,13 @@ int AddFile(struct FILERecord fdb, int Area, char *DestPath, char *FromPath) { char *temp1, *temp2; FILE *fp1, *fp2; - int i, Insert, Done = FALSE, Found = FALSE; + int i, rc, Insert, Done = FALSE, Found = FALSE; mkdirs(DestPath, 0755); - if (file_cp(FromPath, DestPath)) { + if ((rc = file_cp(FromPath, DestPath))) { WriteError("Can't move file in place"); + if (!do_quiet) + printf("Can't copy file to %s, %s\n", temp2, strerror(rc)); return FALSE; } chmod(DestPath, 0644); diff --git a/mbfido/mbindex.c b/mbfido/mbindex.c index 7c8279e9..3897de38 100644 --- a/mbfido/mbindex.c +++ b/mbfido/mbindex.c @@ -188,7 +188,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } diff --git a/mbfido/mbmsg.c b/mbfido/mbmsg.c index f3ada1ef..30c5e544 100644 --- a/mbfido/mbmsg.c +++ b/mbfido/mbmsg.c @@ -223,7 +223,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } diff --git a/mbmon/mbmon.c b/mbmon/mbmon.c index 31765d17..964c18b6 100644 --- a/mbmon/mbmon.c +++ b/mbmon/mbmon.c @@ -42,7 +42,7 @@ static void die(int onsig) signal(onsig, SIG_IGN); screen_stop(); if (onsig && (onsig <= NSIG)) - Syslog('?', "$Finished on signal %s", SigName[onsig]); + Syslog('?', "Finished on signal %s", SigName[onsig]); else Syslog(' ', "Normally finished"); ExitClient(0); diff --git a/mbsebbs/mball.c b/mbsebbs/mball.c index d3c7a257..9bf461af 100644 --- a/mbsebbs/mball.c +++ b/mbsebbs/mball.c @@ -87,7 +87,7 @@ void die(int onsig) if (onsig) { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); } diff --git a/mbsebbs/mbstat.c b/mbsebbs/mbstat.c index ef83d16d..85a7731b 100644 --- a/mbsebbs/mbstat.c +++ b/mbsebbs/mbstat.c @@ -85,7 +85,7 @@ void die(int onsig) signal(onsig, SIG_IGN); if (onsig) - WriteError("$Terminated on signal %d", onsig); + WriteError("Terminated on signal %d", onsig); if (!do_quiet) { colour(7, 0); diff --git a/mbsebbs/timeout.c b/mbsebbs/timeout.c index 8c95ccd2..7955c384 100644 --- a/mbsebbs/timeout.c +++ b/mbsebbs/timeout.c @@ -82,7 +82,7 @@ void die(int onsig) Syslog('+', "User inactivity timeout"); } else { if (onsig <= NSIG) - WriteError("$Terminated on signal %d (%s)", onsig, SigName[onsig]); + WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]); else WriteError("Terminated with error %d", onsig); }