[PATCH] broadband-modem: fix hdr_subsys_state_info_ready

Ben Chan benchan at chromium.org
Thu Mar 6 00:01:16 PST 2014


btw, I had a typo in my commit message: fucntion -> function


On Wed, Mar 5, 2014 at 7:30 PM, Ben Chan <benchan at chromium.org> wrote:

> hdr_subsys_state_info_ready() did not implement the GAsyncReadyCallback
> fucntion signature, which led to a crash. This patch fixes
> hdr_subsys_state_info_ready() to properly extract the QCDM response from
> the GAsyncResult object.
> ---
>  src/mm-broadband-modem.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
> index b17be26..a987f85 100644
> --- a/src/mm-broadband-modem.c
> +++ b/src/mm-broadband-modem.c
> @@ -6324,14 +6324,16 @@ modem_cdma_get_hdr_state_finish (MMIfaceModemCdma
> *self,
>
>  static void
>  hdr_subsys_state_info_ready (MMPortSerialQcdm *port,
> -                             GByteArray *response,
> -                             GError *error,
> +                             GAsyncResult *res,
>                               HdrStateContext *ctx)
>  {
>      QcdmResult *result;
>      HdrStateResults *results;
>      gint err = QCDM_SUCCESS;
> +    GError *error = NULL;
> +    GByteArray *response;
>
> +    response = mm_port_serial_qcdm_command_finish (port, res, &error);
>      if (error) {
>          g_simple_async_result_set_from_error (ctx->result, error);
>          hdr_state_context_complete_and_free (ctx);
> --
> 1.9.0.279.gdc9e3eb
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20140306/a57993c3/attachment.html>


More information about the ModemManager-devel mailing list