fixed putsock
authorpk910 <philipp@zoelle1.de>
Wed, 10 Aug 2011 00:34:01 +0000 (02:34 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 10 Aug 2011 00:34:01 +0000 (02:34 +0200)
ClientSocket.c

index 345a58ae1ebcf136f3da385902e6b471f13fbc52..37a5ebd7e75a31b3b4410f3a00cf247b7637e4c0 100644 (file)
@@ -177,16 +177,16 @@ void
 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;
-    buffer[0] = '\0';
+    sendBuf[0] = '\0';
     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;
-    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);
 }