pidgin/pidgin

Merged in default (pull request #628)

17 months ago, Gary Kramlich
360997c25b1a
Merged in default (pull request #628)

Decrease Delay for XMPP File Transfers Using Streamhosts

Approved-by: Gary Kramlich
--- a/COPYRIGHT Tue Nov 05 21:07:41 2019 -0500
+++ b/COPYRIGHT Wed Nov 06 04:54:32 2019 +0000
@@ -387,6 +387,7 @@
Tim Mooney
Sergio Moretto
Nader Morshed
+Evert Mouw
Keith Moyer
Andrei Mozzhuhin
Christian Muise
--- a/libpurple/protocols/jabber/si.c Tue Nov 05 21:07:41 2019 -0500
+++ b/libpurple/protocols/jabber/si.c Wed Nov 06 04:54:32 2019 +0000
@@ -39,7 +39,7 @@
#include "iq.h"
#include "si.h"
-#define STREAMHOST_CONNECT_TIMEOUT 15
+#define STREAMHOST_CONNECT_TIMEOUT 5
#define ENABLE_FT_THUMBNAILS 0
struct _JabberSIXfer {
@@ -358,13 +358,17 @@
((host = purple_xmlnode_get_attrib(streamhost, "host")) &&
(port = purple_xmlnode_get_attrib(streamhost, "port")) &&
(portnum = atoi(port))))) {
- JabberBytestreamsStreamhost *sh = g_new0(JabberBytestreamsStreamhost, 1);
- sh->jid = g_strdup(jid);
- sh->host = g_strdup(host);
- sh->port = portnum;
- sh->zeroconf = g_strdup(zeroconf);
- /* If there were a lot of these, it'd be worthwhile to prepend and reverse. */
- jsx->streamhosts = g_list_append(jsx->streamhosts, sh);
+ /* ignore 0.0.0.0 */
+ if(purple_strequal(host, "0.0.0.0") == FALSE) {
+ JabberBytestreamsStreamhost *sh = g_new0(JabberBytestreamsStreamhost, 1);
+ sh->jid = g_strdup(jid);
+ sh->host = g_strdup(host);
+ sh->port = portnum;
+ sh->zeroconf = g_strdup(zeroconf);
+
+ /* If there were a lot of these, it'd be worthwhile to prepend and reverse. */
+ jsx->streamhosts = g_list_append(jsx->streamhosts, sh);
+ }
}
}