diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/client.h | 7 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/contacts.h | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/feeds.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/history.h | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/login.h | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/messages.h | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/notifications.h | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/status.h | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/requests/utils.h | 4 |
9 files changed, 17 insertions, 20 deletions
diff --git a/protocols/FacebookRM/src/client.h b/protocols/FacebookRM/src/client.h index 6e3a3e2e87..6018a196aa 100644 --- a/protocols/FacebookRM/src/client.h +++ b/protocols/FacebookRM/src/client.h @@ -153,11 +153,8 @@ public: return ""; // FIXME: What's this value and where it come from? Looks like it is the same through all requests.
}
- __inline CMStringA __req() {
- // Increment request number and convert it to string with radix 36 (whole numbers + whole alphabet)
- char buffer[10];
- itoa(InterlockedIncrement(&this->chat_req_), buffer, 36);
- return CMStringA(buffer);
+ __inline unsigned int __req() { // Increment request number
+ return InterlockedIncrement(&this->chat_req_);
}
__inline const char *__rev() {
diff --git a/protocols/FacebookRM/src/requests/contacts.h b/protocols/FacebookRM/src/requests/contacts.h index c49aabfabf..b7793cdc40 100644 --- a/protocols/FacebookRM/src/requests/contacts.h +++ b/protocols/FacebookRM/src/requests/contacts.h @@ -56,7 +56,7 @@ public: << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << "__a=1" << "__pc=PHASED:DEFAULT" @@ -81,7 +81,7 @@ public: << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << "__a=1" << "__pc=PHASED:DEFAULT" diff --git a/protocols/FacebookRM/src/requests/feeds.h b/protocols/FacebookRM/src/requests/feeds.h index 24d9836812..1fc7c3fbc8 100644 --- a/protocols/FacebookRM/src/requests/feeds.h +++ b/protocols/FacebookRM/src/requests/feeds.h @@ -55,7 +55,7 @@ public: << "__pc=PHASED:DEFAULT" << LONG_VALUE("timestamp", ::time(NULL)) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()); } diff --git a/protocols/FacebookRM/src/requests/history.h b/protocols/FacebookRM/src/requests/history.h index 2d8d58b1ea..2c35cdcecb 100644 --- a/protocols/FacebookRM/src/requests/history.h +++ b/protocols/FacebookRM/src/requests/history.h @@ -149,7 +149,7 @@ private: << "client=mercury" << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("fb_dtsg", fc->dtsg_.c_str()) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) @@ -176,7 +176,7 @@ public: << "client=mercury" << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("fb_dtsg", fc->dtsg_.c_str()) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) diff --git a/protocols/FacebookRM/src/requests/login.h b/protocols/FacebookRM/src/requests/login.h index c07a88a511..0c73a6e834 100644 --- a/protocols/FacebookRM/src/requests/login.h +++ b/protocols/FacebookRM/src/requests/login.h @@ -70,7 +70,7 @@ public: << "__pc=EXP1:DEFAULT" << CHAR_VALUE("current_time", (utils::time::unix_timestamp() + ".000").c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("fb_dtsg", dtsg) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__rev", fc->__rev()); diff --git a/protocols/FacebookRM/src/requests/messages.h b/protocols/FacebookRM/src/requests/messages.h index 5241e86d25..9dbbf3aab7 100644 --- a/protocols/FacebookRM/src/requests/messages.h +++ b/protocols/FacebookRM/src/requests/messages.h @@ -95,7 +95,7 @@ public: << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("fb_dtsg", fc->dtsg_.c_str()) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) @@ -125,7 +125,7 @@ public: << "source=mercury-chat" << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("fb_dtsg", fc->dtsg_.c_str()) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) @@ -160,7 +160,7 @@ public: << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << "__a=1"; } diff --git a/protocols/FacebookRM/src/requests/notifications.h b/protocols/FacebookRM/src/requests/notifications.h index 72643ce6e8..ecaed10966 100644 --- a/protocols/FacebookRM/src/requests/notifications.h +++ b/protocols/FacebookRM/src/requests/notifications.h @@ -42,7 +42,7 @@ public: << "businessID=" // probably for pages? << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << "__pc=PHASED:DEFAULT" << "__be=-1" @@ -66,7 +66,7 @@ public: << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("alert_ids%5B0%5D", ptrA(mir_urlEncode(id))); } diff --git a/protocols/FacebookRM/src/requests/status.h b/protocols/FacebookRM/src/requests/status.h index b835fad0b9..8407fc7329 100644 --- a/protocols/FacebookRM/src/requests/status.h +++ b/protocols/FacebookRM/src/requests/status.h @@ -39,7 +39,7 @@ public: << CHAR_VALUE("fb_dtsg", fc->dtsg_.c_str()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()); } }; @@ -65,7 +65,7 @@ public: << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()); ; } diff --git a/protocols/FacebookRM/src/requests/utils.h b/protocols/FacebookRM/src/requests/utils.h index 92c913d890..3ce9483497 100644 --- a/protocols/FacebookRM/src/requests/utils.h +++ b/protocols/FacebookRM/src/requests/utils.h @@ -35,7 +35,7 @@ public: << "new_captcha_type=TFBCaptcha" << CHAR_VALUE("skipped_captcha_data", captchaPersistData) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("__rev", fc->__rev()) << CHAR_VALUE("__user", fc->self_.user_id.c_str()); } @@ -128,7 +128,7 @@ public: Body << CHAR_VALUE("fb_dtsg", fc->dtsg_.c_str()) << CHAR_VALUE("__dyn", fc->__dyn()) - << CHAR_VALUE("__req", fc->__req()) + << INT_VALUE("__req", fc->__req()) << CHAR_VALUE("ttstamp", fc->ttstamp_.c_str()) << CHAR_VALUE("__user", status->isPage && !status->user_id.empty() ? status->user_id.c_str() : fc->self_.user_id.c_str()) << CHAR_VALUE("xhpc_targetid", status->user_id.empty() ? fc->self_.user_id.c_str() : status->user_id.c_str()) |