Store a context pointer in struct sr_session.
This commit is contained in:
parent
61e6e2da45
commit
4ed5d21d04
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue