Hi Lei,

>>> diff --git a/plugins/phonesim.conf b/plugins/phonesim.conf
>>> index 74bb645..8cd9678 100644
>>> --- a/plugins/phonesim.conf
>>> +++ b/plugins/phonesim.conf
>>> @@ -12,3 +12,7 @@
>>>   #[phonesim]
>>>   #Address=127.0.0.1
>>>   #Port=12345
>>> +
>>> +#[cdmaphonesim]
>>> +#Address=127.0.0.1
>>> +#Port=12345
>>
>> If we have both phonesim and cdmaphonesim plugins active, we need to
>> make sure they don't interfere with each other.  Perhaps adding a
>> Type=cdma and having cdmaphonesim look for that Type tag and ignore the
>> rest would be a good idea?
>>
> 
> If both phonesim and cdmaphonesim active, they should have to be
> configured with running with different port, right? If so,they should
> not interfere with each other. And, making sure ports are different is
> the job of the end-user, right?

That is correct and not what I was referring to.

> 
> I am a bit lost about the Type attribute. cdmaphonesim is currently
> defined as a separate plugin and by the time cdmaphonesim's
> parse_config() is invoked, it already knows that it is cdma. Thus, I
> don't see why needing another flag indicating this. When you say ignore
> the rest, could you pls be more specific about what to ignore and what's
> the intention of doing that? Sorry, still learning... :-)
> 

So correct me if I'm wrong, but there's a race between cdmaphonesim and
phonesim plugins:

if phonesim starts first it reads phonesim.conf and creates both
phonesim and cdmaphonesim modems.  When cdmaphonesim starts, it tries to
create the modems again, but fails.  Similar situation vice-versa.

This is why I'm suggesting the Type attribute.  Maybe I'm blind and this
race does not happen?

Regards,
-Denis
_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to