projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
90c2236
)
debug output...
author
pk910
<philipp@zoelle1.de>
Wed, 10 Aug 2011 00:49:50 +0000
(
02:49
+0200)
committer
pk910
<philipp@zoelle1.de>
Wed, 10 Aug 2011 00:49:50 +0000
(
02:49
+0200)
ClientSocket.c
patch
|
blob
|
history
IRCParser.c
patch
|
blob
|
history
diff --git
a/ClientSocket.c
b/ClientSocket.c
index 20ec7246a92af4bf506fc6fa59db7bcf986f2946..f90403a026ed2d9401ec059d4dcd26fa6fa271c7 100644
(file)
--- a/
ClientSocket.c
+++ b/
ClientSocket.c
@@
-147,9
+147,13
@@
void socket_loop(int timeout_seconds) {
sock->buffer[sock->bufferpos + i] = buffer[i];
}
sock->bufferpos += i;
sock->buffer[sock->bufferpos + i] = buffer[i];
}
sock->bufferpos += i;
+ sock->buffer[sock->bufferpos] = 0; //debug only
+ printf("ADD BUFFER: %s\n", sock->buffer);
}
} else {
bytes = read(sock->sock, sock->buffer, sizeof(sock->buffer));
}
} else {
bytes = read(sock->sock, sock->buffer, sizeof(sock->buffer));
+ sock->buffer[bytes] = 0; //debug only
+ printf("BUFFER: %s\n", sock->buffer);
if(bytes > 0)
sock->bufferpos = bytes;
}
if(bytes > 0)
sock->bufferpos = bytes;
}
diff --git
a/IRCParser.c
b/IRCParser.c
index 5d52923b91b527602c7d9787ba678932fa430025..0bbe7975b13536b1645cd9843e487389ea94534f 100644
(file)
--- a/
IRCParser.c
+++ b/
IRCParser.c
@@
-10,6
+10,7
@@
static void parse_raw(struct ClientSocket *client, char *from, char *cmd, char *
int parse_lines(struct ClientSocket *client, char *lines, int len) {
int i, startpos = 0;
int parse_lines(struct ClientSocket *client, char *lines, int len) {
int i, startpos = 0;
+ printf("PARSE: %s %d\n", lines, len);
for(i = 0; i < len; i++) {
if(lines[i] == '\r') //just zero it out :D
lines[i] = 0;
for(i = 0; i < len; i++) {
if(lines[i] == '\r') //just zero it out :D
lines[i] = 0;
@@
-17,6
+18,7
@@
int parse_lines(struct ClientSocket *client, char *lines, int len) {
lines[i] = 0;
parse_line(client, lines);
lines += strlen(lines)+1;
lines[i] = 0;
parse_line(client, lines);
lines += strlen(lines)+1;
+ printf("SKIP %d: %s\n", strlen(lines)+1, lines);
startpos = i+1;
}
}
startpos = i+1;
}
}