diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-19 18:01:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-19 18:01:14 +0000 |
commit | d6e05cc3bca53565d9ca65377ab8b0b6190774b3 (patch) | |
tree | 76040facd4d0b82162069a19cae8f7f024bf1f65 /protocols/SkypeClassic | |
parent | 2ef414538760079fa2955fca1a2c03d610459fa8 (diff) |
preparing to the transparent cyphering: end of MS_DB_CRYPT_ENCODESTRING/MS_DB_CRYPT_DECODESTRING
git-svn-id: http://svn.miranda-ng.org/main/trunk@6938 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic')
-rw-r--r-- | protocols/SkypeClassic/src/skypeapi.cpp | 28 | ||||
-rw-r--r-- | protocols/SkypeClassic/src/skypeopt.cpp | 10 |
2 files changed, 19 insertions, 19 deletions
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp index c041a53a43..c7d8ab8010 100644 --- a/protocols/SkypeClassic/src/skypeapi.cpp +++ b/protocols/SkypeClassic/src/skypeapi.cpp @@ -407,14 +407,17 @@ char *SkypeRcvTime(char *what, time_t st, DWORD maxwait) { LOG(("<SkypeRcv: (empty)"));
return NULL;
}
-char *SkypeRcv(char *what, DWORD maxwait) {
+
+char *SkypeRcv(char *what, DWORD maxwait)
+{
return SkypeRcvTime(what, 0, maxwait);
}
-char *SkypeRcvMsg(char *what, time_t st, HANDLE hContact, DWORD maxwait) {
- char *msg, msgid[32]={0}, *pMsg, *pCurMsg;
+char *SkypeRcvMsg(char *what, time_t st, HANDLE hContact, DWORD maxwait)
+{
+ char *msg, msgid[32]={0}, *pMsg, *pCurMsg;
struct MsgQueue *ptr;
- int iLenWhat = strlen(what);
+ int iLenWhat = (int)strlen(what);
DWORD dwWaitStat;
BOOL bIsError, bProcess;
@@ -1346,7 +1349,8 @@ static int my_spawnv(const char *cmdname, const char *const *argv, PROCESS_INFOR BOOL bRet;
memset (pi, 0, sizeof(PROCESS_INFORMATION));
- for (i=0; argv[i]; i++) iLen+=strlen(argv[i])+1;
+ for (i=0; argv[i]; i++)
+ iLen += (int)strlen(argv[i])+1;
if (!(CommandLine = (char*)calloc(1, iLen))) return -1;
for (i=0; argv[i]; i++) {
if (i) strcat (CommandLine, " ");
@@ -1407,11 +1411,9 @@ static int _ConnectToSkypeAPI(char *path, int iStart) { {
char reply=0;
- CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM)dbv.pszVal);
- if ((reply=SendSkypeproxyCommand(AUTHENTICATE))==-1)
- {
- db_free(&dbv);
- return -1;
+ if ((reply=SendSkypeproxyCommand(AUTHENTICATE))==-1) {
+ db_free(&dbv);
+ return -1;
}
if (!reply) {
OUTPUT(_T("Authentication is not supported/needed for this Skype proxy server. It will be disabled."));
@@ -1492,7 +1494,7 @@ static int _ConnectToSkypeAPI(char *path, int iStart) { if (iStart != 2 || counter)
{
LOG(("ConnectToSkypeAPI sending discover message.. hWnd=%08X", (long)g_hWnd));
- retval=SendMessageTimeout(HWND_BROADCAST, ControlAPIDiscover, (WPARAM)g_hWnd, 0, SMTO_ABORTIFHUNG, 3000, NULL);
+ retval = (int)SendMessageTimeout(HWND_BROADCAST, ControlAPIDiscover, (WPARAM)g_hWnd, 0, SMTO_ABORTIFHUNG, 3000, NULL);
LOG(("ConnectToSkypeAPI sent discover message returning %d", retval));
}
@@ -1521,7 +1523,7 @@ static int _ConnectToSkypeAPI(char *path, int iStart) { LOG(("ConnectToSkypeAPI Starting Skype, as it's not running"));
j=1;
- for (i=0; i<sizeof(SkypeOptions)/sizeof(SkypeOptions[0]); i++)
+ for (i=0; i < SIZEOF(SkypeOptions); i++)
if (db_get_b(NULL, SKYPE_PROTONAME, SkypeOptions[i]+1, SkypeDefaults[i])) {
DBVARIANT dbv;
@@ -1532,7 +1534,7 @@ static int _ConnectToSkypeAPI(char *path, int iStart) { {
int paramSize;
TranslateMirandaRelativePathToAbsolute(dbv.pszVal, szAbsolutePath, TRUE);
- paramSize = strlen(SkypeOptions[i]) + strlen(szAbsolutePath);
+ paramSize = (int)strlen(SkypeOptions[i]) + (int)strlen(szAbsolutePath);
pFree = args[j] = (char*)malloc(paramSize + 1);
sprintf(args[j],"%s%s",SkypeOptions[i],szAbsolutePath);
db_free(&dbv);
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp index 078770d1a6..db077b8b74 100644 --- a/protocols/SkypeClassic/src/skypeopt.cpp +++ b/protocols/SkypeClassic/src/skypeopt.cpp @@ -210,10 +210,10 @@ INT_PTR CALLBACK OptPopupDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case IDC_POPUPBACKCOLOR:
case IDC_POPUPTEXTCOLORERR:
case IDC_POPUPBACKCOLORERR:
- popupBackColor = SendDlgItemMessage(hwnd,IDC_POPUPBACKCOLOR,CPM_GETCOLOUR,0,0);
- popupTextColor = SendDlgItemMessage(hwnd,IDC_POPUPTEXTCOLOR,CPM_GETCOLOUR,0,0);
- popupBackColorErr = SendDlgItemMessage(hwnd,IDC_POPUPBACKCOLORERR,CPM_GETCOLOUR,0,0);
- popupTextColorErr = SendDlgItemMessage(hwnd,IDC_POPUPTEXTCOLORERR,CPM_GETCOLOUR,0,0);
+ popupBackColor = (UINT)SendDlgItemMessage(hwnd,IDC_POPUPBACKCOLOR,CPM_GETCOLOUR,0,0);
+ popupTextColor = (UINT)SendDlgItemMessage(hwnd,IDC_POPUPTEXTCOLOR,CPM_GETCOLOUR,0,0);
+ popupBackColorErr = (UINT)SendDlgItemMessage(hwnd,IDC_POPUPBACKCOLORERR,CPM_GETCOLOUR,0,0);
+ popupTextColorErr = (UINT)SendDlgItemMessage(hwnd,IDC_POPUPTEXTCOLORERR,CPM_GETCOLOUR,0,0);
SendMessage(GetParent(hwnd),PSM_CHANGED,0,0);
break;
case IDC_USEWINCOLORS:
@@ -385,7 +385,6 @@ INT_PTR CALLBACK OptionsProxyDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA CheckDlgButton(hwndDlg, IDC_REQPASS, (BYTE)db_get_b(NULL, SKYPE_PROTONAME, "RequiresPassword", 0));
CheckDlgButton(hwndDlg, IDC_USES2S, (BYTE)db_get_b(NULL, SKYPE_PROTONAME, "UseSkype2Socket", 0));
if (!db_get_s(NULL, SKYPE_PROTONAME, "Password", &dbv)) {
- CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM)dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, dbv.pszVal);
db_free(&dbv);
}
@@ -408,7 +407,6 @@ INT_PTR CALLBACK OptionsProxyDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA db_set_b (NULL, SKYPE_PROTONAME, "UseSkype2Socket", (BYTE)(SendMessage(GetDlgItem(hwndDlg, IDC_USES2S), BM_GETCHECK,0,0)));
ZeroMemory(buf, sizeof(buf));
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, buf, sizeof(buf));
- CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(buf), (LPARAM)buf);
db_set_s(NULL, SKYPE_PROTONAME, "Password", buf);
return TRUE;
}
|