From 8bbf163cfb796524754d7872e148c9793cd4452f Mon Sep 17 00:00:00 2001 From: dequis Date: Fri, 7 Jul 2017 05:49:57 -0300 Subject: Add tweak values 1-15, sets orca version in the user agent Since there are some issues I can't reproduce, let's do this experiment properly and figure out if this really matters. Value 1 is slightly newer. Value 2 is newer with the current set of fields. Value 3 is what purple-facebook uses. Adding 4 makes it http only, adding 8 makes it mqtt only. Some values are redundant. I suggest trying 1, 2, 3, 7 and 11. --- facebook/facebook-http.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'facebook/facebook-http.c') diff --git a/facebook/facebook-http.c b/facebook/facebook-http.c index 6234d55..7335848 100644 --- a/facebook/facebook-http.c +++ b/facebook/facebook-http.c @@ -242,6 +242,20 @@ fb_http_cookies_parse_request(FbHttp *http, FbHttpRequest *req) g_strfreev(hdrs); } +void +fb_http_set_agent(FbHttp *http, const gchar *agent) +{ + FbHttpPrivate *priv; + + g_return_if_fail(FB_IS_HTTP(http)); + priv = http->priv; + + if (agent != priv->agent && g_strcmp0(agent, priv->agent)) { + g_free(priv->agent); + priv->agent = g_strdup(agent); + } +} + FbHttpRequest * fb_http_request_new(FbHttp *http, const gchar *url, gboolean post, FbHttpFunc func, gpointer data) -- cgit v1.2.3