Mercurial > hg > nnchat
diff main.c @ 606:2cc5434a8ce0
Change proxy authentication handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 20 May 2014 04:34:23 +0300 |
parents | 0a30bf8db004 |
children | c7b8e299c612 |
line wrap: on
line diff
--- a/main.c Tue May 20 02:11:05 2014 +0300 +++ b/main.c Tue May 20 04:34:23 2014 +0300 @@ -59,7 +59,8 @@ */ int optPort = 8005, optProxyPort = 1080, - optProxyType = NN_PROXY_NONE; + optProxyType = NN_PROXY_NONE, + optProxyAuthType = NN_PROXY_AUTH_NONE; int optUserColor = 0x000000; char *optServer = "chat.newbienudes.com", *optProxyServer = NULL, @@ -2089,8 +2090,8 @@ if (optProxyUserID == NULL) optProxyUserID = "James Bond"; - if (nn_conn_set_proxy(conn, optProxyType, optProxyPort, optProxyServer, - optProxyUserID, optProxyPassword) != 0) + if (nn_conn_set_proxy(conn, optProxyType, optProxyPort, optProxyServer, optProxyAuthType) != 0 || + nn_conn_set_proxy_auth_user(conn, optProxyUserID, optProxyPassword) != 0) { errorMsg("Error setting proxy information.\n"); goto err_exit;