From 4cd017f51b993d40173f7a9410778198322cf33a Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 3 Dec 2015 19:38:27 -0200 Subject: [PATCH] Melhorando retorno da função hllapi_init para facilitar identificação da causa de não inicialização. --- src/plugins/hllapi/calls.cc | 2 +- src/plugins/hllapi/hllapi.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/hllapi/calls.cc b/src/plugins/hllapi/calls.cc index 86f1a46..2f5909f 100644 --- a/src/plugins/hllapi/calls.cc +++ b/src/plugins/hllapi/calls.cc @@ -59,7 +59,7 @@ return HLLAPI_STATUS_SYSTEM_ERROR; } - return hSession ? HLLAPI_STATUS_SUCCESS : HLLAPI_STATUS_SYSTEM_ERROR; + return hSession ? HLLAPI_STATUS_SUCCESS : HLLAPI_STATUS_UNAVAILABLE; } HLLAPI_API_CALL hllapi_deinit(void) diff --git a/src/plugins/hllapi/hllapi.c b/src/plugins/hllapi/hllapi.c index 9b9b1e8..dfbff28 100644 --- a/src/plugins/hllapi/hllapi.c +++ b/src/plugins/hllapi/hllapi.c @@ -135,10 +135,7 @@ static int connect_ps(char *buffer, unsigned short *length, unsigned short *rc) buffer = tempbuffer; } - if(hllapi_init(buffer) == 0) - *rc = HLLAPI_STATUS_SUCCESS; - else - *rc = HLLAPI_STATUS_UNAVAILABLE; + *rc = hllapi_init(buffer); if(tempbuffer) free(tempbuffer); -- libgit2 0.21.2