X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=0d1b47263f66ba14eb5eff371a1d7773ee9d0eca;hb=122d33d47d17fd56c6306190b7066d8819b43145;hp=eeaea2451c9ca8b15ddb5c415b361c841bfa4ab3;hpb=218e629fa48e2efb970b018d8d2ff8ccfa2d9a2c;p=libsigrok.git diff --git a/backend.c b/backend.c index eeaea245..0d1b4726 100644 --- a/backend.c +++ b/backend.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2010-2012 Bert Vermeulen * Copyright (C) 2012 Peter Stuge @@ -23,6 +23,8 @@ #include "libsigrok.h" #include "libsigrok-internal.h" +extern struct sr_session *session; + /** * @mainpage libsigrok API * @@ -287,8 +289,8 @@ static int sanity_check_all_output_modules(void) } /* All modules must provide a data or recv API callback. */ - if (!outputs[i]->data && !outputs[i]->recv) { - sr_err("No data/recv in module %d ('%s').", i, d); + if (!outputs[i]->data && !outputs[i]->receive) { + sr_err("No data/receive in module %d ('%s').", i, d); errors++; } @@ -319,6 +321,8 @@ static int sanity_check_all_output_modules(void) * the 'ctx' pointer is undefined and should not be used. Upon success, * the context will be free'd by sr_exit() as part of the libsigrok * shutdown. + * + * @since 0.2.0 */ SR_API int sr_init(struct sr_context **ctx) { @@ -364,6 +368,7 @@ SR_API int sr_init(struct sr_context **ctx) *ctx = context; context = NULL; + session = NULL; ret = SR_OK; done: @@ -378,6 +383,8 @@ done: * @param ctx Pointer to a libsigrok context struct. Must not be NULL. * * @return SR_OK upon success, a (negative) error code otherwise. + * + * @since 0.2.0 */ SR_API int sr_exit(struct sr_context *ctx) {