summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-02-25 10:15:31 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-02-25 10:15:31 +0000
commitdcce39da3e6f7485dca39950dfc835563de3c3ea (patch)
tree0f0269e524cc83e41e4614e3c84abe3580ad2c9c /plugins/FTPFileYM/src/utils.cpp
parentd395ad5aceb634b5ccfcb8d31b4b1574e557469e (diff)
1 step: libcurl static link
git-svn-id: http://svn.miranda-ng.org/main/trunk@3763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src/utils.cpp')
-rw-r--r--plugins/FTPFileYM/src/utils.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp
index 7d257d4e98..e824e35e7e 100644
--- a/plugins/FTPFileYM/src/utils.cpp
+++ b/plugins/FTPFileYM/src/utils.cpp
@@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
extern Options &opt;
extern UploadDialog *uDlg;
-extern LibCurl &curl;
int Utils::getDeleteTimeMin()
{
@@ -90,8 +89,8 @@ void Utils::copyToClipboard(char *szText)
}
}
-const char from_chars[] = "Ɋ؎ύ #{}^~[];,";
-const char to_chars[] = "AEIOUYESCRZDTNaeeiouuyscrzdtn__________";
+const char from_chars[] = "Ũ !@#$%^&=,{}[];'`";
+const char to_chars[] = "abvgdeezziiklmnoprstufhccwwqyqeuaABVGDEEZZIIKLMNOPRSTUFHCCWWQYQEUA_________________";
char* Utils::makeSafeString(TCHAR *input, char *output)
{
@@ -120,39 +119,39 @@ void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl
{
char buff[256];
- curl.easy_setopt(hCurl, CURLOPT_ERRORBUFFER, errorBuff);
+ curl_easy_setopt(hCurl, CURLOPT_ERRORBUFFER, errorBuff);
- curl.easy_setopt(hCurl, CURLOPT_POSTQUOTE, headerList);
- curl.easy_setopt(hCurl, CURLOPT_NOPROGRESS, 1);
+ curl_easy_setopt(hCurl, CURLOPT_POSTQUOTE, headerList);
+ curl_easy_setopt(hCurl, CURLOPT_NOPROGRESS, 1);
- curl.easy_setopt(hCurl, CURLOPT_URL, url);
- curl.easy_setopt(hCurl, CURLOPT_PORT, ftp->iPort);
- curl.easy_setopt(hCurl, CURLOPT_CONNECTTIMEOUT, 30);
- curl.easy_setopt(hCurl, CURLOPT_FTP_RESPONSE_TIMEOUT, 20);
+ curl_easy_setopt(hCurl, CURLOPT_URL, url);
+ curl_easy_setopt(hCurl, CURLOPT_PORT, ftp->iPort);
+ curl_easy_setopt(hCurl, CURLOPT_CONNECTTIMEOUT, 30);
+ curl_easy_setopt(hCurl, CURLOPT_FTP_RESPONSE_TIMEOUT, 20);
- curl.easy_setopt(hCurl, CURLOPT_FTP_USE_EPRT, 0);
- curl.easy_setopt(hCurl, CURLOPT_FTP_USE_EPSV, 0);
+ curl_easy_setopt(hCurl, CURLOPT_FTP_USE_EPRT, 0);
+ curl_easy_setopt(hCurl, CURLOPT_FTP_USE_EPSV, 0);
if (ftp->bPassive)
- curl.easy_setopt(hCurl, CURLOPT_FTPPORT, 0);
+ curl_easy_setopt(hCurl, CURLOPT_FTPPORT, 0);
else if (!DB::getAString(0, MODULE, "LocalIP", buff))
- curl.easy_setopt(hCurl, CURLOPT_FTPPORT, buff);
+ curl_easy_setopt(hCurl, CURLOPT_FTPPORT, buff);
else
- curl.easy_setopt(hCurl, CURLOPT_FTPPORT, "-");
+ curl_easy_setopt(hCurl, CURLOPT_FTPPORT, "-");
mir_snprintf(buff, sizeof(buff), "%s:%s", ftp->szUser, ftp->szPass);
- curl.easy_setopt(hCurl, CURLOPT_USERPWD, buff);
+ curl_easy_setopt(hCurl, CURLOPT_USERPWD, buff);
if (ftp->ftpProto == ServerList::FTP::FT_SSL_EXPLICIT || ftp->ftpProto == ServerList::FTP::FT_SSL_IMPLICIT)
{
- curl.easy_setopt(hCurl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
- curl.easy_setopt(hCurl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_DEFAULT);
- curl.easy_setopt(hCurl, CURLOPT_SSL_VERIFYPEER, 0);
- curl.easy_setopt(hCurl, CURLOPT_SSL_VERIFYHOST, 2);
+ curl_easy_setopt(hCurl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+ curl_easy_setopt(hCurl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_DEFAULT);
+ curl_easy_setopt(hCurl, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_easy_setopt(hCurl, CURLOPT_SSL_VERIFYHOST, 2);
}
else if (ftp->ftpProto == ServerList::FTP::FT_SSH)
{
- curl.easy_setopt(hCurl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_PASSWORD);
+ curl_easy_setopt(hCurl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_PASSWORD);
}
}