X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fsession.c;h=276c5d17a997dc8cc93b2321b71c4259373043ab;hb=4ed5d21d048c8feed085530b7fda6ed265a5913f;hp=765a20c451471b1266be4103544ad77f0979c1d1;hpb=f3f19d1131025b68d29a11273b627c83d748e7ea;p=libsigrok.git diff --git a/src/session.c b/src/session.c index 765a20c4..276c5d17 100644 --- a/src/session.c +++ b/src/session.c @@ -62,6 +62,7 @@ struct datafeed_callback { /** * Create a new session. * + * @param ctx The context in which to create the new session. * @param new_session This will contain a pointer to the newly created * session if the return value is SR_OK, otherwise the value * is undefined and should not be used. Must not be NULL. @@ -71,7 +72,8 @@ struct datafeed_callback { * * @since 0.4.0 */ -SR_API int sr_session_new(struct sr_session **new_session) +SR_API int sr_session_new(struct sr_context *ctx, + struct sr_session **new_session) { struct sr_session *session; @@ -80,6 +82,7 @@ SR_API int sr_session_new(struct sr_session **new_session) session = g_malloc0(sizeof(struct sr_session)); + session->ctx = ctx; session->source_timeout = -1; session->running = FALSE; session->abort_session = FALSE;