summaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-18 16:21:04 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-18 16:21:04 +0000
commit79cd86dbfd5b2ea0963c84b48088ec189acfc795 (patch)
tree535769200823fdaa1fec9795fe986668cb33bdee /src/json.c
parent63763bb00502e3c235e478ec50e097904c774696 (diff)
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/
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c7
1 files changed, 3 insertions, 4 deletions
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;