aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-http.c
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-07-08 14:39:25 +0200
committerMarius Halden <marius.h@lden.org>2017-07-08 14:39:25 +0200
commit049c34398641f52913c00832ad24388442b61caa (patch)
treecb5c38da10118ec8a7a2aa69303e8a138c971315 /facebook/facebook-http.c
parent2211c7c2026ad5c2cf67e1bb27470dd61e443f12 (diff)
parent8bbf163cfb796524754d7872e148c9793cd4452f (diff)
downloadbitlbee-facebook-049c34398641f52913c00832ad24388442b61caa.tar.gz
bitlbee-facebook-049c34398641f52913c00832ad24388442b61caa.tar.bz2
bitlbee-facebook-049c34398641f52913c00832ad24388442b61caa.tar.xz
Merge branch 'master' into track-messages
Diffstat (limited to 'facebook/facebook-http.c')
-rw-r--r--facebook/facebook-http.c14
1 files changed, 14 insertions, 0 deletions
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)