/soc/2015/koosha/main: c3a16a62c122: add a boolean to JabberStre...

Koosha Khajehmoogahi <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: c3a16a62c122959fbde2a507376fd1907ceb4222
Author:	 Koosha Khajehmoogahi <[email protected]>
Date:	 2015-08-10 18:47 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/koosha/main/rev/c3a16a62c122

Description:

add a boolean to JabberStream indicating whether SM is enabled or not

diffstat:

 libpurple/protocols/jabber/jabber.c |  3 +++
 libpurple/protocols/jabber/jabber.h |  2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diffs (32 lines):

diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -361,6 +361,8 @@ void jabber_stream_management_parse(Jabb
 	resume = purple_xmlnode_get_attrib(packet, "resume");
 	account = purple_connection_get_account(js->gc);
 
+	js->has_sm = TRUE;
+
 	resume_enabled = resume && purple_xmlnode_is_attrib_true(resume);
 
 	purple_debug_info( "jabber", "Stream management %s resumption is enabled.\n",
@@ -1079,6 +1081,7 @@ jabber_stream_new(PurpleAccount *account
 	js->protocol_version.major = 1;
 	js->protocol_version.minor = 0;
 	js->sessions = NULL;
+	js->has_sm = FALSE;
 	js->stanzas_recvd = 0;
 	js->stun_ip = NULL;
 	js->stun_port = 0;
diff --git a/libpurple/protocols/jabber/jabber.h b/libpurple/protocols/jabber/jabber.h
--- a/libpurple/protocols/jabber/jabber.h
+++ b/libpurple/protocols/jabber/jabber.h
@@ -195,6 +195,8 @@ struct _JabberStream
 	time_t idle;
 	time_t old_idle;
 
+	/* Whether stream management is enabled or not */
+	gboolean has_sm;
 	guint32 stanzas_recvd;
 
 	/** When we last pinged the server, so we don't ping more

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.