Re: ModemManager: Fix GetInfo() dbus calls while port connected
- From: Dan Williams <dcbw redhat com>
- To: Aleksander Morgado <aleksander lanedo com>
- Cc: "Network Manager \(Devel\)" <networkmanager-list gnome org>
- Subject: Re: ModemManager: Fix GetInfo() dbus calls while port connected
- Date: Wed, 06 Apr 2011 16:59:08 -0500
On Wed, 2011-04-06 at 17:20 +0200, Aleksander Morgado wrote:
> Hi all,
>
> Currently, if you GetInfo() via dbus while the port in the modem is
> connected, ModemManager spits a g_return_if_fail() warning:
>
> modem-manager[21377]: mm_modem_base_get_card_info: assertion
> `port != NULL' failed
Pushed, thanks!
> When the port is connected and there is no secondary port to use,
> get_best_at_port() will return NULL and set the GError to
> MM_MODEM_ERROR_CONNECTED. But, the card info will probably already be
> cached by the base modem, so there won't be any need to send any command
> to the modem.
>
> The following patch allows NULL ports passed to
> mm_modem_base_get_card_info() only if port_error is given; so that:
> - If there are cached results the error is ignored and cached results
> are returned, or
> - If there are no cached results, the port_error is returned.
>
> Cheers,
>
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]