From 7389b7b15c8880662901e7253a99e64cec5bb926 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 29 Apr 2014 19:57:47 +1000 Subject: [PATCH] Cope with broken clients that don't send an integer for id --- src/stratifier.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index ba06a264..4851795a 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1150,10 +1150,14 @@ static void parse_instance_msg(int client_id, json_t *msg) err_val = json_string("-1:id not found"); goto out; } +#if 0 + /* Random broken clients send something not an integer so just use the + * json object, whatever it is. */ if (unlikely(!json_is_integer(id_val))) { err_val = json_string("-1:id is not integer"); goto out; } +#endif method = json_object_get(msg, "method"); if (unlikely(!method)) { err_val = json_string("-3:method not found");