changeset 629:005d7a0351b6

More API changes in th_network.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Jun 2014 06:38:54 +0300
parents fd0e1589e268
children 46fcab5ff44e
files main.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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 = "<policy-file-request/>";
-    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;