From 9a4170fe19387760987c8ee9e9034f623d68b7d5 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 30 Apr 2007 19:20:58 +0000 Subject: [PATCH] Added mbtask commands to update the MIB counters --- ChangeLog | 3 +++ mbfido/mbfido.c | 20 +++++++++++++++----- mbtask/taskcomm.c | 8 ++++---- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index ccb3d099..b32dedea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ v0.91.8 26-Apr-2007 mbcico: Added mbtask command to update the MIB counters. + mbfido: + Added mbtask commands to update the MIB counters. + mbnewusr: Fixed loading default language for new user. diff --git a/mbfido/mbfido.c b/mbfido/mbfido.c index 3fb9bf3f..5898f60f 100644 --- a/mbfido/mbfido.c +++ b/mbfido/mbfido.c @@ -4,7 +4,7 @@ * Purpose: Process Fidonet style mail and files. * ***************************************************************************** - * Copyright (C) 1997-2005 + * Copyright (C) 1997-2007 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -286,18 +286,28 @@ void die(int onsig) if (tic_imp) CreateSema((char *)"reqindex"); - if (net_in + net_imp + net_out + net_bad + net_msgs) + if (net_in + net_imp + net_out + net_bad + net_msgs) { Syslog('+', "Netmail [%4d] import [%4d] out [%4d] bad [%4d] msgs [%4d]", net_in, net_imp, net_out, net_bad, net_msgs); - if (email_in + email_imp + email_out + email_bad) + SockS("MSTN:3,%d,%d,%d;", net_in, net_out, net_bad); + } + if (email_in + email_imp + email_out + email_bad) { Syslog('+', "Email [%4d] import [%4d] out [%4d] bad [%4d]", email_in, email_imp, email_out, email_bad); - if (echo_in + echo_imp + echo_out + echo_bad + echo_dupe) + SockS("MSTI:3,%d,%d,%d;", email_imp, email_out, email_bad); + } + if (echo_in + echo_imp + echo_out + echo_bad + echo_dupe) { Syslog('+', "Echomail [%4d] import [%4d] out [%4d] bad [%4d] dupe [%4d]", echo_in, echo_imp, echo_out, echo_bad, echo_dupe); - if (news_in + news_imp + news_out + news_bad + news_dupe) + SockS("MSTE:4,%d,%d,%d,%d;", echo_imp, echo_out, echo_bad, echo_dupe); + } + if (news_in + news_imp + news_out + news_bad + news_dupe) { Syslog('+', "News [%4d] import [%4d] out [%4d] bad [%4d] dupe [%4d]", news_in, news_imp, news_out, news_bad, news_dupe); + SockS("MSTR:4,%d,%d,%d,%d;", news_imp, news_out, news_bad, news_dupe); + } if (tic_in + tic_imp + tic_out + tic_bad + tic_dup) Syslog('+', "TICfiles [%4d] import [%4d] out [%4d] bad [%4d] dupe [%4d]", tic_in, tic_imp, tic_out, tic_bad, tic_dup); if (Magics + Hatched) Syslog('+', " Magics [%4d] hatch [%4d]", Magics, Hatched); + if (tic_in + tic_imp + tic_out + tic_bad + tic_dup + Magics + Hatched) + SockS("MSTF:6,%d,%d,%d,%d,%d,%d;", tic_imp, tic_out, tic_bad, tic_dup, Magics, Hatched); if (notify + areamgr + filemgr) Syslog('+', "Notify msgs [%4d] AreaMgr [%4d] FileMgr [%4d]", notify, areamgr, filemgr); diff --git a/mbtask/taskcomm.c b/mbtask/taskcomm.c index 9399fa75..b8af8321 100644 --- a/mbtask/taskcomm.c +++ b/mbtask/taskcomm.c @@ -577,7 +577,7 @@ char *exe_cmd(char *in) } /* - * MIB Set Tosser Email + * MIB Set Tosser Internet-email * * MSTI:3,in,out,bad; * 100:0; @@ -599,12 +599,12 @@ char *exe_cmd(char *in) } /* - * MIB Set Tosser News + * MIB Set Tosser RFC-news * - * MSTN:4,in,out,bad,dupe; + * MSTR:4,in,out,bad,dupe; * 100:0; */ - if (strncmp(cmd, "MSTN", 4) == 0) { + if (strncmp(cmd, "MSTR", 4) == 0) { mib_set_news(token); return obuf; }