diff options
author | Richard van der Hoff <richard@matrix.org> | 2015-10-22 17:55:21 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2015-10-22 17:55:21 +0100 |
commit | 35be334a8dfbc76d3f18c750f946a8d622863447 (patch) | |
tree | a039b439b5bdd017a18d99e90284ddaa71d285f7 /matrix-connection.h | |
parent | caff31061b68f3b26a889931503a61bf12b76329 (diff) | |
download | purple-matrix-35be334a8dfbc76d3f18c750f946a8d622863447.tar.gz |
Abort active sync when the account disconnects
Apart from seeming like the expected behaviour, this should stop us ending up
with segfaults when the sync completes after the connection has gone away.
Diffstat (limited to 'matrix-connection.h')
-rw-r--r-- | matrix-connection.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/matrix-connection.h b/matrix-connection.h index aaea528..bdf1148 100644 --- a/matrix-connection.h +++ b/matrix-connection.h @@ -34,6 +34,9 @@ typedef struct _MatrixConnectionData { struct _PurpleConnection *pc; gchar *homeserver; /* hostname (:port) of the homeserver */ gchar *access_token; /* access token corresponding to our user */ + + /* the active sync request */ + struct _MatrixApiRequestData *active_sync; } MatrixConnectionData; @@ -53,5 +56,10 @@ void matrix_connection_start_login(struct _PurpleConnection *pc); */ void matrix_connection_free(struct _PurpleConnection *pc); +/** + * abort the active /sync for this account, in preparation for disconnecting + */ +void matrix_connection_cancel_sync(struct _PurpleConnection *pc); + #endif |