cpw.darkrain42.xmpp.bosh: 87e5b267: The BOSH User Agent should include the c...

paul at darkrain42.org paul at darkrain42.org
Tue Jan 20 14:46:54 EST 2009


-----------------------------------------------------------------
Revision: 87e5b267c7251b68c2860428f4f13fa14f63feec
Ancestor: 2781d5390ae2e275324b76bf13b9dfb015691030
Author: paul at darkrain42.org
Date: 2009-01-20T06:10:42
Branch: im.pidgin.cpw.darkrain42.xmpp.bosh
URL: http://d.pidgin.im/viewmtn/revision/info/87e5b267c7251b68c2860428f4f13fa14f63feec

Modified files:
        libpurple/protocols/jabber/bosh.c

ChangeLog: 

The BOSH User Agent should include the client name (and optionally version),
not just the libpurple version. This is what was intended originally.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/bosh.c	bf433e12fc36c42faa87ceb0a4125e049e632856
+++ libpurple/protocols/jabber/bosh.c	fa85d205b46830dac602507a058f9bf168c4d4f8
@@ -105,13 +105,18 @@ void jabber_bosh_init(void)
 void jabber_bosh_init(void)
 {
 	GHashTable *ui_info = purple_core_get_ui_info();
+	const char *ui_name = NULL;
 	const char *ui_version = NULL;
 
-	if (ui_info)
+	if (ui_info) {
+		ui_name = g_hash_table_lookup(ui_info, "name");
 		ui_version = g_hash_table_lookup(ui_info, "version");
+	}
 
-	if (ui_version)
-		bosh_useragent = g_strdup_printf("%s (libpurple " VERSION ")", ui_version);
+	if (ui_name)
+		bosh_useragent = g_strdup_printf("%s%s%s (libpurple " VERSION ")",
+		                                 ui_name, ui_version ? " " : "",
+		                                 ui_version ? ui_version : "");
 	else
 		bosh_useragent = g_strdup("libpurple " VERSION);
 }


More information about the Commits mailing list