radio-settings: Show all available technologies
authorAlfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
Fri, 12 Dec 2014 11:25:35 +0000 (12:25 +0100)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 12 Dec 2014 14:54:14 +0000 (08:54 -0600)
Not all possible futures technologies were being showed on the DBus
interface.

src/radio-settings.c

index 0a49305..1a511dc 100644 (file)
@@ -225,12 +225,12 @@ static DBusMessage *radio_get_properties_reply(DBusMessage *msg,
        }
 
        if (rs->available_rats) {
-               const char *rats[sizeof(uint32_t) + 1];
+               const char *rats[sizeof(uint32_t) * CHAR_BIT + 1];
                const char **dbus_rats = rats;
                int n = 0;
                unsigned int i;
 
-               for (i = 0; i < sizeof(uint32_t); i++) {
+               for (i = 0; i < sizeof(uint32_t) * CHAR_BIT; i++) {
                        int tech = 1 << i;
 
                        if (!(rs->available_rats & tech))