aboutsummaryrefslogtreecommitdiff
path: root/src/im-sandbox.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-23 17:10:11 +0200
committerThomas White <taw@physics.org>2022-06-02 12:15:38 +0200
commit8735bc06caf9ab07b13108f80763a6ff164f0db6 (patch)
treea65567048dae0e44a571ce50cbd471377b2c5693 /src/im-sandbox.c
parentc1a526cebf6e97d78ff340148952421feaaee9c3 (diff)
ASAP::O: Tidy up build process
This removes a lot of random #ifdefs from the source code.
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r--src/im-sandbox.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 554024b2..759c5442 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -62,10 +62,7 @@
#include "process_image.h"
#include "im-zmq.h"
#include "profile.h"
-
-#ifdef HAVE_ASAPO
#include "im-asapo.h"
-#endif
struct sandbox
@@ -114,9 +111,7 @@ struct sandbox
const char *asapo_token;
const char *asapo_beamtime;
const char *asapo_path;
-#ifdef HAVE_ASAPO
- AsapoStringHandle asapo_group_id;
-#endif
+ const char *asapo_group_id;
/* Final output */
Stream *stream;
@@ -344,10 +339,7 @@ static int run_work(const struct index_args *iargs, Stream *st,
{
int allDone = 0;
struct im_zmq *zmqstuff = NULL;
-
-#ifdef HAVE_ASAPO
struct im_asapo *asapostuff = NULL;
-#endif
if ( sb->profile ) {
profile_init();
@@ -365,7 +357,6 @@ static int run_work(const struct index_args *iargs, Stream *st,
}
}
-#ifdef HAVE_ASAPO
if ( sb->asapo ) {
asapostuff = im_asapo_connect(sb->asapo_endpoint,
sb->asapo_token,
@@ -377,7 +368,6 @@ static int run_work(const struct index_args *iargs, Stream *st,
return 1;
}
}
-#endif
while ( !allDone ) {
@@ -482,12 +472,10 @@ static int run_work(const struct index_args *iargs, Stream *st,
} else if ( sb->asapo ) {
-#ifdef HAVE_ASAPO
/* Temporary (?) abuse of "zmq_data", even though
* data comes via ASAP::O */
pargs.zmq_data = im_asapo_fetch(asapostuff,
&pargs.zmq_data_size);
-#endif
} else {
pargs.zmq_data = NULL;
@@ -511,9 +499,7 @@ static int run_work(const struct index_args *iargs, Stream *st,
/* These are both no-ops if argument is NULL */
im_zmq_shutdown(zmqstuff);
-#ifdef HAVE_ASAPO
im_asapo_shutdown(asapostuff);
-#endif
cleanup_indexing(iargs->ipriv);
cell_free(iargs->cell);
@@ -1160,16 +1146,14 @@ int create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
return 0;
}
-#ifdef HAVE_ASAPO
if ( asapo_group_id != NULL ) {
- sb->asapo_group_id = im_asapo_group_id_from_string(asapo_group_id);
+ sb->asapo_group_id = strdup(asapo_group_id);
} else {
sb->asapo_group_id = im_asapo_make_unique_group_id(asapo_endpoint,
asapo_token,
asapo_beamtime,
asapo_path);
}
-#endif
sb->fds = NULL;
sb->fhs = NULL;