afm-main-plugin: fix bug
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 16 Feb 2016 07:18:31 +0000 (08:18 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 16 Feb 2016 07:18:31 +0000 (08:18 +0100)
Change-Id: Ia39f4d38b6ace8fba9731bf1f0c700487a0e8063
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
plugins/afm-main-plugin/afm-main-plugin.c

index f6b44a0..1fcc554 100644 (file)
@@ -157,7 +157,7 @@ static struct json_object *call_start(AFB_request *request, AFB_PostItem *item)
        free(query);
 
        /* embed if needed */
-       if (json_object_get_type(resp) == json_type_string)
+       if (json_object_get_type(resp) == json_type_int)
                resp = embed(request, _runid_, resp);
        request->errcode = resp ? MHD_HTTP_OK : MHD_HTTP_FAILED_DEPENDENCY;
        return resp;