changeset 26932:a8537bbcfb79

Remove trailing whitespace that has snuck in.
author Paul Aurich <paul@darkrain42.org>
date Fri, 22 May 2009 03:54:29 +0000
parents 6105fa42b60c
children f500336f9881
files libpurple/protocols/jabber/bosh.c libpurple/protocols/jabber/buddy.c libpurple/protocols/jabber/caps.c libpurple/protocols/jabber/chat.c libpurple/protocols/jabber/data.c libpurple/protocols/jabber/google.c libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/jabber.h libpurple/protocols/jabber/message.c libpurple/protocols/jabber/presence.c libpurple/protocols/jabber/si.c
diffstat 11 files changed, 71 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/bosh.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/bosh.c	Fri May 22 03:54:29 2009 +0000
@@ -57,7 +57,7 @@
 	/* decoded URL */
 	char *host;
 	int port;
-	char *path; 
+	char *path;
 
 	/* Must be big enough to hold 2^53 - 1 */
 	guint64 rid;
@@ -281,7 +281,7 @@
 		 * connection.
 		 */
 		chosen = conn->connections[0];
-	
+
 		if (!chosen->ready)
 			purple_debug_warning("jabber", "First BOSH connection wasn't ready. Bad "
 					"things may happen.\n");
@@ -296,7 +296,7 @@
 		 */
 		if (data) {
 			int len = data ? strlen(data) : 0;
-			purple_circ_buffer_append(conn->pending, data, len); 
+			purple_circ_buffer_append(conn->pending, data, len);
 		}
 		return;
 	}
@@ -349,7 +349,7 @@
 	const char *type;
 
 	type = xmlnode_get_attrib(node, "type");
-	
+
 	if (type != NULL && !strcmp(type, "terminate")) {
 		conn->ready = FALSE;
 		purple_connection_error_reason (conn->js->gc,
@@ -418,7 +418,7 @@
 			jabber_process_packet(js, &child);
 		}
 	} else {
-		purple_debug_warning("jabber", "Received unexepcted empty BOSH packet.\n");	
+		purple_debug_warning("jabber", "Received unexepcted empty BOSH packet.\n");
 	}
 }
 
@@ -487,7 +487,7 @@
 	packet = xmlnode_get_child(node, "features");
 	conn->js->use_bosh = TRUE;
 	conn->receive_cb = auth_response_cb;
-	jabber_stream_features_parse(conn->js, packet);		
+	jabber_stream_features_parse(conn->js, packet);
 }
 
 static void jabber_bosh_connection_boot(PurpleBOSHConnection *conn) {
@@ -647,7 +647,7 @@
 				return;
 
 			len = atoi(sep + 2);
-			if (len == 0) 
+			if (len == 0)
 				purple_debug_warning("jabber", "Found mangled Content-Length header.\n");
 
 			conn->body_len = len;
--- a/libpurple/protocols/jabber/buddy.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Fri May 22 03:54:29 2009 +0000
@@ -1044,14 +1044,14 @@
 
 	if (!jbi->jb->resources) {
 		/* the buddy is offline */
-		gchar *status = 
-			g_strdup_printf("%s%s%s",	_("Offline"), 
+		gchar *status =
+			g_strdup_printf("%s%s%s",	_("Offline"),
 				jbi->last_message ? ": " : "",
 				jbi->last_message ? jbi->last_message : "");
 		if (jbi->last_seconds > 0) {
 			char *last = purple_str_seconds_to_string(jbi->last_seconds);
 			gchar *message = g_strdup_printf(_("%s ago"), last);
-			purple_notify_user_info_prepend_pair(user_info, 
+			purple_notify_user_info_prepend_pair(user_info,
 				_("Logged off"), message);
 			g_free(last);
 			g_free(message);
@@ -1471,8 +1471,8 @@
 							jbir->idle_seconds = sec;
 						}
 					}
-					/* Update the idle time of the buddy resource, if we got it. 
-					 This will correct the value when a server doesn't mark 
+					/* Update the idle time of the buddy resource, if we got it.
+					 This will correct the value when a server doesn't mark
 					 delayed presence and we got the presence when signing on */
 					jb = jabber_buddy_find(js, from, FALSE);
 					if (jb) {
@@ -1493,9 +1493,9 @@
 										jbr->idle = 0;
 									}
 
-									if (jbr == 
+									if (jbr ==
 										jabber_buddy_find_resource(jb, NULL)) {
-										purple_prpl_got_user_idle(js->gc->account, 
+										purple_prpl_got_user_idle(js->gc->account,
 											buddy_name, jbr->idle, jbr->idle);
 									}
 								}
@@ -1750,7 +1750,7 @@
 		jbi->ids = g_slist_prepend(jbi->ids, g_strdup(iq->id));
 		jabber_iq_send(iq);
 	}
-	
+
 	js->pending_buddy_info_requests = g_slist_prepend(js->pending_buddy_info_requests, jbi);
 	jbi->timeout_handle = purple_timeout_add_seconds(30, jabber_buddy_get_info_timeout, jbi);
 }
@@ -2501,7 +2501,7 @@
 	if (node)
 		purple_debug_info("jabber", "Found cap: %s\n", cap);
 	else
-		purple_debug_info("jabber", "Cap %s not found\n", cap); 
+		purple_debug_info("jabber", "Cap %s not found\n", cap);
 
 	return (node != NULL);
 }
--- a/libpurple/protocols/jabber/caps.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/caps.c	Fri May 22 03:54:29 2009 +0000
@@ -41,7 +41,7 @@
 
 /**
  *	Processes a query-node and returns a JabberCapsClientInfo object with all relevant info.
- *	
+ *
  *	@param 	query 	A query object.
  *	@return 		A JabberCapsClientInfo object.
  */
@@ -192,7 +192,7 @@
 		xmlnode *feature = xmlnode_new_child(client, "feature");
 		xmlnode_set_attrib(feature, "var", feat);
 	}
-	
+
 	for(iter = props->forms; iter; iter = g_list_next(iter)) {
 		/* FIXME: See #7814 */
 		xmlnode *xdata = iter->data;
@@ -329,7 +329,7 @@
 
 void jabber_caps_init(void)
 {
-	nodetable = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)jabber_caps_node_exts_unref); 
+	nodetable = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)jabber_caps_node_exts_unref);
 	capstable = g_hash_table_new_full(jabber_caps_hash, jabber_caps_compare, NULL, (GDestroyNotify)jabber_caps_client_info_destroy);
 	jabber_caps_load();
 }
@@ -589,7 +589,7 @@
 	}
 
 	userdata = g_new0(jabber_caps_cbplususerdata, 1);
-	/* This ref is given to fetching the basic node#ver info if we need it 
+	/* This ref is given to fetching the basic node#ver info if we need it
 	 * or unrefed at the bottom of this function */
 	cbplususerdata_ref(userdata);
 	userdata->cb = cb;
@@ -659,7 +659,7 @@
 				jabber_iq_set_callback(iq, jabber_caps_ext_iqcb, cbdata);
 				jabber_iq_send(iq);
 
-				++userdata->extOutstanding;	
+				++userdata->extOutstanding;
 			}
 			exts[i] = NULL;
 		}
@@ -681,7 +681,7 @@
 	const JabberIdentity *bc;
 	gint cat_cmp;
 	gint typ_cmp;
-	
+
 	ac = a;
 	bc = b;
 
@@ -723,7 +723,7 @@
 
 	aformtype = jabber_caps_get_formtype(aformtypefield);
 	bformtype = jabber_caps_get_formtype(bformtypefield);
-	
+
 	result = strcmp(aformtype, bformtype);
 	g_free(aformtype);
 	g_free(bformtype);
@@ -737,7 +737,7 @@
 
 	if (!query || strcmp(query->xmlns, "http://jabber.org/protocol/disco#info"))
 		return 0;
-	
+
 	info = g_new0(JabberCapsClientInfo, 1);
 
 	for(child = query->child; child; child = child->next) {
@@ -846,7 +846,7 @@
 		char *type = g_markup_escape_text(id->type, -1);
 		char *lang = NULL;
 		char *name = NULL;
-		
+
 		if (id->lang)
 			lang = g_markup_escape_text(id->lang, -1);
 		if (id->name)
@@ -878,7 +878,7 @@
 
 		while (fields) {
 			GList *value;
-			JabberDataFormField *field = (JabberDataFormField*)fields->data; 
+			JabberDataFormField *field = (JabberDataFormField*)fields->data;
 
 			if (strcmp(field->var, "FORM_TYPE")) {
 				/* Append the "var" attribute */
--- a/libpurple/protocols/jabber/chat.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/chat.c	Fri May 22 03:54:29 2009 +0000
@@ -1204,7 +1204,7 @@
 		data.all_support = &all_support;
 		data.jb = jb;
 
-		g_hash_table_foreach(chat->members, 
+		g_hash_table_foreach(chat->members,
 			jabber_chat_all_participants_have_capability_foreach, &data);
 	} else {
 		all_support = FALSE;
--- a/libpurple/protocols/jabber/data.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/data.c	Fri May 22 03:54:29 2009 +0000
@@ -237,7 +237,7 @@
 	remote_data_by_cid = g_hash_table_new_full(g_str_hash, g_str_equal,
 		g_free, jabber_data_delete);
 
-	jabber_iq_register_handler("data", XEP_0231_NAMESPACE, jabber_data_parse);	
+	jabber_iq_register_handler("data", XEP_0231_NAMESPACE, jabber_data_parse);
 }
 
 void
--- a/libpurple/protocols/jabber/google.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Fri May 22 03:54:29 2009 +0000
@@ -53,16 +53,16 @@
 	GoogleSessionId id;
 	GoogleSessionState state;
 	PurpleMedia *media;
-	JabberStream *js; 
+	JabberStream *js;
 	char *remote_jid;
 } GoogleSession;
 
-static gboolean 
+static gboolean
 google_session_id_equal(gconstpointer a, gconstpointer b)
 {
 	GoogleSessionId *c = (GoogleSessionId*)a;
 	GoogleSessionId *d = (GoogleSessionId*)b;
-	
+
 	return !strcmp(c->id, d->id) && !strcmp(c->initiator, d->initiator);
 }
 
@@ -95,12 +95,12 @@
 	xmlnode_set_attrib(iq->node, "to", session->remote_jid);
 	sess = google_session_create_xmlnode(session, "terminate");
 	xmlnode_insert_child(iq->node, sess);
-	
+
 	jabber_iq_send(iq);
 	google_session_destroy(session);
 }
 
-static void 
+static void
 google_session_send_candidates(PurpleMedia *media, gchar *session_id,
 		gchar *participant, GoogleSession *session)
 {
@@ -383,7 +383,7 @@
 	PurpleMediaCodec *codec;
 	const char *id, *encoding_name,  *clock_rate;
 	GParameter *params;
-	guint num_params;	
+	guint num_params;
 
 	if (session->state != UNINIT) {
 		purple_debug_error("jabber", "Received initiate for active session.\n");
@@ -414,8 +414,8 @@
 
 	desc_element = xmlnode_get_child(sess, "description");
 
-	for (codec_element = xmlnode_get_child(desc_element, "payload-type"); 
-	     codec_element; 
+	for (codec_element = xmlnode_get_child(desc_element, "payload-type");
+	     codec_element;
 	     codec_element = xmlnode_get_next_twin(codec_element)) {
 		encoding_name = xmlnode_get_attrib(codec_element, "name");
 		id = xmlnode_get_attrib(codec_element, "id");
@@ -450,15 +450,15 @@
 	jabber_iq_send(result);
 }
 
-static void 
+static void
 google_session_handle_candidates(JabberStream  *js, GoogleSession *session, xmlnode *sess, const char *iq_id)
 {
 	JabberIq *result;
 	GList *list = NULL;
 	xmlnode *cand;
 	static int name = 0;
-	char n[4];	
-		
+	char n[4];
+
 	for (cand = xmlnode_get_child(sess, "candidate"); cand; cand = xmlnode_get_next_twin(cand)) {
 		PurpleMediaCandidate *info;
 		const gchar *type = xmlnode_get_attrib(cand, "type");
@@ -1139,7 +1139,7 @@
 }
 
 static void
-jabber_google_stun_lookup_cb(GSList *hosts, gpointer data, 
+jabber_google_stun_lookup_cb(GSList *hosts, gpointer data,
 	const char *error_message)
 {
 	JabberStream *js = (JabberStream *) data;
@@ -1152,16 +1152,16 @@
 	}
 
 	if (hosts && g_slist_next(hosts)) {
-		struct sockaddr *addr = g_slist_next(hosts)->data; 
+		struct sockaddr *addr = g_slist_next(hosts)->data;
 		char dst[INET6_ADDRSTRLEN];
 		int port;
 
 		if (addr->sa_family == AF_INET6) {
-			inet_ntop(addr->sa_family, &((struct sockaddr_in6 *) addr)->sin6_addr, 
+			inet_ntop(addr->sa_family, &((struct sockaddr_in6 *) addr)->sin6_addr,
 				dst, sizeof(dst));
 			port = ntohs(((struct sockaddr_in6 *) addr)->sin6_port);
 		} else {
-			inet_ntop(addr->sa_family, &((struct sockaddr_in *) addr)->sin_addr, 
+			inet_ntop(addr->sa_family, &((struct sockaddr_in *) addr)->sin_addr,
 				dst, sizeof(dst));
 			port = ntohs(((struct sockaddr_in *) addr)->sin_port);
 		}
@@ -1226,12 +1226,12 @@
 
 			if (host && udp) {
 				int port = atoi(udp);
-				/* if there, would already be an ongoing query, 
+				/* if there, would already be an ongoing query,
 				 cancel it */
 				if (js->stun_query)
 					purple_dnsquery_destroy(js->stun_query);
 
-				js->stun_query = purple_dnsquery_a(host, port, 
+				js->stun_query = purple_dnsquery_a(host, port,
 					jabber_google_stun_lookup_cb, js);
 			}
 		}
@@ -1265,7 +1265,7 @@
 void
 jabber_google_send_jingle_info(JabberStream *js)
 {
-	JabberIq *jingle_info = 
+	JabberIq *jingle_info =
 		jabber_iq_new_query(js, JABBER_IQ_GET, GOOGLE_JINGLE_INFO_NAMESPACE);
 
 	jabber_iq_set_callback(jingle_info, jabber_google_jingle_info_cb,
--- a/libpurple/protocols/jabber/jabber.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Fri May 22 03:54:29 2009 +0000
@@ -595,7 +595,7 @@
 	jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING_ENCRYPTION);
 }
 
-static void 
+static void
 txt_resolved_cb(GSList *responses, gpointer data)
 {
 	JabberStream *js = data;
@@ -608,7 +608,7 @@
 		purple_connection_error_reason (js->gc,
 				PURPLE_CONNECTION_ERROR_NETWORK_ERROR, tmp);
 		g_free(tmp);
-		return;	
+		return;
 	}
 
 	while (responses) {
@@ -1577,7 +1577,7 @@
 		purple_dnsquery_destroy(js->stun_query);
 		js->stun_query = NULL;
 	}
-		
+
 	g_free(js);
 
 	gc->proto_data = NULL;
@@ -1798,14 +1798,14 @@
 	/* both required according to XEP-0030 */
 	g_return_if_fail(category != NULL);
 	g_return_if_fail(type != NULL);
-	
+
 	for(identity = jabber_identities; identity; identity = identity->next) {
 		JabberIdentity *ident = (JabberIdentity*)identity->data;
 		if (!strcmp(ident->category, category) &&
 		    !strcmp(ident->type, type) &&
 		    ((!ident->lang && !lang) || (ident->lang && lang && !strcmp(ident->lang, lang)))) {
 			return;
-		}	
+		}
 	}
 
 	ident = g_new0(JabberIdentity, 1);
@@ -1897,7 +1897,7 @@
 }
 
 static void
-jabber_tooltip_add_resource_text(JabberBuddyResource *jbr, 
+jabber_tooltip_add_resource_text(JabberBuddyResource *jbr,
 	PurpleNotifyUserInfo *user_info, gboolean multiple_resources)
 {
 	char *text = NULL;
@@ -1930,13 +1930,13 @@
 	g_free(label);
 	g_free(value);
 	g_free(text);
-	
+
 	/* if the resource is idle, show that */
 	/* only show it if there is more than one resource available for
 	the buddy, since the "general" idleness will be shown anyway,
 	this way we can see see the idleness of lower-priority resources */
 	if (jbr->idle && multiple_resources) {
-		gchar *idle_str = 
+		gchar *idle_str =
 			purple_str_seconds_to_string(time(NULL) - jbr->idle);
 		label = g_strdup_printf("%s%s", _("Idle"), (res ? res : ""));
 		purple_notify_user_info_add_pair(user_info, label, idle_str);
@@ -1969,13 +1969,13 @@
 		const char *sub;
 		GList *l;
 		const char *mood;
-		gboolean multiple_resources = 
+		gboolean multiple_resources =
 			jb->resources && g_list_next(jb->resources);
 		JabberBuddyResource *top_jbr = jabber_buddy_find_resource(jb, NULL);
 
 		/* resource-specific info for the top resource */
 		if (top_jbr) {
-			jabber_tooltip_add_resource_text(top_jbr, user_info, 
+			jabber_tooltip_add_resource_text(top_jbr, user_info,
 				multiple_resources);
 		}
 
@@ -1987,7 +1987,7 @@
 					multiple_resources);
 			}
 		}
-		
+
 		if (full) {
 			PurpleStatus *status;
 
@@ -2892,7 +2892,7 @@
 	PurpleAccount *account;
 	gchar *who;
 	PurpleMediaSessionType type;
-	
+
 } JabberMediaRequest;
 
 static void
@@ -2921,7 +2921,7 @@
 #endif
 
 gboolean
-jabber_initiate_media(PurpleAccount *account, const char *who, 
+jabber_initiate_media(PurpleAccount *account, const char *who,
 		      PurpleMediaSessionType type)
 {
 #ifdef USE_VV
@@ -3305,7 +3305,7 @@
 		return FALSE;
 	js = gc->proto_data;
 
-	if (!(resource = jabber_get_resource(jid)) || 
+	if (!(resource = jabber_get_resource(jid)) ||
 	    !(jb = jabber_buddy_find(js, jid, FALSE)) ||
 	    !(jbr = jabber_buddy_find_resource(jb, resource))) {
 		g_free(resource);
--- a/libpurple/protocols/jabber/jabber.h	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Fri May 22 03:54:29 2009 +0000
@@ -245,7 +245,7 @@
 
 	/* A purple timeout tag for the keepalive */
 	int keepalive_timeout;
-	
+
 	PurpleSrvResponse *srv_rec;
 	guint srv_rec_idx;
 	guint max_srv_rec_idx;
@@ -322,7 +322,7 @@
 void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */
 void jabber_remove_feature(const gchar *namespace);
 
-/** Adds an identitiy to this jabber library instance. For list of valid values vistit the 
+/** Adds an identitiy to this jabber library instance. For list of valid values vistit the
  *	webiste of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ).
  *  @param category the category of the identity.
  *  @param type the type of the identity.
--- a/libpurple/protocols/jabber/message.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/message.c	Fri May 22 03:54:29 2009 +0000
@@ -639,7 +639,7 @@
 					purple_debug_info("jabber", "found %d smileys\n",
 						g_list_length(smiley_refs));
 
-					if (smiley_refs) {		
+					if (smiley_refs) {
 						if (jm->type == JABBER_MESSAGE_GROUPCHAT) {
 							JabberID *jid = jabber_id_new(jm->from);
 							JabberChat *chat = NULL;
@@ -657,7 +657,7 @@
 									who, account);
 							if (!conv) {
 								/* we need to create the conversation here */
-								conv = 
+								conv =
 									purple_conversation_new(PURPLE_CONV_TYPE_IM,
 									account, who);
 							}
@@ -949,7 +949,7 @@
 				/* do not attempt to send custom smileys in a MUC with more than
 				 10 people, to avoid getting too many BoB requests */
 				return jabber_chat_get_num_participants(chat) <= 10 &&
-					jabber_chat_all_participants_have_capability(chat, 
+					jabber_chat_all_participants_have_capability(chat,
 						XEP_0231_NAMESPACE);
 			} else {
 				return FALSE;
--- a/libpurple/protocols/jabber/presence.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/presence.c	Fri May 22 03:54:29 2009 +0000
@@ -100,7 +100,7 @@
 
 	if (!purple_account_is_connected(account))
 		return;
-	
+
 	if (!purple_status_is_active(status))
 		return;
 
@@ -277,7 +277,7 @@
 		xmlnode *query = xmlnode_new_child(presence, "query");
 		gchar seconds[10];
 		g_snprintf(seconds, 10, "%d", (int) (time(NULL) - js->idle));
-		
+
 		xmlnode_set_namespace(query, "jabber:iq:last");
 		xmlnode_set_attrib(query, "seconds", seconds);
 	}
@@ -626,7 +626,7 @@
 					avatar_hash = xmlnode_get_data(photo);
 				}
 			}
-		} else if (!strcmp(y->name, "query") && 
+		} else if (!strcmp(y->name, "query") &&
 			!strcmp(xmlnode_get_namespace(y), "jabber:iq:last")) {
 			/* resource has specified idle */
 			const gchar *seconds = xmlnode_get_attrib(y, "seconds");
@@ -644,7 +644,7 @@
 			NULL);
 		purple_debug_info("jabber", "got delay %s yielding %ld s offset\n",
 			stamp, offset);
-		idle += offset; 
+		idle += offset;
 	}
 
 	if(jid->node && (chat = jabber_chat_find(js, jid->node, jid->domain))) {
--- a/libpurple/protocols/jabber/si.c	Fri May 22 03:48:19 2009 +0000
+++ b/libpurple/protocols/jabber/si.c	Fri May 22 03:54:29 2009 +0000
@@ -1697,8 +1697,8 @@
 void
 jabber_si_init(void)
 {
-	jabber_iq_register_handler("si", "http://jabber.org/protocol/si", jabber_si_parse);	
-	
+	jabber_iq_register_handler("si", "http://jabber.org/protocol/si", jabber_si_parse);
+
 	jabber_ibb_register_open_handler(jabber_si_xfer_ibb_open_cb);
 }