projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e981a22
)
added some debug output
author
pk910
<philipp@zoelle1.de>
Wed, 10 Aug 2011 00:39:13 +0000
(
02:39
+0200)
committer
pk910
<philipp@zoelle1.de>
Wed, 10 Aug 2011 00:39:13 +0000
(
02:39
+0200)
ClientSocket.c
patch
|
blob
|
history
ClientSocket.h
patch
|
blob
|
history
diff --git
a/ClientSocket.c
b/ClientSocket.c
index 37a5ebd7e75a31b3b4410f3a00cf247b7637e4c0..c071e1cfbd31db235a34a39037d8694dbe16d089 100644
(file)
--- a/
ClientSocket.c
+++ b/
ClientSocket.c
@@
-147,10
+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("BUFFER: %s\n", sock->buffer);
}
} else {
bytes = read(sock->sock, sock->buffer, sizeof(sock->buffer));
sock->buffer[bytes] = 0; //debug only
}
} 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/ClientSocket.h
b/ClientSocket.h
index 55f4625784b3a25bf34b5ffbd541c6574f9d6752..39118ec51e57e526ccb42a84a6257f94da7d59f2 100644
(file)
--- a/
ClientSocket.h
+++ b/
ClientSocket.h
@@
-29,6
+29,6
@@
int connect_socket(struct ClientSocket *client);
int close_socket(struct ClientSocket *client);
int write_socket(struct ClientSocket *client, char* msg, int len);
void socket_loop(int timeout_seconds);
int close_socket(struct ClientSocket *client);
int write_socket(struct ClientSocket *client, char* msg, int len);
void socket_loop(int timeout_seconds);
-void putsock(struct ClientSocket *client, const char *text, ...) PRINTF_LIKE(
1, 2
);
+void putsock(struct ClientSocket *client, const char *text, ...) PRINTF_LIKE(
2, 3
);
#endif
\ No newline at end of file
#endif
\ No newline at end of file