X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fsession_file.c;h=9a1e316e8fd0411158215d011d9ed91b8d7fc00d;hb=55462b8ba9f48931de9b9a7bfbc182a1d113b3b5;hp=abe002d3a60cc3014140e31ddfee403ff21151cf;hpb=4f840ce965b1c30c5ab75afecc56193cbaf5c1b3;p=libsigrok.git diff --git a/src/session_file.c b/src/session_file.c index abe002d3..9a1e316e 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -49,7 +49,6 @@ extern SR_PRIV struct sr_dev_driver session_driver; static int session_driver_initialized = 0; - /** @private */ SR_PRIV int sr_sessionfile_check(const char *filename) { @@ -106,6 +105,7 @@ SR_PRIV int sr_sessionfile_check(const char *filename) /** * Load the session from the specified filename. * + * @param ctx The context in which to load the session. * @param filename The name of the session file to load. * @param session The session to load the file into. * @@ -114,7 +114,8 @@ SR_PRIV int sr_sessionfile_check(const char *filename) * @retval SR_ERR_DATA Malformed session file * @retval SR_ERR This is not a session file */ -SR_API int sr_session_load(const char *filename, struct sr_session **session) +SR_API int sr_session_load(struct sr_context *ctx, const char *filename, + struct sr_session **session) { GKeyFile *kf; GPtrArray *capturefiles; @@ -152,7 +153,7 @@ SR_API int sr_session_load(const char *filename, struct sr_session **session) return SR_ERR; } - if ((ret = sr_session_new(session)) != SR_OK) + if ((ret = sr_session_new(ctx, session)) != SR_OK) return ret; ret = SR_OK;