# HG changeset patch # User Matti Hamalainen # Date 1403321934 -10800 # Node ID 005d7a0351b613787e733fdd6b376c2b5412ab7e # Parent fd0e1589e268a16b96e47ceb5c95042521451534 More API changes in th_network. diff -r fd0e1589e268 -r 005d7a0351b6 main.c --- a/main.c Sat Jun 21 05:59:22 2014 +0300 +++ b/main.c Sat Jun 21 06:38:54 2014 +0300 @@ -199,11 +199,9 @@ if (strcasecmp(proto, "socks4a") == 0) optProxyType = TH_PROXY_SOCKS4A; else - /* if (strcasecmp(proto, "socks5") == 0) optProxyType = TH_PROXY_SOCKS5; else - */ { THERR("Invalid proxy type specified: '%s'\n", proto); goto out; @@ -262,6 +260,7 @@ return ret; } + BOOL argHandleOpt(const int optN, char *optArg, char *currArg) { switch (optN) @@ -364,9 +363,9 @@ if (msg != NULL) { - BOOL ret = th_conn_send_buf(conn, msg, strlen(msg) + 1); + int ret = th_conn_send_buf(conn, msg, strlen(msg) + 1); th_free(msg); - return ret; + return ret == THERR_OK; } else return FALSE; @@ -2251,7 +2250,7 @@ } tmpStr = ""; - if (th_conn_send_buf(conn, tmpStr, strlen(tmpStr) + 1) == FALSE) + if (th_conn_send_buf(conn, tmpStr, strlen(tmpStr) + 1) != THERR_OK) { errorMsg("Failed to send policy file request.\n"); goto err_exit;