Browse Source

Merge branch 'rpc_longreply' into bfgminer

Luke Dashjr 12 years ago
parent
commit
8a69126b37
1 changed files with 3 additions and 1 deletions
  1. 3 1
      api.c

+ 3 - 1
api.c

@@ -3493,7 +3493,9 @@ static void send_result(struct io_data *io_data, SOCKETTYPE c, bool isjson)
 	if (isjson)
 		io_add(io_data, JSON_END);
 	
-	bytes_nullterminate(&io_data->data);
+	// Null-terminate reply, including sending the \0 on the socket
+	bytes_append(&io_data->data, "", 1);
+	
 	applog(LOG_DEBUG, "API: send reply: (%ld) '%.10s%s'",
 	       (long)bytes_len(&io_data->data),
 	       bytes_buf(&io_data->data),