projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new multi log system
[NeonServV5.git]
/
src
/
ClientSocket.c
diff --git
a/src/ClientSocket.c
b/src/ClientSocket.c
index eb11d88fc131558ff1bb698f883c37bd91144188..d8faf26d4a0ec7c56ae3475f083b300300517df3 100644
(file)
--- a/
src/ClientSocket.c
+++ b/
src/ClientSocket.c
@@
-25,6
+25,7
@@
#include "version.h"
#include "IOHandler.h"
#include "IRCEvents.h"
#include "version.h"
#include "IOHandler.h"
#include "IRCEvents.h"
+#include "log.h"
struct socket_list {
struct ClientSocket *data;
struct socket_list {
struct ClientSocket *data;
@@
-54,7
+55,7
@@
void init_sockets() {
sockets = malloc(sizeof(*sockets));
if (!sockets)
{
sockets = malloc(sizeof(*sockets));
if (!sockets)
{
- p
error("malloc() failed"
);
+ p
rintf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__
);
return;
}
sockets->data = NULL;
return;
}
sockets->data = NULL;
@@
-156,9
+157,9
@@
int write_socket_force(struct ClientSocket *client, char* msg, int len) {
if(!(client && (client->flags & SOCKET_FLAG_CONNECTED))) return 0;
SYNCHRONIZE(synchronized);
#ifdef HAVE_THREADS
if(!(client && (client->flags & SOCKET_FLAG_CONNECTED))) return 0;
SYNCHRONIZE(synchronized);
#ifdef HAVE_THREADS
- p
utlog(LOGLEVEL_
RAW, "[%d send %d] %s", getCurrentThreadID(), len, msg);
+ p
rintf_log("main", LOG_IRC
RAW, "[%d send %d] %s", getCurrentThreadID(), len, msg);
#else
#else
- p
utlog(LOGLEVEL_
RAW, "[send %d] %s", len, msg);
+ p
rintf_log("main", LOG_IRC
RAW, "[send %d] %s", len, msg);
#endif
iohandler_send(client->iofd, msg, len);
client->traffic_out += len;
#endif
iohandler_send(client->iofd, msg, len);
client->traffic_out += len;