{"push_id":1218040359,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"4e70a84a8a792cfeae96bf7a0cb4c9b549e44d29","before":"8708b7b01cf4f36524bff3dc9aa5a7a6534ce221","commits":[{"sha":"4e70a84a8a792cfeae96bf7a0cb4c9b549e44d29","author":{"name":"Alex Clayton","email":"c14c9fd42e7abee7ed0c79783e42762f8b72e800@isode.com"},"message":"Stop HostAddress constructor running DNS lookup.\n\nWhen running the latest stroke against harrier android a NetworkOnMainThread exception\nwas encountered.  This was traced to the new constructor HostAddress(String) that was\nbeen called by Connector.start() method.\n\nThe issue was dues to difference between the java code in stroke and\nthe c++ code in swiften.\n\nIn swiften the equivalent conde calls boost::asio::ip::address::from_string, which\nparses a string that may be an ipv4 or ipv6 address into an IP address object.  If\nthe string is not one of these then the object is left invalid.\n\nIn the java code InetAddress.getByName(String name) is used instead.  If this\nis an ipv4 or ipv6 address then it parses it into an InetAddress object.  However if\nis not one of these it does a DNS lookup on the address.  This was what was causing\nthe error.\n\nTo match the C++ the java code should only create an InetAddress if the input is\nan IP address, if not it should be left null.\n\nThis was done by copying the IPv4 and IPv6 regexes in the Regex class in isode lib.\nThe input to HostAddress(String) is checked against these if it matches InetAddress.getByName\nis called, otherwise address is set to null.\n\nTest-information:\n\nRan unit tests in stroke they all pass.\n\nRan code against android harrier, no longer fails.\n\nRan against MLC (with updates for other changes in stroke api) it still passes.\n\nChange-Id: I1945c7c3cdfece8feb45b9196483131c0d9c4e7c","distinct":true,"url":"https://api.github.com/repos/swift/stroke/commits/4e70a84a8a792cfeae96bf7a0cb4c9b549e44d29"}]}
{"actor":{"display_login":"Kev"}}