Hi Rémi,

2011/1/28 Rémi Denis-Courmont <remi.denis-courm...@nokia.com>:
> On Friday 28 January 2011 13:37:10 ext Jessica Nilsson, you wrote:
>> diff --git a/gisi/common.h b/gisi/common.h
>> index 83a8cf5..c78f893 100644
>> --- a/gisi/common.h
>> +++ b/gisi/common.h
>> @@ -26,6 +26,8 @@
>>  extern "C" {
>>  #endif
>>
>> +#define PN_HOST                                        0x00
>> +#define PN_MODEM                               0x60
>
> It looks like you are mixing up services (PN_* from 0 to 255), with device
> addresses (PN_DEV_* multiple of four from 0 to 252).
>
>>  #define PN_COMMGR                              0x10
>>  #define PN_NAMESERVICE                         0xDB
>>  #define PN_FIREWALL                            0x43
>> diff --git a/gisi/modem.c b/gisi/modem.c
>> index 8750367..7201235 100644
>> --- a/gisi/modem.c
>> +++ b/gisi/modem.c
>> @@ -61,6 +61,7 @@ struct _GIsiModem {
>>         unsigned index;
>>         GHashTable *services;
>>         gboolean subs_source;
>> +       GIsiVersion version;
>
> I can't see where this gets set?!
>
>>         int req_fd;
>>         int ind_fd;
>>         guint req_watch;
>> @@ -349,11 +345,34 @@ static gboolean modem_subs_update(gpointer data)
>>         gpointer keyptr, value;
>>
>>         GIsiModem *modem = data;
>> -       uint8_t msg[3 + 256] = {
>> -               0, PNS_SUBSCRIBED_RESOURCES_IND,
>> -               0,
>> -       };
>> +       GIsiMessage dmsg;
>> +       uint8_t msg[3 + 256] = { 0 };
>>         uint8_t count = 0;
>> +       int msg_size = 0;
>> +       struct sockaddr_pn commgr = {
>> +               .spn_family = AF_PHONET,
>> +               .spn_resource = PN_COMMGR,
>> +       };
>> +
>> +       if (g_isi_modem_version_major(modem) == 2 &&
>> +               g_isi_modem_version_minor(modem) == 5) {
>
> You really need to factor this check out. It's going to be a disaster when
> there are more than two versions otherwise.

This is problematic, since there is no version query by default for
the PN_COMMGR because creating the GIsiModem is not async. Also, even
the N900 modem supports both of these INDs, but the
PNS_SUBSCRIBED_RESOURCES_EXTEND_IND is blocked by a modem side
firewall.

So I think we need something different here, like flags that the
plugin can set to control which IND type gets used.

Cheers,
Aki
_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to