diff options
author | Thomas White <taw@physics.org> | 2021-08-11 16:02:38 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-06-02 12:15:38 +0200 |
commit | 39aa39d13cd8ea4bc13b9d1499ab903ab10ecb66 (patch) | |
tree | ba94f0ca2e4b536233c65f980c96c9f456c3e695 | |
parent | 6f11f88810d1d74fbee12fc410e4634cac588f6e (diff) |
ASAP::O: Use asapo_is_error()
-rw-r--r-- | src/im-asapo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c index ea6505a4..5008a62b 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -73,7 +73,7 @@ char *im_asapo_make_unique_group_id(const char *endpoint, cred = asapo_create_source_credentials(kProcessed, beamtime, "", "", token); consumer = asapo_create_consumer(endpoint, path, 1, cred, &err); asapo_free_handle(&cred); - if ( err ) { + if ( asapo_is_error(err) ) { show_asapo_error("Cannot create temporary ASAP::O consumer", err); asapo_free_handle(&consumer); return NULL; @@ -83,7 +83,7 @@ char *im_asapo_make_unique_group_id(const char *endpoint, group_id = asapo_consumer_generate_new_group_id(consumer, &err); asapo_free_handle(&consumer); - if ( err ) { + if ( asapo_is_error(err) ) { show_asapo_error("Cannot create ASAP::O group ID", err); return NULL; } @@ -108,7 +108,7 @@ struct im_asapo *im_asapo_connect(const char *endpoint, cred = asapo_create_source_credentials(kProcessed, beamtime, "", "", token); a->consumer = asapo_create_consumer(endpoint, path, 1, cred, &err); asapo_free_handle(&cred); - if ( err ) { + if ( asapo_is_error(err) ) { show_asapo_error("Cannot create ASAP::O consumer", err); free(a); return NULL; @@ -131,7 +131,7 @@ void *im_asapo_fetch(struct im_asapo *a, size_t *pdata_size) asapo_consumer_get_next(a->consumer, a->group_id, &meta, &data, "default", &err); - if ( err ) { + if ( asapo_is_error(err) ) { show_asapo_error("Couldn't get next ASAP::O record", err); return NULL; } |