cpw.malu.xmpp.jingle_ft: 1a74d1f9: Made some functions in s5b.c internal, s...

malu at pidgin.im malu at pidgin.im
Wed Apr 15 17:00:57 EDT 2009


-----------------------------------------------------------------
Revision: 1a74d1f9851aa32df1b9280746d753966a699d08
Ancestor: e8a8038b50721fca98d265455ea2706b7b90f6b3
Author: malu at pidgin.im
Date: 2009-04-15T20:56:20
Branch: im.pidgin.cpw.malu.xmpp.jingle_ft
URL: http://d.pidgin.im/viewmtn/revision/info/1a74d1f9851aa32df1b9280746d753966a699d08

Modified files:
        libpurple/protocols/jabber/jingle/s5b.c
        libpurple/protocols/jabber/jingle/s5b.h

ChangeLog: 

Made some functions in s5b.c internal, since they don't need to be exposed
for file-transfer.c anymore

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/s5b.c	c69d747ca94e776e09eef7618e98a4b116158d1e
+++ libpurple/protocols/jabber/jingle/s5b.c	a2847d19718a6cec04479b2ba1a972561a4c35bc
@@ -418,6 +418,88 @@ jingle_s5b_to_xml_internal(JingleTranspo
 	return node;
 }
 
+static void
+jingle_s5b_surrender(JingleS5B *s5b)
+{
+	purple_debug_info("jingle-s5b", 
+		"in jingle_s5b_surrender, using remote streamhost\n");
+	s5b->priv->fd = s5b->priv->remote_fd;
+	
+	if (s5b->priv->local_fd) {
+		close(s5b->priv->local_fd);
+		s5b->priv->local_fd = 0;
+	}
+	
+	if (s5b->priv->watcher) {
+		purple_input_remove(s5b->priv->watcher);
+		s5b->priv->watcher = 0;
+	}
+	
+	if (s5b->priv->connect_timeout) {
+		purple_timeout_remove(s5b->priv->connect_timeout);
+		s5b->priv->connect_timeout = 0;
+	}
+}
+
+static void
+jingle_s5b_take_command(JingleS5B *s5b)
+{
+	purple_debug_info("jingle-s5b",
+		"in jingle_s5b_take_command, using local streamhost\n");
+	s5b->priv->fd = s5b->priv->local_fd;
+	
+	if (s5b->priv->remote_fd) {
+		close(s5b->priv->remote_fd);
+		s5b->priv->remote_fd = 0;
+	}
+	
+	if (s5b->priv->watcher) {
+		purple_input_remove(s5b->priv->watcher);
+		s5b->priv->watcher = 0;
+	}
+	
+	if (s5b->priv->connect_timeout) {
+		purple_timeout_remove(s5b->priv->connect_timeout);
+		s5b->priv->connect_timeout = 0;
+	}
+}
+
+static gboolean
+jingle_s5b_is_connected_to_remote(const JingleS5B *s5b)
+{
+	return s5b->priv->is_connected_to_remote;
+}
+
+static gboolean
+jingle_s5b_remote_is_connected(const JingleS5B *s5b)
+{
+	return s5b->priv->is_remote_connected;
+}
+
+static void
+jingle_s5b_stop_connection_attempts(JingleS5B *s5b)
+{
+	purple_debug_info("jingle-s5b", "stop connection attempts\n");
+	
+	s5b->priv->remaining_streamhosts = NULL;
+	
+	if (s5b->priv->connect_data) {
+		purple_proxy_connect_cancel(s5b->priv->connect_data);
+		s5b->priv->connect_data = NULL;
+	}
+	
+	if (s5b->priv->watcher) {
+		purple_input_remove(s5b->priv->watcher);
+		s5b->priv->watcher = 0;
+	}
+	
+	if (s5b->priv->connect_timeout) {
+		purple_timeout_remove(s5b->priv->connect_timeout);
+		s5b->priv->connect_timeout = 0;
+	}
+}
+
+
 typedef struct {
 	JingleSession *session;
 	JingleS5B *s5b;
@@ -1033,87 +1115,10 @@ jingle_s5b_attempt_connect(JingleSession
 	jingle_s5b_attempt_connect_internal(data);
 }
 
-void
-jingle_s5b_stop_connection_attempts(JingleS5B *s5b)
-{
-	purple_debug_info("jingle-s5b", "stop connection attempts\n");
-	
-	s5b->priv->remaining_streamhosts = NULL;
-	
-	if (s5b->priv->connect_data) {
-		purple_proxy_connect_cancel(s5b->priv->connect_data);
-		s5b->priv->connect_data = NULL;
-	}
-	
-	if (s5b->priv->watcher) {
-		purple_input_remove(s5b->priv->watcher);
-		s5b->priv->watcher = 0;
-	}
-	
-	if (s5b->priv->connect_timeout) {
-		purple_timeout_remove(s5b->priv->connect_timeout);
-		s5b->priv->connect_timeout = 0;
-	}
-}
 
-gboolean
-jingle_s5b_is_connected_to_remote(const JingleS5B *s5b)
-{
-	return s5b->priv->is_connected_to_remote;
-}
 
-gboolean
-jingle_s5b_remote_is_connected(const JingleS5B *s5b)
-{
-	return s5b->priv->is_remote_connected;
-}
 	
-void
-jingle_s5b_surrender(JingleS5B *s5b)
-{
-	purple_debug_info("jingle-s5b", 
-		"in jingle_s5b_surrender, using remote streamhost\n");
-	s5b->priv->fd = s5b->priv->remote_fd;
-	
-	if (s5b->priv->local_fd) {
-		close(s5b->priv->local_fd);
-		s5b->priv->local_fd = 0;
-	}
-	
-	if (s5b->priv->watcher) {
-		purple_input_remove(s5b->priv->watcher);
-		s5b->priv->watcher = 0;
-	}
-	
-	if (s5b->priv->connect_timeout) {
-		purple_timeout_remove(s5b->priv->connect_timeout);
-		s5b->priv->connect_timeout = 0;
-	}
-}
 
-void
-jingle_s5b_take_command(JingleS5B *s5b)
-{
-	purple_debug_info("jingle-s5b",
-		"in jingle_s5b_take_command, using local streamhost\n");
-	s5b->priv->fd = s5b->priv->local_fd;
-	
-	if (s5b->priv->remote_fd) {
-		close(s5b->priv->remote_fd);
-		s5b->priv->remote_fd = 0;
-	}
-	
-	if (s5b->priv->watcher) {
-		purple_input_remove(s5b->priv->watcher);
-		s5b->priv->watcher = 0;
-	}
-	
-	if (s5b->priv->connect_timeout) {
-		purple_timeout_remove(s5b->priv->connect_timeout);
-		s5b->priv->connect_timeout = 0;
-	}
-}
-
 static gboolean
 jingle_s5b_streamhost_is_local(JabberStream *js, const gchar *jid)
 {
============================================================
--- libpurple/protocols/jabber/jingle/s5b.h	26eacce679e7d8d599ef51b576469bbb4cd01e4b
+++ libpurple/protocols/jabber/jingle/s5b.h	e41dc6c96d582522526facd24fec2bc646b18418
@@ -88,14 +88,6 @@ void jingle_s5b_attempt_connect(JingleSe
 
 void jingle_s5b_attempt_connect(JingleSession *session, JingleS5B *s5b);
 
-void jingle_s5b_stop_connection_attempts(JingleS5B *s5b);
-
-gboolean jingle_s5b_is_connected_to_remote(const JingleS5B *s5b);
-gboolean jingle_s5b_remote_is_connected(const JingleS5B *s5b);
-
-void jingle_s5b_surrender(JingleS5B *s5b);
-void jingle_s5b_take_command(JingleS5B *s5b);
-
 void jingle_s5b_handle_transport_accept(JingleS5B *s5b, JingleSession *session, 
 	xmlnode *transport);
 


More information about the Commits mailing list