set return code to TEST_SUCCESS on successful connection

This commit is contained in:
Jacob Barthelmeh 2017-06-19 09:26:16 -06:00
parent 2f36b24796
commit c118146803
1 changed files with 3 additions and 3 deletions

View File

@ -1055,17 +1055,17 @@ static THREAD_RETURN WOLFSSL_THREAD run_wolfssl_server(void* args)
#ifdef WOLFSSL_TIRTOS #ifdef WOLFSSL_TIRTOS
Task_yield(); Task_yield();
#endif #endif
wolfSSL_shutdown(ssl); ((func_args*)args)->return_code = TEST_SUCCESS;
} }
if (callbacks->on_result) if (callbacks->on_result)
callbacks->on_result(ssl); callbacks->on_result(ssl);
wolfSSL_shutdown(ssl);
wolfSSL_free(ssl); wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx); wolfSSL_CTX_free(ctx);
CloseSocket(cfd); CloseSocket(cfd);
((func_args*)args)->return_code = TEST_SUCCESS;
#ifdef WOLFSSL_TIRTOS #ifdef WOLFSSL_TIRTOS
fdCloseSession(Task_self()); fdCloseSession(Task_self());
@ -1158,6 +1158,7 @@ static void run_wolfssl_client(void* args)
input[idx] = 0; input[idx] = 0;
printf("Server response: %s\n", input); printf("Server response: %s\n", input);
} }
((func_args*)args)->return_code = TEST_SUCCESS;
} }
if (callbacks->on_result) if (callbacks->on_result)
@ -1166,7 +1167,6 @@ static void run_wolfssl_client(void* args)
wolfSSL_free(ssl); wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx); wolfSSL_CTX_free(ctx);
CloseSocket(sfd); CloseSocket(sfd);
((func_args*)args)->return_code = TEST_SUCCESS;
#ifdef WOLFSSL_TIRTOS #ifdef WOLFSSL_TIRTOS
fdCloseSession(Task_self()); fdCloseSession(Task_self());