diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2016-06-19 00:50:49 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2016-06-19 00:50:49 +0000 |
commit | 58613ba2100154117afdffe63853bbb95a2901da (patch) | |
tree | f6013a156869edd3549351cb91cce38556352c2e /protocols/Gadu-Gadu/src/userutils.cpp | |
parent | 7ca306fd83e41b3ee0e45f24c17bd2b04d0fe87e (diff) |
Gadu-Gadu protocol
Fix strerror related loging
- GG\libgadu code uses ansi logging (enabled only in debug mode) - use: as_strerror(errno) to properly override strerror(errno)
- use properly strerror, _tcserror, as_strerror, ws_strerror in GG code
git-svn-id: http://svn.miranda-ng.org/main/trunk@17008 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/userutils.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/userutils.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp index 90cc89579a..03bb478ac5 100644 --- a/protocols/Gadu-Gadu/src/userutils.cpp +++ b/protocols/Gadu-Gadu/src/userutils.cpp @@ -42,9 +42,9 @@ void *gg_doregister(GGPROTO *gg, char *newPass, char *newEmail) TCHAR error[128];
mir_sntprintf(error, TranslateT("Cannot register new account because of error:\n\t%s"),
(h && !s) ? http_error_string(h->error) :
- (s ? TranslateT("Registration rejected") : _tcserror(errno)));
+ (s ? TranslateT("Registration rejected") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLogA("gg_doregister(): Cannot register. errno=%d: %s", errno, strerror(errno));
+ gg->debugLog(_T("gg_doregister(): Cannot register. errno=%d: %s"), errno, ws_strerror(errno));
}
else {
gg->setDword(GG_KEY_UIN, s->uin);
@@ -88,9 +88,9 @@ void *gg_dounregister(GGPROTO *gg, uin_t uin, char *password) TCHAR error[128];
mir_sntprintf(error, TranslateT("Your account cannot be removed because of error:\n\t%s"),
(h && !s) ? http_error_string(h->error) :
- (s ? TranslateT("Bad number or password") : _tcserror(errno)));
+ (s ? TranslateT("Bad number or password") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLogA("gg_dounregister(): Cannot remove account. errno=%d: %s", errno, strerror(errno));
+ gg->debugLog(_T("gg_dounregister(): Cannot remove account. errno=%d: %s"), errno, ws_strerror(errno));
}
else
{
@@ -140,9 +140,9 @@ void *gg_dochpass(GGPROTO *gg, uin_t uin, char *password, char *newPass) TCHAR error[128];
mir_sntprintf(error, TranslateT("Your password cannot be changed because of error:\n\t%s"),
(h && !s) ? http_error_string(h->error) :
- (s ? TranslateT("Invalid data entered") : _tcserror(errno)));
+ (s ? TranslateT("Invalid data entered") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLogA("gg_dochpass(): Cannot change password. errno=%d: %s", errno, strerror(errno));
+ gg->debugLog(_T("gg_dochpass(): Cannot change password. errno=%d: %s"), errno, ws_strerror(errno));
}
else
{
@@ -181,9 +181,9 @@ void *gg_dochemail(GGPROTO *gg, uin_t uin, char *password, char *email, char *ne {
TCHAR error[128];
mir_sntprintf(error, TranslateT("Your e-mail cannot be changed because of error:\n\t%s"),
- (h && !s) ? http_error_string(h->error) : (s ? TranslateT("Bad old e-mail or password") : _tcserror(errno)));
+ (h && !s) ? http_error_string(h->error) : (s ? TranslateT("Bad old e-mail or password") : ws_strerror(errno)));
MessageBox(NULL, error, gg->m_tszUserName, MB_OK | MB_ICONSTOP);
- gg->debugLogA("gg_dochemail(): Cannot change e-mail. errno=%d: %s", errno, strerror(errno));
+ gg->debugLog(_T("gg_dochemail(): Cannot change e-mail. errno=%d: %s"), errno, ws_strerror(errno));
}
else
{
|