summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
commit3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a (patch)
tree412a28ef6a572efc7039df1c363bf47a3dec4b19 /protocols/Gadu-Gadu
parent9a6f750a482d1d1ebf4281bb7bf8133e547ad438 (diff)
mir_forkThread<typename> - stronger typizatioin for thread function parameter
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/src/core.cpp14
-rw-r--r--protocols/Gadu-Gadu/src/filetransfer.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp4
6 files changed, 14 insertions, 14 deletions
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp
index ca86944985..56d81d38fe 100644
--- a/protocols/Gadu-Gadu/src/core.cpp
+++ b/protocols/Gadu-Gadu/src/core.cpp
@@ -467,7 +467,7 @@ retry:
}
else {
// Successfully connected
- logonTime = time(nullptr);
+ logonTime = time(0);
setDword(GG_KEY_LOGONTIME, logonTime);
gg_EnterCriticalSection(&sess_mutex, "mainthread", 15, "sess_mutex", 1);
m_sess = local_sess;
@@ -636,7 +636,7 @@ retry:
mir_wstrncat(strFmt2, strFmt1, _countof(strFmt2) - mir_wstrlen(strFmt2));
}
if (__birthyear) {
- time_t t = time(nullptr);
+ time_t t = time(0);
struct tm *lt = localtime(&t);
int br = atoi(__birthyear);
@@ -698,7 +698,7 @@ retry:
delSetting(GG_KEY_PD_FAMILYCITY);
if (__birthyear) {
- time_t t = time(nullptr);
+ time_t t = time(0);
struct tm *lt = localtime(&t);
int br = atoi(__birthyear);
if (br > 0)
@@ -815,7 +815,7 @@ retry:
UIN2IDT(e->event.msg.sender, id);
GCEVENT gce = { m_szModuleName, chat, GC_EVENT_MESSAGE };
- time_t t = time(nullptr);
+ time_t t = time(0);
gce.ptszUID = id;
wchar_t* messageT = mir_utf8decodeW(e->event.msg.message);
gce.ptszText = messageT;
@@ -830,7 +830,7 @@ retry:
// Check if not empty message ( who needs it? )
else if (!e->event.msg.recipients_count && e->event.msg.message && *e->event.msg.message && mir_strcmp(e->event.msg.message, "\xA0\0")) {
PROTORECVEVENT pre = { 0 };
- time_t t = time(nullptr);
+ time_t t = time(0);
pre.timestamp = (!(e->event.msg.msgclass & GG_CLASS_OFFLINE) || e->event.msg.time > (t - timeDeviation)) ? t : e->event.msg.time;
pre.szMessage = e->event.msg.message;
ProtoChainRecvMsg(getcontact(e->event.msg.sender, 1, 0, nullptr), &pre);
@@ -949,7 +949,7 @@ retry:
sessions_updatedlg();
if (ServiceExists(MS_POPUP_ADDPOPUPCLASS))
{
- const wchar_t* szText = time(nullptr) - logonTime > 3
+ const wchar_t* szText = time(0) - logonTime > 3
? TranslateT("You have logged in at another location")
: TranslateT("You are logged in at another location");
for (i = 0; i < e->event.multilogon_info.count; i++)
@@ -1041,7 +1041,7 @@ retry:
PROTORECVFILE pre = { 0 };
pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
- pre.timestamp = time(nullptr);
+ pre.timestamp = time(0);
pre.descr.w = filenameT;
pre.files.w = &filenameT;
pre.lParam = (LPARAM)dcc7;
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp
index eb25e14c6d..6a8ff9ee89 100644
--- a/protocols/Gadu-Gadu/src/filetransfer.cpp
+++ b/protocols/Gadu-Gadu/src/filetransfer.cpp
@@ -113,7 +113,7 @@ HANDLE ftfail(GaduProto *gg, MCONTACT hContact)
#ifdef DEBUGMODE
gg->debugLogA("ftfail(): Failing file transfer...");
#endif
- srand(time(nullptr));
+ srand(time(0));
ft->hProcess = (HANDLE)rand();
ft->hContact = hContact;
#ifdef DEBUGMODE
@@ -397,7 +397,7 @@ void __cdecl GaduProto::dccmainthread(void*)
PROTORECVFILE pre = { 0 };
pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
- pre.timestamp = time(nullptr);
+ pre.timestamp = time(0);
pre.descr.w = filenameT;
pre.files.w = &filenameT;
pre.lParam = (LPARAM)local_dcc;
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 513e99df61..cca61e74bb 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -414,7 +414,7 @@ HWND GaduProto::SearchAdvanced(HWND hwndDlg)
if (mir_wstrlen(text)) {
int yearTo = _tstoi(text);
int yearFrom;
- time_t t = time(nullptr);
+ time_t t = time(0);
struct tm *lt = localtime(&t);
int ay = lt->tm_year + 1900;
char age[16];
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index d46c8584df..1b76e3b09e 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -168,7 +168,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam)
while (lc >= 0 && (gch->ptszText[lc] == '\n' || gch->ptszText[lc] == '\r'))
gch->ptszText[lc--] = 0;
- gce.time = time(nullptr);
+ gce.time = time(0);
gce.bIsMe = 1;
gce.dwFlags = GCEF_ADDTOLOG;
debugLogW(L"gc_event(): Sending conference message to room %s, \"%s\".", gch->ptszID, gch->ptszText);
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index 2dc6c14b41..eb534d71b9 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -867,7 +867,7 @@ int GaduProto::img_displayasmsg(MCONTACT hContact, void *img)
T2Utf szMessage(image_msg);
PROTORECVEVENT pre = { 0 };
- pre.timestamp = time(nullptr);
+ pre.timestamp = time(0);
pre.szMessage = szMessage;
ProtoChainRecvMsg(hContact, &pre);
debugLogW(L"img_displayasmsg(): Image saved to %s.", szPath);
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index caa854ff6a..400e7a5ed8 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -210,7 +210,7 @@ char* oauth_generate_nonce()
char randnum[16];
Utils_GetRandom(randnum, sizeof(randnum));
- CMStringA str(FORMAT, "%ld%s", time(nullptr), randnum);
+ CMStringA str(FORMAT, "%ld%s", time(0), randnum);
BYTE digest[16];
mir_md5_hash((BYTE*)str.GetString(), str.GetLength(), digest);
@@ -243,7 +243,7 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD
};
char timestamp[22];
- mir_snprintf(timestamp, "%ld", time(nullptr));
+ mir_snprintf(timestamp, "%ld", time(0));
oauth_setparam(oauth_parameters, "oauth_timestamp", timestamp);
oauth_setparam(oauth_parameters, "oauth_nonce", ptrA(oauth_generate_nonce()));
if (token != nullptr && *token)