From 79cd86dbfd5b2ea0963c84b48088ec189acfc795 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Sun, 18 Sep 2011 16:21:04 +0000 Subject: Big changeset, may break stuff. Unfortunately you can't magically jump into the UI thread using gdk_threads_enter/leave() on Windows, the only way is to schedule a callback using g_idle_add. This required a lot of reworking. Good news, Windows support actually works now \o/ --- src/json.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/json.c') diff --git a/src/json.c b/src/json.c index fce3954..ce166f2 100644 --- a/src/json.c +++ b/src/json.c @@ -25,7 +25,6 @@ #include "config.h" #include "protocol-constants.h" #include "requests.h" -#include "dispatch.h" #include "json.h" gchar *trg_serialize(JsonNode * req) @@ -43,7 +42,7 @@ gchar *trg_serialize(JsonNode * req) return response; } -JsonObject *trg_deserialize(trg_http_response * response, +JsonObject *trg_deserialize(trg_response * reqrsp, GError ** error) { JsonParser *parser; @@ -51,13 +50,13 @@ JsonObject *trg_deserialize(trg_http_response * response, JsonObject *ret = NULL; parser = json_parser_new(); - json_parser_load_from_data(parser, response->data, response->size, + json_parser_load_from_data(parser, reqrsp->raw, reqrsp->size, error); if (*error == NULL) { root = json_parser_get_root(parser); #ifdef DEBUG if (g_getenv("TRG_SHOW_INCOMING") != NULL) { - g_debug("<=(INcoming)<=: %s", response->data); + g_debug("<=(INcoming)<=: %s", reqrsp->raw); } else if (g_getenv("TRG_SHOW_INCOMING_PRETTY") != NULL) { JsonGenerator *pg; gsize len; -- cgit v1.2.3