summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2012-12-21 18:54:36 +0000
committerRobert Pösel <robyer@seznam.cz>2012-12-21 18:54:36 +0000
commit5c46b2e7ddbd88093ff28a11e7f2e8c70d6c13b1 (patch)
treee18a35c2d32ce0e3c9bbede066f9863713f59204
parentaf1424f225d57168297e1be919343ff7d8e25d11 (diff)
Facebook: If enabled logging, write also into network log
git-svn-id: http://svn.miranda-ng.org/main/trunk@2780 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/FacebookRM/src/events.cpp8
-rw-r--r--protocols/FacebookRM/src/proto.cpp8
2 files changed, 10 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/events.cpp b/protocols/FacebookRM/src/events.cpp
index 5d01df88df..3014c570b9 100644
--- a/protocols/FacebookRM/src/events.cpp
+++ b/protocols/FacebookRM/src/events.cpp
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
int FacebookProto::Log(const char *fmt,...)
{
- if ( !getByte( FACEBOOK_KEY_LOGGING_ENABLE, 0 ))
+ if (!getByte(FACEBOOK_KEY_LOGGING_ENABLE, 0))
return EXIT_SUCCESS;
va_list va;
@@ -35,7 +35,11 @@ int FacebookProto::Log(const char *fmt,...)
mir_vsnprintf(text,sizeof(text),fmt,va);
va_end(va);
- return utils::debug::log( m_szModuleName, text );
+ // Write into network log
+ CallService(MS_NETLIB_LOG, (WPARAM)m_hNetlibUser, (LPARAM)text);
+
+ // Write into log file
+ return utils::debug::log(m_szModuleName, text);
}
LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 657c36c00a..e7b9ce5465 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -59,13 +59,13 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username)
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
nlu.szSettingsModule = m_szModuleName;
char module[512];
- mir_snprintf(module,SIZEOF(module),"%sAv",m_szModuleName);
+ mir_snprintf(module, SIZEOF(module), "%s", m_szModuleName);
nlu.szSettingsModule = module;
- mir_sntprintf(descr,SIZEOF(descr),TranslateT("%s server connection"),m_tszUserName);
+ mir_sntprintf(descr, SIZEOF(descr), TranslateT("%s server connection"), m_tszUserName);
nlu.ptszDescriptiveName = descr;
- m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER,0,(LPARAM)&nlu);
+ m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
if (m_hNetlibUser == NULL)
- MessageBox(NULL,TranslateT("Unable to get Netlib connection for Facebook"),m_tszUserName,MB_OK);
+ MessageBox(NULL, TranslateT("Unable to get Netlib connection for Facebook"), m_tszUserName, MB_OK);
facy.set_handle(m_hNetlibUser);