Skip to content

Commit

Permalink
0 is valid and uploading errors helps (#746)
Browse files Browse the repository at this point in the history
* 0 is valid and uploading errors helps

* another socket check?
  • Loading branch information
plasticchris authored Mar 23, 2017
1 parent 79f30f0 commit c4357ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kitsune/hlo_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ static int _start_connection(hlo_sock_ctx_t * ctx) {

if( ctx->sec == SOCKET_SEC_SSL ) {
ctx->sock = socket(AF_INET, SOCK_STREAM, SL_SEC_SOCKET);
if (ctx->sock <= 0) {
DISP("sock fail\n");
if (ctx->sock < 0) {
LOGE("sock fail\n");
goto exit;
}
#define SL_SSL_CA_CERT_FILE_NAME "/cert/digi.cer"
Expand All @@ -99,7 +99,7 @@ static int _start_connection(hlo_sock_ctx_t * ctx) {
SL_SO_SECURE_FILES_CA_FILE_NAME,
SL_SSL_CA_CERT_FILE_NAME,
strlen(SL_SSL_CA_CERT_FILE_NAME)) < 0) {
LOGI("error setting ssl options\r\n");
LOGE("error setting ssl options\r\n");
}
{
char buf[8];
Expand All @@ -115,7 +115,7 @@ static int _start_connection(hlo_sock_ctx_t * ctx) {
}

if (ctx->sock < 0) {
DISP("sock fail 2\n");
LOGE("sock fail 2\n");
goto exit;
} else {
timeval tv = (timeval ) { .tv_sec = 1, .tv_usec = 0, };
Expand Down

0 comments on commit c4357ef

Please sign in to comment.