- curl_easy_setopt (_curl, CURLOPT_USERNAME, Config::instance()->tms_user().c_str ());
- curl_easy_setopt (_curl, CURLOPT_PASSWORD, Config::instance()->tms_password().c_str ());
+ curl_easy_setopt (_curl, CURLOPT_USERNAME, Config::instance()->tms_user().c_str());
+ curl_easy_setopt (_curl, CURLOPT_PASSWORD, Config::instance()->tms_password().c_str());
+ if (!Config::instance()->tms_passive()) {
+ curl_easy_setopt(_curl, CURLOPT_FTPPORT, "-");
+ }
+ curl_easy_setopt(_curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(_curl, CURLOPT_DEBUGFUNCTION, curl_debug_shim);
+ curl_easy_setopt(_curl, CURLOPT_DEBUGDATA, this);