Hi Remi,
> drivers/atmodem/gprs.c | 33 +++++++++++++++++++++++++++++++++
> 1 files changed, 33 insertions(+), 0 deletions(-)
I did apply this patch, but I fixed it up later ...
> diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c
> index defb154..daa3933 100644
> --- a/drivers/atmodem/gprs.c
> +++ b/drivers/atmodem/gprs.c
> @@ -200,6 +200,37 @@ static void xdatastat_notify(GAtResult *result, gpointer
> user_data)
> }
> }
>
> +static void cpsb_notify(GAtResult *result, gpointer user_data)
> +{
> + struct ofono_gprs *gprs = user_data;
> + GAtResultIter iter;
> + gint bearer;
> +
> + g_at_result_iter_init(&iter, result);
> +
> + if (!g_at_result_iter_next(&iter, "+CPSB:"))
> + return;
> +
> + if (!g_at_result_iter_next_number(&iter, NULL))
> + return;
> +
> + if (!g_at_result_iter_next_number(&iter, &bearer))
> + return;
> +
> + ofono_gprs_bearer_notify(gprs, bearer);
> +}
> +
> +static void cpsb_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
> +{
> + struct ofono_gprs *gprs = user_data;
> + struct gprs_data *gd = ofono_gprs_get_data(gprs);
> +
> + if (!ok)
> + return;
> +
> + g_at_chat_register(gd->chat, "+CPSB:", cpsb_notify, FALSE, gprs, NULL);
> +}
... since we normally don't bother with this kind of conditional
registration for notifications. We just register them.
Regards
Marcel
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono