diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-08 20:23:00 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-08 20:23:00 +0000 |
commit | 973ecb7058325931d14a9537e5e3e57595347a10 (patch) | |
tree | 43585f36085949a1b494374572fa4e3dc25b0960 /src/process.c | |
parent | e1ff14e0c44d0a115372a821559b782c57c793f3 (diff) |
Rewrote sockets. This adds support for IPv6 and makes Anope capable of reconnecting if it loses connection to the uplink.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2862 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/process.c')
-rw-r--r-- | src/process.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 2c85e1644..b593b0d88 100644 --- a/src/process.c +++ b/src/process.c @@ -281,7 +281,7 @@ int split_buf(char *buf, const char ***argv, int colon_special) /* process: Main processing routine. Takes the string in inbuf (global * variable) and does something appropriate with it. */ -void process() +void process(const std::string &buffer) { int retVal = 0; Message *current = NULL; @@ -299,11 +299,11 @@ void process() *cmd = '\0'; /* If debugging, log the buffer */ - Alog(LOG_DEBUG) << "Received: " << inbuf; + Alog(LOG_DEBUG) << "Received: " << buffer; /* First make a copy of the buffer so we have the original in case we * crash - in that case, we want to know what we crashed on. */ - strscpy(buf, inbuf, sizeof(buf)); + strscpy(buf, buffer.c_str(), sizeof(buf)); doCleanBuffer(buf); @@ -359,9 +359,8 @@ void process() } } } - } else { - Alog(LOG_DEBUG) << "unknown message from server (" << inbuf << ")"; - } + } else + Alog(LOG_DEBUG) << "unknown message from server (" << buffer << ")"; /* Free argument list we created */ free(av); |