Store a context pointer in struct sr_session.

This commit is contained in:
Martin Ling 2015-03-25 01:43:30 +00:00 committed by Uwe Hermann
parent 61e6e2da45
commit 4ed5d21d04
2 changed files with 3 additions and 0 deletions

View File

@ -663,6 +663,8 @@ SR_PRIV int sr_source_add_channel(GIOChannel *channel, int events, int timeout,
/*--- session.c -------------------------------------------------------------*/
struct sr_session {
/** Context this session exists in. */
struct sr_context *ctx;
/** List of struct sr_dev_inst pointers. */
GSList *devs;
/** List of struct sr_dev_inst pointers owned by this session. */

View File

@ -82,6 +82,7 @@ SR_API int sr_session_new(struct sr_context *ctx,
session = g_malloc0(sizeof(struct sr_session));
session->ctx = ctx;
session->source_timeout = -1;
session->running = FALSE;
session->abort_session = FALSE;