head 1.4; access; symbols; locks; strict; comment @ * @; 1.4 date 2000.12.15.16.16.07; author simons; state dead; branches; next 1.3; 1.3 date 2000.12.15.16.03.15; author simons; state Exp; branches; next 1.2; 1.2 date 2000.12.13.15.35.14; author simons; state Exp; branches; next 1.1; 1.1 date 2000.12.13.15.14.26; author simons; state Exp; branches; next ; desc @@ 1.4 log @Removed the signature code and all code that depended on it. In the new Petidomo, the signature mechanism for server mails will work differently. @ text @/* $Source: /d1/e/petidomo/cvs/petidomo/source/signature.c,v $ $Revision: 1.3 $ Copyright (C) 2000 by CyberSolutions GmbH, Germany. This file is part of OpenPetidomo. OpenPetidomo is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. OpenPetidomo is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include #include #include #include #include #ifndef RUSAGE_SELF # define RUSAGE_SELF 0 #endif #ifndef RUSAGE_CHILDREN # define RUSAGE_CHILDREN -1 #endif #include "petidomo.h" void AppendSignature(FILE * fh) { struct utsname machine_name; struct rusage resource_usage; /* Start with the part of the signature that never fails. */ fflush(fh); fprintf(fh, "\n\n-- \n"); fprintf(fh, " /*\n"); fprintf(fh, " * Listserver software: OpenPetidomo\n"); /* Determine what machine we are. */ if (uname(&machine_name) == 0) { fprintf(fh, " * Server hardware : %s-%s\n", machine_name.sysname, machine_name.machine); } /* Determine our resource usage. */ getrusage(RUSAGE_SELF, &resource_usage); fprintf(fh, " * Utilized cpu time : %ld.%ld seconds\n", resource_usage.ru_utime.tv_sec + resource_usage.ru_stime.tv_sec, resource_usage.ru_utime.tv_usec + resource_usage.ru_stime.tv_usec); fprintf(fh, " * Utilized memory : %ld KByte\n", (resource_usage.ru_idrss > 0) ? resource_usage.ru_idrss : (long int)sbrk(0) / 1024); /* Close signature. */ fprintf(fh, " */\n"); fflush(fh); } @ 1.3 log @Removed the global configuration options "DetachImmediately" and "ShowStatistics". Consequently removed all code that deals with these options, too. @ text @d3 1 a3 1 $Revision: 1.2 $ @ 1.2 log @ - Added correct GNU GPL copyright statements to the files. - Removed unnecessary include statements. @ text @d2 2 a3 2 $Source$ $Revision$ d36 1 a36 2 { const struct PD_Config * MasterConfig = getMasterConfig(); d40 1 a40 1 if (MasterConfig->show_stats == TRUE) { d42 12 a53 13 /* Start with the part of the signature that never fails. */ fflush(fh); fprintf(fh, "\n\n-- \n"); fprintf(fh, " /*\n"); fprintf(fh, " * Listserver software: OpenPetidomo\n"); /* Determine what machine we are. */ if (uname(&machine_name) == 0) { fprintf(fh, " * Server hardware : %s-%s\n", machine_name.sysname, machine_name.machine); d56 1 a56 1 /* Determine our resource usage. */ d58 1 a58 1 getrusage(RUSAGE_SELF, &resource_usage); d60 6 a65 6 fprintf(fh, " * Utilized cpu time : %ld.%ld seconds\n", resource_usage.ru_utime.tv_sec + resource_usage.ru_stime.tv_sec, resource_usage.ru_utime.tv_usec + resource_usage.ru_stime.tv_usec); fprintf(fh, " * Utilized memory : %ld KByte\n", (resource_usage.ru_idrss > 0) ? resource_usage.ru_idrss : (long int)sbrk(0) / 1024); d67 1 a67 1 /* Close signature. */ d69 2 a70 2 fprintf(fh, " */\n"); fflush(fh); d73 1 a73 1 } @ 1.1 log @Renamed unregsig module to signature. Now that Petidomo is released under GPL, there is no such thing as an "unregistered" version anymore. @ text @d2 17 a18 36 * $Source: /home/cvs/OpenPetidomo/source/signature.c,v $ * $Revision: 1.4 $ * $Date: 2000/08/01 13:06:26 $ * * Copyright (c) 1996-99 by CyberSolutions GmbH, Germany. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by CyberSolutions GmbH. * * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @