[Fso] fsogsmd: mediator inheritance

Lukas Maerdian luk at slyon.de
Wed May 28 23:59:16 CEST 2014


On 28.05.2014 18:29 UTC+0200, Sebastian Krzyszkowiak wrote:
> I'm digging into the fsogsmd code and I'm generally progressing well
> on my own, but there's one obstacle I found that's hard for me to
> overcome.
> 
> I'm playing with a modem (Cinterion PHS-8) that doesn't allow +CREG
> command to be used before setting +CFUN to 1. This causes fsogsmd to
> fail at setting +CREG=2 (or +CREG=1) whe
> 
> I wanted to workaround that by overriding DeviceSetFunctionality
> mediator by modem plugin with code that first calls original mediator
> and then issues +CREG=2.

Hmm... are you overriding "DeviceSetFunctionality" or
"AtDeviceSetFunctionality"? Because the one without "At" is only an
abstract class, which does nothing.

Also you need to register the custom mediators in "plugin.vala" (cf.
src/plugins/modem_option_gtm601/plugin.vala).

> However, when I want to call original mediator (using base.run(level,
> autoregister, pin); ), fsogsmd simply quits. There's no error message,
> nothing in logs after "mediator DeviceSetFunctionality created",
> nothing at stdout/stderr - it's just gone.
> 
> It seems like I'm simply doing something wrong with this "base"
> functionality of Vala (especially when my only experience with this
> language comes from Cornucopia and was limited to few simple patches).
> I suspect that this method being an async one might be the root of
> this problem. Unfortunately, adding "yield" before it doesn't change
> anything :P
> 
> Could you please point me at something helpful? Or maybe it should be
> done in some entirely different way?

HTH,
  Lukas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/fso/attachments/20140528/98c3f609/attachment.asc>


More information about the Fso mailing list