Skip to content

Commit

Permalink
Merge pull request #24 from billphipps/add_connect_disconnect_pause
Browse files Browse the repository at this point in the history
Fix comm error and improve test to report failure.
  • Loading branch information
jpbland1 authored Apr 18, 2024
2 parents 5375227 + 6a601cb commit 7d02a84
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/wh_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ int wh_CommClient_RecvResponse(whCommClient* context,
uint16_t size = sizeof(context->packet);
uint16_t data_size = 0;

if ( (context == NULL) ||
(data == NULL)) {
if (context == NULL) {
return WH_ERROR_BADARGS;
}

Expand Down
5 changes: 3 additions & 2 deletions test/wh_test_clientserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ int whTest_ServerCfgLoop(whServerConfig* serverCfg)
}

if ((ret == 0) || (ret == WH_ERROR_NOTREADY)){
ret = 0;
WH_TEST_RETURN_ON_FAIL(wh_Server_Cleanup(server));
} else {
ret = wh_Server_Cleanup(server);
Expand All @@ -1275,13 +1276,13 @@ int whTest_ServerCfgLoop(whServerConfig* serverCfg)
#if defined(WH_CFG_TEST_POSIX)
static void* _whClientTask(void *cf)
{
(void)whTest_ClientCfg(cf);
WH_TEST_ASSERT(0 == whTest_ClientCfg(cf));
return NULL;
}

static void* _whServerTask(void* cf)
{
(void)whTest_ServerCfgLoop(cf);
WH_TEST_ASSERT(0 == whTest_ServerCfgLoop(cf));
return NULL;
}

Expand Down
4 changes: 2 additions & 2 deletions test/wh_test_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ int whTest_CryptoServerConfig(whServerConfig* config)
#if defined(WH_CFG_TEST_POSIX)
static void* _whClientTask(void *cf)
{
(void)whTest_CryptoClientConfig(cf);
WH_TEST_ASSERT(0 == whTest_CryptoClientConfig(cf));
return NULL;
}

static void* _whServerTask(void* cf)
{
(void)whTest_CryptoServerConfig(cf);
WH_TEST_ASSERT(0 == whTest_CryptoServerConfig(cf));
return NULL;
}

Expand Down

0 comments on commit 7d02a84

Please sign in to comment.