[PATCH] core: enable unsolicited messages on secondary

Nick Stevens Nick.Stevens at digi.com
Wed Sep 9 11:09:20 PDT 2015


On Wed, Sep 09, 2015 at 09:43:11AM +0200, Aleksander Morgado wrote:
> On Tue, Sep 8, 2015 at 10:37 PM, Stevens, Nick <Nick.Stevens at digi.com> wrote:
> > Previously the enable unsolicited messages command (+CNMI) was only
> > being sent on the primary. This patch adds support for sending the
> > enable on the secondary as well. If the secondary doesn't exist, or if
> > setting the enable causes an error, a warning is logged but no error is
> > propogated up.
> >
> > This change is needed for proper SMS operation on the Telit HE910, which
> > requires that +CNMI be sent to both primary and secondary. Since a
> > failure to send the +CNMI command on the secondary is a non-fatal error,
> > it is unlikely that this will cause issues with other modems.
> >
> > Signed-off-by: Nick Stevens <Nick.Stevens at digi.com>
> 
> Not sure I fully like the approach taken with how the callback is
> stored in the context; the better way would be to use a
> GSimpleAsyncResult to wrap all the steps in the same async operation.
> The GSimpleAsyncResult will also take a reference to the 'self'
> object, and that means that it will make sure the object stays valid
> for as long as the async operation is running.

(snip)

Thanks Aleksander. I admit to being new to the glib asynchronous model. I'll
make the changes you've suggested and resubmit.

Nick


More information about the ModemManager-devel mailing list