Changeset 5754:b23d79c13370 in roaraudio for libroar/socket.c
- Timestamp:
- 11/16/12 16:49:56 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/socket.c
r5745 r5754 401 401 402 402 int roar_socket_connect (int type, const char * host, int port) { 403 c har * proxy_type = getenv("ROAR_PROXY");403 const char * proxy_type = roar_env_get("ROAR_PROXY"); 404 404 405 405 ROAR_DBG("roar_socket_connect(host='%s', port=%i) = ?", host, port); … … 874 874 int proxy_port = -1; 875 875 char proxy_host[ROAR_SOCKET_MAX_HOSTNAMELEN]; 876 c har * proxy_addr = NULL;876 const char * proxy_addr = NULL; 877 877 int i; 878 878 int fh = -1; 879 c har * user = NULL, * pw = NULL, * opts = NULL;879 const char * user = NULL, * pw = NULL, * opts = NULL; 880 880 char * sep; 881 881 int no_fh = 0; … … 895 895 896 896 if ( user == NULL ) 897 user = getenv("USER");897 user = roar_env_get("USER"); 898 898 899 899 // TODO: change this so we support listen() proxys (ssh -R) … … 902 902 903 903 if ( !strncmp(proxy_type, "socks", 5) ) { 904 proxy_addr = getenv("socks_proxy");904 proxy_addr = roar_env_get("socks_proxy"); 905 905 906 906 proxy_port = 9050; // TOR's default port … … 908 908 proxy_port = 8080; 909 909 910 if ( (proxy_addr = getenv("http_proxy")) == NULL )911 proxy_addr = getenv("https_proxy");910 if ( (proxy_addr = roar_env_get("http_proxy")) == NULL ) 911 proxy_addr = roar_env_get("https_proxy"); 912 912 913 913 if ( proxy_addr == NULL ) … … 918 918 } else if ( !strncmp(proxy_type, "ssh", 3) ) { 919 919 proxy_port = 22; 920 proxy_addr = getenv("ssh_proxy");920 proxy_addr = roar_env_get("ssh_proxy"); 921 921 no_fh = 1; 922 922 } … … 1105 1105 #ifdef ROAR_HAVE_BIN_SSH 1106 1106 static int roar_socket_open_ssh (int mode, int fh, const char * host, int port, const char * user, const char * pw, const char * opts) { 1107 c har * proxy_addr = getenv("ssh_proxy");1107 const char * proxy_addr = roar_env_get("ssh_proxy"); 1108 1108 char * sep; 1109 1109 char cmd[1024] = {0}, rcmd[1024] = {0};
Note: See TracChangeset
for help on using the changeset viewer.