summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/client.h
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-02-15 10:24:20 +0000
committerRobert Pösel <robyer@seznam.cz>2015-02-15 10:24:20 +0000
commit60b391e2a55749c0cf9e96f53515673a0898a0d5 (patch)
tree6c750dc8e278a30773a0a60cf4a6e6235a63931d /protocols/FacebookRM/src/client.h
parent39492f39ace0b10ff2ee6c9d61c22f2ac7d4a839 (diff)
Facebook: Fix for infinite channel "starting"; Version bump
This fixes it by better using of random number generator. Now we use rand_s() instead of rand() because of thread safety and also we have random "seed" per each facebook_client with much better initial random seed. Previously when user logged off and then logged in again, it used same randomgly generated clientid which resulted in confusion on Facebook server and "infinite" repeated requests for channel every second from Miranda... This bug was here probably for many months and affected all stable and development versions. git-svn-id: http://svn.miranda-ng.org/main/trunk@12119 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/client.h')
-rw-r--r--protocols/FacebookRM/src/client.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/client.h b/protocols/FacebookRM/src/client.h
index 6022cd5dca..55b06a24be 100644
--- a/protocols/FacebookRM/src/client.h
+++ b/protocols/FacebookRM/src/client.h
@@ -3,7 +3,7 @@
Facebook plugin for Miranda Instant Messenger
_____________________________________________
-Copyright © 2009-11 Michal Zelinka, 2011-15 Robert Pösel
+Copyright � 2009-11 Michal Zelinka, 2011-15 Robert P�sel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ public:
facebook_client()
{
- msgid_ = error_count_ = last_feeds_update_ = last_notification_time_ = 0;
+ msgid_ = error_count_ = last_feeds_update_ = last_notification_time_ = random_ = 0;
https_ = is_typing_ = false;
@@ -53,6 +53,10 @@ public:
HANDLE hFcbCon;
HANDLE fcb_conn_lock_;
+ // Random generator value for this client
+
+ unsigned int random_;
+
// Parent handle
FacebookProto* parent;