forked from wolfSSL/wolfssl
Merge pull request #982 from JacobBarthelmeh/Testing
set return code to TEST_SUCCESS on successful connection
This commit is contained in:
@@ -1066,17 +1066,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());
|
||||||
@@ -1169,6 +1169,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)
|
||||||
@@ -1177,7 +1178,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());
|
||||||
|
Reference in New Issue
Block a user