Hi Dragos,

On 03/17/2016 12:02 PM, Dragos Tatulea wrote:
For automatic context activation there's no initial message to send a
reply to.
---
  src/gprs.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gprs.c b/src/gprs.c
index 9192e68..233ab1a 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -887,8 +887,10 @@ static void pri_activate_callback(const struct ofono_error 
*error, void *data)
        }

        ctx->active = TRUE;
-       __ofono_dbus_pending_reply(&ctx->pending,
-                               dbus_message_new_method_return(ctx->pending));
+
+       if (ctx->pending)
+               __ofono_dbus_pending_reply(&ctx->pending,
+                               bus_message_new_method_return(ctx->pending));

So this is a bit tricky. While this is strictly okay to do right now, since pending is only used for Activate/Deactivate, I'd prefer that we make a separate callback for the read_settings case. Even if it does mean a bit of code duplication.


        if (gc->settings->interface != NULL) {
                pri_ifupdown(gc->settings->interface, TRUE);


Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to