Mercurial > hg > th-libs
changeset 104:ec5a5e573885
Return real error values.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 21 Jun 2014 05:59:29 +0300 |
parents | f7bec3f7181d |
children | ea5b1c4b3af5 |
files | th_network.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/th_network.c Sat Jun 21 05:11:06 2014 +0300 +++ b/th_network.c Sat Jun 21 05:59:29 2014 +0300 @@ -149,7 +149,7 @@ int th_conn_set_proxy(th_conn_t *conn, int type, int port, const char *host, int auth_type) { if (conn == NULL) - return -1; + return THERR_NULLPTR; conn->proxy.type = type; conn->proxy.port = port; @@ -164,16 +164,16 @@ th_get_addr(&(conn->proxy.addr), conn->proxy.hst); } else - return -2; + return THERR_INVALID_DATA; - return 0; + return THERR_OK; } int th_conn_set_proxy_auth_user(th_conn_t *conn, const char *userid, const char *passwd) { if (conn == NULL) - return -1; + return THERR_NULLPTR; th_free(conn->proxy.userid); conn->proxy.userid = th_strdup(userid); @@ -181,7 +181,7 @@ th_free(conn->proxy.passwd); conn->proxy.passwd = th_strdup(passwd); - return 0; + return THERR_OK; }