Hi Andreas,
2011/2/15 Andreas Westin <andreas.westin(a)stericsson.com>:
if (legacy)
msg[3 + count] = mux->resource;
- else
+ else {
/* Resource field is 32bit and Little-endian */
msg[4 + count * 4 + 3] = mux->resource;
+ }
Curly brackets are either in both if and else, or in neither. I
actually prefer not to have them here, since the first line is just a
comment in the else statement. ;)
count++;
}
+ commgr.spn_dev = legacy ? modem->device : PN_DEV_MODEM;
len = legacy ? 3 + count : 4 + count * 4;
msg[2] = count;
This is not necessary, as a modem plugin is supposed to call
g_isi_modem_set_device() to set the modem->device to whatever it needs
to right after creating the GIsiModem instance.
In other words, the assumption is that when the GIsiModem instace is
actually used, all necessary internal data, such as flags and the
remote device have already been set.
Cheers,
Aki