--- 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,