From 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 May 2018 16:02:14 +0200 Subject: mir_forkThread - stronger typizatioin for thread function parameter --- plugins/AVS/src/services.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/AVS/src/services.cpp') diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 5302ccfe36..cf7f6cafe9 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -718,7 +718,7 @@ INT_PTR DrawAvatarPicture(WPARAM, LPARAM lParam) else ace = (AVATARCACHEENTRY *)GetAvatarBitmap((WPARAM)r->hContact, 0); if (ace && (!(r->dwFlags & AVDRQ_RESPECTHIDDEN) || !(ace->dwFlags & AVS_HIDEONCLIST))) { - ace->t_lastAccess = time(nullptr); + ace->t_lastAccess = time(0); if (ace->bmHeight == 0 || ace->bmWidth == 0 || ace->hbmPic == nullptr) return 0; @@ -750,12 +750,10 @@ INT_PTR GetMyAvatar(WPARAM wParam, LPARAM lParam) ///////////////////////////////////////////////////////////////////////////////////////// -static void ReloadMyAvatar(LPVOID lpParam) +static void ReloadMyAvatar(char *szProto) { Thread_SetName("AVS: ReloadMyAvatar"); - char *szProto = (char *)lpParam; - mir_sleep(500); if (g_shutDown) return; @@ -785,7 +783,7 @@ static void ReloadMyAvatar(LPVOID lpParam) NotifyEventHooks(hMyAvatarChanged, (WPARAM)myAvatarProto, 0); } - mir_free(lpParam); + mir_free(szProto); } INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM) @@ -799,7 +797,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM) continue; if (!mir_strcmp(it->szProtoname, proto)) { - mir_forkthread(ReloadMyAvatar, mir_strdup(it->szProtoname)); + mir_forkThread(ReloadMyAvatar, mir_strdup(it->szProtoname)); return 0; } } -- cgit v1.2.3