projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
768cf97
)
fixed putsock
author
pk910
<philipp@zoelle1.de>
Wed, 10 Aug 2011 00:34:01 +0000
(
02:34
+0200)
committer
pk910
<philipp@zoelle1.de>
Wed, 10 Aug 2011 00:34:01 +0000
(
02:34
+0200)
ClientSocket.c
patch
|
blob
|
history
diff --git
a/ClientSocket.c
b/ClientSocket.c
index 345a58ae1ebcf136f3da385902e6b471f13fbc52..37a5ebd7e75a31b3b4410f3a00cf247b7637e4c0 100644
(file)
--- a/
ClientSocket.c
+++ b/
ClientSocket.c
@@
-177,16
+177,16
@@
void
putsock(struct ClientSocket *client, const char *text, ...)
{
va_list arg_list;
putsock(struct ClientSocket *client, const char *text, ...)
{
va_list arg_list;
- char
buffer
[MAXLEN];
+ char
sendBuf
[MAXLEN];
int pos;
if (!(client->flags & SOCKET_FLAG_CONNECTED)) return;
int pos;
if (!(client->flags & SOCKET_FLAG_CONNECTED)) return;
-
buffer
[0] = '\0';
+
sendBuf
[0] = '\0';
va_start(arg_list, text);
va_start(arg_list, text);
- pos = vsnprintf(
buffer
, MAXLEN - 2, text, arg_list);
+ pos = vsnprintf(
sendBuf
, MAXLEN - 2, text, arg_list);
va_end(arg_list);
if (pos < 0 || pos > (MAXLEN - 2)) pos = MAXLEN - 2;
va_end(arg_list);
if (pos < 0 || pos > (MAXLEN - 2)) pos = MAXLEN - 2;
-
buffer
[pos] = '\n';
-
buffer
[pos+1] = '0';
- write_socket(client,
buffer
, pos+1);
+
sendBuf
[pos] = '\n';
+
sendBuf
[pos+1] = '0';
+ write_socket(client,
sendBuf
, pos+1);
}
}