Skip to content

Commit

Permalink
Make listerner launch one-time
Browse files Browse the repository at this point in the history
Reverted CI debug mode
  • Loading branch information
philip-davis committed Dec 15, 2020
1 parent 3351923 commit 66c4514
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
- name: Test
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: DSPACES_DEBUG=1 ctest -V -C $BUILD_TYPE
run: ctest -V -C $BUILD_TYPE
21 changes: 12 additions & 9 deletions src/dspaces-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,12 @@ int dspaces_put_local (dspaces_client_t client,
hg_return_t hret;
int ret = dspaces_SUCCESS;


ret = dspaces_init_listener(client);
if(ret != dspaces_SUCCESS) {
return(ret);
}
if(client->listener_init == 0) {
ret = dspaces_init_listener(client);
if(ret != dspaces_SUCCESS) {
return(ret);
}
}

client->local_put_count++;

Expand Down Expand Up @@ -966,7 +967,7 @@ static void drain_rpc(hg_handle_t handle)
}
DEFINE_MARGO_RPC_HANDLER(drain_rpc)

struct dspaces_sub_handle *dspaces_get_sub(dspaces_client_t client, int sub_id)
static struct dspaces_sub_handle *dspaces_get_sub(dspaces_client_t client, int sub_id)
{
int listidx = sub_id % SUB_HASH_SIZE;
struct sub_list_node *node, **nodep;
Expand Down Expand Up @@ -1126,9 +1127,11 @@ struct dspaces_sub_handle *dspaces_sub(dspaces_client_t client,
size_t owner_addr_size = 128;
int ret;

ret = dspaces_init_listener(client);
if(ret != dspaces_SUCCESS) {
return(DSPACES_SUB_FAIL);
if(client->listener_init == 0) {
ret = dspaces_init_listener(client);
if(ret != dspaces_SUCCESS) {
return(DSPACES_SUB_FAIL);
}
}

subh = malloc(sizeof(*subh));
Expand Down

0 comments on commit 66c4514

Please sign in to comment.