Browse Source

Fix send() for JSON strings

nfactor-troky
Kano 13 years ago
parent
commit
0eb5d5ecae
  1. 2
      api-example.c

2
api-example.c

@ -214,7 +214,7 @@ int callapi(char *command, char *host, short int port)
return 1; return 1;
} }
n = send(sock, command, strlen(command)+1, 0); n = send(sock, command, strlen(command), 0);
if (SOCKETFAIL(n)) { if (SOCKETFAIL(n)) {
printf("Send failed: %s\n", SOCKERRMSG); printf("Send failed: %s\n", SOCKERRMSG);
ret = 1; ret = 1;

Loading…
Cancel
Save