telepathy-gabble has a dependency on libsoup, which is used only for the special case of allocating Jingle proxies for Google Talk. For small platform installations where Jingle calls are not a major use case, this dependency becomes an outlier. The proposed patch makes Google relay support, along with the libsoup dependency, optional.
#ifdef ENABLE_GOOGLE_RELAY - tp_clear_object (&self->soup); +#endif Unrequired ifdef. self->soup == NULL. It would be nice to squash these commits. +static RelaySessionData * +relay_session_data_new (guint requests_to_do, + GabbleJingleFactoryRelaySessionCb callback, + gpointer user_data) +static void +translate_relay_info (GPtrArray *relays, + const gchar *relay_ip, + const gchar *username, + const gchar *password, + const gchar *static_type, + const gchar *port_string, + guint component) +static void +on_http_response (SoupSession *soup, + SoupMessage *msg, + gpointer user_data) +void +gabble_google_relay_resolver_resolve (GabbleGoogleRelayResolver *self, + guint components, + const gchar *server, + guint16 port, + const gchar *token, + GabbleJingleFactoryRelaySessionCb callback, + gpointer user_data) Not in Telepathy style. As mentioned, it would be nice to make this a GIO-style function, but I don't think that's a blocker.
(In reply to comment #1) > #ifdef ENABLE_GOOGLE_RELAY > - > tp_clear_object (&self->soup); > +#endif > > Unrequired ifdef. self->soup == NULL. soup is not declared in the no-relay case. I don't think shifting the delta to the structure declaration by defining a dummy GObject *soup member would improve the code much. > It would be nice to squash these commits. Done (please force-pull your local branches if any). > +static RelaySessionData * > +relay_session_data_new (guint requests_to_do, > + GabbleJingleFactoryRelaySessionCb callback, > + gpointer user_data) > > +static void > +translate_relay_info (GPtrArray *relays, > + const gchar *relay_ip, > + const gchar *username, > + const gchar *password, > + const gchar *static_type, > + const gchar *port_string, > + guint component) > > +static void > +on_http_response (SoupSession *soup, > + SoupMessage *msg, > + gpointer user_data) > > Not in Telepathy style. I copied most of these from older code :) OK, indented properly now.
(In reply to comment #2) > I don't think shifting the delta to the structure declaration by defining a > dummy GObject *soup member would improve the code much. In fact, it would, because an empty structure is not too good either. Fixed: http://cgit.freedesktop.org/~zabaluev/telepathy-gabble/commit/?h=soup-is-optional&id=28b64163e8bbca02de308612f6653ed291e2b1df
Merged to master: thanks! http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=6211097
I had to record another patch to disable tests in jingle/stun-server.py which use Google Relay. Again, offered here: http://cgit.freedesktop.org/~zabaluev/telepathy-gabble/log/?h=soup-is-optional
(In reply to comment #5) > I had to record another patch to disable tests in jingle/stun-server.py which > use Google Relay. > Again, offered here: > http://cgit.freedesktop.org/~zabaluev/telepathy-gabble/log/?h=soup-is-optional ++
Thanks, merged to master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.