diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2016-11-03 02:19:15 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dave@treblig.org> | 2016-11-13 17:17:27 +0000 |
commit | 991af2d7984aaf6c23bcb9ab2cc9c36477f0b1b0 (patch) | |
tree | 1cc7b9bca574428393fca0e5b369d62e0c1fe94b /matrix-connection.c | |
parent | c64b6d5225c4bcbfa0dd83b28bf7c0db19705e30 (diff) | |
download | purple-matrix-991af2d7984aaf6c23bcb9ab2cc9c36477f0b1b0.tar.gz |
Pass body/len/content_type to completion callback
When a response can't be parsed as JSON pass the body and length
to the callback.
Also add the content_type.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Diffstat (limited to 'matrix-connection.c')
-rw-r--r-- | matrix-connection.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/matrix-connection.c b/matrix-connection.c index f576c95..893e3db 100644 --- a/matrix-connection.c +++ b/matrix-connection.c @@ -104,7 +104,8 @@ void _sync_bad_response(MatrixConnectionData *ma, gpointer user_data, /* callback which is called when a /sync request completes */ static void _sync_complete(MatrixConnectionData *ma, gpointer user_data, - JsonNode *body) + JsonNode *body, + const char *raw_body, size_t raw_body_len, const char *content_type) { PurpleConnection *pc = ma->pc; const gchar *next_batch; @@ -159,7 +160,8 @@ static gboolean _account_has_active_conversations(PurpleAccount *account) static void _login_completed(MatrixConnectionData *conn, gpointer user_data, - JsonNode *json_root) + JsonNode *json_root, + const char *raw_body, size_t raw_body_len, const char *content_type) { PurpleConnection *pc = conn->pc; JsonObject *root_obj; @@ -237,7 +239,8 @@ void matrix_connection_start_login(PurpleConnection *pc) static void _join_completed(MatrixConnectionData *conn, gpointer user_data, - JsonNode *json_root) + JsonNode *json_root, + const char *raw_body, size_t raw_body_len, const char *content_type) { GHashTable *components = user_data; JsonObject *root_obj; |