summaryrefslogtreecommitdiff
path: root/src/plugins/relay
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/relay')
-rw-r--r--src/plugins/relay/relay-http.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c
index 5610694dc..ba56f864d 100644
--- a/src/plugins/relay/relay-http.c
+++ b/src/plugins/relay/relay-http.c
@@ -1217,7 +1217,7 @@ relay_http_send_json (struct t_relay_client *client,
int num_bytes, length;
char *headers2;
- if (!client || !message || !json_string)
+ if (!client || !message)
return -1;
num_bytes = -1;
@@ -1234,8 +1234,12 @@ relay_http_send_json (struct t_relay_client *client,
"Content-Type: application/json; charset=utf-8");
}
- num_bytes = relay_http_send (client, return_code, message, headers2,
- json_string, strlen (json_string));
+ num_bytes = relay_http_send (client,
+ return_code,
+ message,
+ headers2,
+ json_string,
+ (json_string) ? strlen (json_string) : 0);
if (headers2)
free (headers2);