summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/connection.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2012-05-24 15:40:11 +0000
committerRobert Pösel <robyer@seznam.cz>2012-05-24 15:40:11 +0000
commit73d90fba8c5a90e1195481efa7e59535cf156413 (patch)
tree5a840a24e5f5da25fbc30921d01fae2c31b6adb3 /protocols/FacebookRM/connection.cpp
parentf78628ed14bc7aa0fd3a7e10c5cb25c71e7748db (diff)
Update for Facebook RM (processing friend requests, searching support,...)
git-svn-id: http://svn.miranda-ng.org/main/trunk@164 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/connection.cpp')
-rw-r--r--protocols/FacebookRM/connection.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/FacebookRM/connection.cpp b/protocols/FacebookRM/connection.cpp
index d60b1ec969..14b5c181c1 100644
--- a/protocols/FacebookRM/connection.cpp
+++ b/protocols/FacebookRM/connection.cpp
@@ -91,6 +91,9 @@ void FacebookProto::ChangeStatus(void*)
facy.load_friends();
+ // Process Friends requests
+ ForkThread( &FacebookProto::ProcessFriendRequests, this, NULL );
+
if (getByte(FACEBOOK_KEY_PARSE_MESSAGES, DEFAULT_PARSE_MESSAGES))
ForkThread( &FacebookProto::ProcessUnreadMessages, this );
@@ -188,7 +191,7 @@ void FacebookProto::UpdateLoop(void *)
time_t tim = ::time(NULL);
LOG( ">>>>> Entering Facebook::UpdateLoop[%d]", tim );
- for ( int i = -1; !isOffline(); i = ++i % 6 )
+ for ( int i = -1; !isOffline(); i = ++i % 100 )
{
if ( i != -1 ) {
if ( !facy.invisible_ )
@@ -198,6 +201,10 @@ void FacebookProto::UpdateLoop(void *)
if ( i == 2 && getByte( FACEBOOK_KEY_EVENT_FEEDS_ENABLE, DEFAULT_EVENT_FEEDS_ENABLE ) )
if ( !facy.feeds( ) )
break;
+
+ if ( i == 99 )
+ ForkThread( &FacebookProto::ProcessFriendRequests, this, NULL );
+
LOG( "***** FacebookProto::UpdateLoop[%d] going to sleep...", tim );
if ( WaitForSingleObjectEx( update_loop_lock_, GetPollRate( ) * 1000, true ) != WAIT_TIMEOUT )
break;