You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.
When porting mkall-ios to MK v0.10.5, I needed to write this code:
MKUTIL_WRAP_GET_POINTER(MKGeoIPLookupResults, perform,
[](auto settings) noexcept {
auto results = new mk::geoip::LookupResults{mk::geoip::lookup(*settings)};
if (!results->good) {
// Implementation note: the logic used by mk::geoip::lookup to determine// success checks the values of the probe_ip, probe_asn, etc fields. This// means we cannot initialize the results to the values we want to have// back on failure ("ZZ", "AS0", etc). We should instead check whether we// are good and set them afterwards. This glue code can probably go, if// we include this logic into the next release of mkgeoip.//// This code has been adapted from MK v0.10.4's geoiplookup.c. We should// actually fix geoiplookup to avoid duplicating code.if (results->probe_asn_string.empty()) {
results->probe_asn_string = "AS0";
}
if (results->probe_cc.empty()) {
results->probe_cc = "ZZ";
}
}
return results;
})
To avoid duplicating code between mkall-ios and android-libs, it would actually be much better if we could put this logic into this repository instead.
The text was updated successfully, but these errors were encountered:
When porting mkall-ios to MK v0.10.5, I needed to write this code:
To avoid duplicating code between mkall-ios and android-libs, it would actually be much better if we could put this logic into this repository instead.
The text was updated successfully, but these errors were encountered: