don't send PASS command if theres no password set
authorpk910 <philipp@zoelle1.de>
Tue, 25 Oct 2011 14:59:06 +0000 (16:59 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 25 Oct 2011 14:59:06 +0000 (16:59 +0200)
src/ClientSocket.c

index f9faf44807eaf8b7f896704409ef8dc2e529e738..87871b849bf0b75fcf143beadb68053a1f311d14 100644 (file)
@@ -158,7 +158,7 @@ int connect_socket(struct ClientSocket *client) {
     char sendBuf[512];
     int len;
 
-    if(client->pass) {
+    if(client->pass && strcmp(client->pass, "")) {
         len = sprintf(sendBuf, "PASS :%s\n", client->pass);
         write_socket(client, sendBuf, len);
     }