]> sigrok.org Git - libsigrok.git/blobdiff - backend.c
Revise session API to allow for multiple sessions in future.
[libsigrok.git] / backend.c
index 0ba05958cc78380caeed6800484f4113f7d50677..03e5f64feda077ca503abdc7d82868f2c1bea8e4 100644 (file)
--- a/backend.c
+++ b/backend.c
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 
+/** @cond PRIVATE */
 #define LOG_PREFIX "backend"
+/** @endcond */
 
-extern struct sr_session *session;
+extern struct sr_session *sr_current_session;
 
 /**
  * @mainpage libsigrok API
@@ -79,7 +81,8 @@ extern struct sr_session *session;
  *
  * Initializing and shutting down libsigrok.
  *
- * Before using any of the libsigrok functionality, sr_init() must
+ * Before using any of the libsigrok functionality (except
+ * sr_log_loglevel_set() and sr_log_opts_set()), sr_init() must
  * be called to initialize the library, which will return a struct sr_context
  * when the initialization was successful.
  *
@@ -357,7 +360,7 @@ SR_API int sr_init(struct sr_context **ctx)
 
        *ctx = context;
        context = NULL;
-       session = NULL;
+       sr_current_session = NULL;
        ret = SR_OK;
 
 done: