summaryrefslogtreecommitdiff
path: root/src/tools/anopesmtp.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-09-10 15:15:14 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-09-10 15:15:14 +0000
commitcd1d0952902897f91fee6d37084ce451da6d0790 (patch)
tree806cac60f06dce09cd31c3dac1792f6852755baf /src/tools/anopesmtp.c
parent9993ee6ae553dd4628219d236c5075f562e1ace3 (diff)
BUILD : 1.7.15 (1145) BUGS : 579 NOTES : Fixed make strict issues with src/tools
git-svn-id: svn://svn.anope.org/anope/trunk@1145 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@868 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/tools/anopesmtp.c')
-rw-r--r--src/tools/anopesmtp.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/tools/anopesmtp.c b/src/tools/anopesmtp.c
index 59231b4ef..3810b29de 100644
--- a/src/tools/anopesmtp.c
+++ b/src/tools/anopesmtp.c
@@ -88,23 +88,6 @@ static void remove_log(void)
/*************************************************************************/
-static void checkday(void)
-{
- time_t t;
- struct tm tm;
-
- time(&t);
- tm = *localtime(&t);
-
- if (curday != tm.tm_yday) {
- close_log();
- remove_log();
- open_log();
- }
-}
-
-/*************************************************************************/
-
/* Open the log file. Return -1 if the log file could not be opened, else
* return 0. */
@@ -126,6 +109,23 @@ int open_log(void)
/*************************************************************************/
+static void checkday(void)
+{
+ time_t t;
+ struct tm tm;
+
+ time(&t);
+ tm = *localtime(&t);
+
+ if (curday != tm.tm_yday) {
+ close_log();
+ remove_log();
+ open_log();
+ }
+}
+
+/*************************************************************************/
+
/* Log stuff to the log file with a datestamp. Note that errno is
* preserved by this routine and log_perror().
*/
@@ -524,8 +524,11 @@ void mail_cleanup()
int main(int argc, char *argv[])
{
char buf[8192];
+/* These are somehow unused - why are they here? -GD
+
struct smtp_body_line *b;
struct smtp_header *h;
+*/
int headers_done = 0;
/* Win32 stuff */
#ifdef _WIN32
@@ -546,7 +549,8 @@ int main(int argc, char *argv[])
if (!server) {
alog("No Server");
- return;
+ /* Bad, bad, bad. This was a eturn from main with no value! -GD */
+ return 0;
} else {
alog("SMTP: server %s port %d",server,port);
}