diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/UserInfoEx/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.cpp | 31 |
2 files changed, 10 insertions, 23 deletions
diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h index 8d02bf2cac..f789243f8c 100644 --- a/plugins/UserInfoEx/src/commonheaders.h +++ b/plugins/UserInfoEx/src/commonheaders.h @@ -104,7 +104,7 @@ using namespace std; #define MIRSUCCEEDED(f) ((f)==MIR_OK)
#define MIRFAILED(f) ((f)!=MIR_OK)
-#define MIREXISTS(f) ((int)(f)!=CALLSERVICE_NOTFOUND)
+#define MIREXISTS(f) ((INT_PTR)(f)!=CALLSERVICE_NOTFOUND)
#define PtrIsValid(p) (((p)!=0)&&(((HANDLE)(p))!=INVALID_HANDLE_VALUE))
#define FREE(p) {if (PtrIsValid(p)){free((void*)p);(p)=NULL;}}
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 44009f8722..f5da4c7488 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -203,11 +203,8 @@ public: **/
int UploadNext()
{
- CHAR str[MAXMODULELABELLENGTH];
while (_pPd && *_pPd && _numProto-- > 0) {
- mir_strncpy(str, (*_pPd)->szModuleName, MAXMODULELABELLENGTH);
- mir_strncat(str, PS_CHANGEINFOEX, MAXMODULELABELLENGTH);
- if (ServiceExists(str) && !Upload()) {
+ if (ProtoServiceExists((*_pPd)->szModuleName, PS_CHANGEINFOEX) && !Upload()) {
_pPd++;
return UPLOAD_CONTINUE;
}
@@ -642,23 +639,14 @@ void DlgContactInfoLoadModule() ghWindowList = WindowList_Create();
// check whether changing my details via UserInfoEx is basically possible
- {
- PROTOACCOUNT **pAcc;
- int i, nAccCount;
-
- myGlobals.CanChangeDetails = FALSE;
- if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc)))
- {
- for (i = 0; (i < nAccCount) && !myGlobals.CanChangeDetails; i++)
- {
- if (IsProtoAccountEnabled(pAcc[i]))
- {
- // update my contact information on icq server
- myGlobals.CanChangeDetails = MIREXISTS(CallProtoService(pAcc[i]->szModuleName, PS_CHANGEINFOEX, NULL, NULL));
- }
- }
- }
- }
+ myGlobals.CanChangeDetails = FALSE;
+
+ PROTOACCOUNT **pAcc;
+ int nAccCount;
+ if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc)))
+ for (int i = 0; (i < nAccCount) && !myGlobals.CanChangeDetails; i++)
+ if (IsProtoAccountEnabled(pAcc[i])) // update my contact information on icq server
+ myGlobals.CanChangeDetails = MIREXISTS(CallProtoService(pAcc[i]->szModuleName, PS_CHANGEINFOEX, NULL, NULL));
}
static void ResetUpdateInfo(LPPS pPs)
@@ -1682,4 +1670,3 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar }
return FALSE;
}
-
|