summaryrefslogtreecommitdiff
path: root/src/tools/anopesmtp.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-02 00:58:24 -0400
committerAdam <Adam@anope.org>2010-11-02 00:58:24 -0400
commit4fb485895204f051ad37fa9cb716e37497fc9652 (patch)
treea2841d052bb908af18d807a3cf73274becfd7634 /src/tools/anopesmtp.cpp
parent477ff30cecd21f8c7ffe052afaba3e595dddbd7a (diff)
Fixed anopesmtp. Again. It works on Windows now
Diffstat (limited to 'src/tools/anopesmtp.cpp')
-rw-r--r--src/tools/anopesmtp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/anopesmtp.cpp b/src/tools/anopesmtp.cpp
index 78e0759ac..286c6c7ec 100644
--- a/src/tools/anopesmtp.cpp
+++ b/src/tools/anopesmtp.cpp
@@ -96,7 +96,7 @@ int smtp_debug = 0;
struct smtp_message smail;
-static const char *get_logname(struct tm *tm = NULL)
+static std::string get_logname(struct tm *tm = NULL)
{
char timestamp[32];
@@ -108,7 +108,7 @@ static const char *get_logname(struct tm *tm = NULL)
strftime(timestamp, sizeof(timestamp), "%Y%m%d", tm);
std::string name = std::string("logs/anopesmtp.") + timestamp;
- return name.c_str();
+ return name;
}
/* Log stuff to the log file with a datestamp. Note that errno is
@@ -121,7 +121,7 @@ void alog(const char *fmt, ...)
return;
std::fstream file;
- file.open(get_logname(), std::ios_base::out);
+ file.open(get_logname().c_str(), std::ios_base::out);
if (!file.is_open())
return;