Commit 0eb5d5ecae36a2bdee6518ecaebc76d7a31f21bd

Kano 2012-01-22T00:03:02

Fix send() for JSON strings

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/api-example.c b/api-example.c
index 4c76135..0a327e8 100755
--- a/api-example.c
+++ b/api-example.c
@@ -214,7 +214,7 @@ int callapi(char *command, char *host, short int port)
 		return 1;
 	}
 
-	n = send(sock, command, strlen(command)+1, 0);
+	n = send(sock, command, strlen(command), 0);
 	if (SOCKETFAIL(n)) {
 		printf("Send failed: %s\n", SOCKERRMSG);
 		ret = 1;