session->host = HOST_IDENTICA;
free(host);
}
- if (proxy)
+ if (proxy) {
+ if (session->proxy)
+ free(session->proxy);
session->proxy = proxy;
+ }
/* Free buffer and close file. */
free(line);
char *tweet;
int retval;
int option;
+ char *http_proxy;
#if 0
char *home = getenv("HOME");
char *pwd = getenv("PWD");
}
curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Set environment variables first, before reading command line options
+ * or config file values. */
+ http_proxy = getenv("http_proxy");
+ if (http_proxy) {
+ if (session->proxy)
+ free(session->proxy);
+ session->proxy = strdup(http_proxy);
+ dbg("http_proxy = %s\n", session->proxy);
+ }
+
parse_configfile(session);
while (1) {