Commit 4cd017f51b993d40173f7a9410778198322cf33a

Authored by Perry Werneck
1 parent 73c89b06

Melhorando retorno da função hllapi_init para facilitar identificação da causa de não inicialização.

src/plugins/hllapi/calls.cc
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 return HLLAPI_STATUS_SYSTEM_ERROR; 59 return HLLAPI_STATUS_SYSTEM_ERROR;
60 } 60 }
61 61
62 - return hSession ? HLLAPI_STATUS_SUCCESS : HLLAPI_STATUS_SYSTEM_ERROR; 62 + return hSession ? HLLAPI_STATUS_SUCCESS : HLLAPI_STATUS_UNAVAILABLE;
63 } 63 }
64 64
65 HLLAPI_API_CALL hllapi_deinit(void) 65 HLLAPI_API_CALL hllapi_deinit(void)
src/plugins/hllapi/hllapi.c
@@ -135,10 +135,7 @@ static int connect_ps(char *buffer, unsigned short *length, unsigned short *rc) @@ -135,10 +135,7 @@ static int connect_ps(char *buffer, unsigned short *length, unsigned short *rc)
135 buffer = tempbuffer; 135 buffer = tempbuffer;
136 } 136 }
137 137
138 - if(hllapi_init(buffer) == 0)  
139 - *rc = HLLAPI_STATUS_SUCCESS;  
140 - else  
141 - *rc = HLLAPI_STATUS_UNAVAILABLE; 138 + *rc = hllapi_init(buffer);
142 139
143 if(tempbuffer) 140 if(tempbuffer)
144 free(tempbuffer); 141 free(tempbuffer);