1
Vote

Crash in BangoStatic::isWifiConnection()

description

bool BangoStatic::IsWiFiConnection()
{
    bool isWifi = false;

    QNetworkAccessManager * qnam = StaticNetworkAccessManager();
    QNetworkConfiguration activeConfig = qnam->activeConfiguration();

    switch(activeConfig.bearerType())
    {
    case QNetworkConfiguration::BearerEthernet:
    case QNetworkConfiguration::BearerWiMAX:
    case QNetworkConfiguration::BearerWLAN:
    case QNetworkConfiguration::BearerBluetooth:
            isWifi = BangoStatic::IsWiFiConnection();
        break;
    default:
        isWifi = false;
        break;
    }
    return isWifi;
}
The bearerType() doesn't magically change between calls. There is infinite recursion if it falls into any of those cases, and things blow up.

comments

nsentjens wrote Jun 14, 2013 at 10:50 PM

Locally, I've changed the offending line to:
case QNetworkConfiguration::BearerBluetooth:
    isWifi = true;

bangoyomi wrote Jun 17, 2013 at 11:38 AM

Code has been updated, and this will be fixed in v1.1. release