pri_set_apn is called by ofono_gprs_cid_activated() which is not a DBus
method; as such, there is no DBus return message. Attempting to create
the return message with a NULL 'msg' may cause the DBus library to
call abort().
---
src/gprs.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gprs.c b/src/gprs.c
index c5e7709..ed2131e 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1030,8 +1030,12 @@ static DBusMessage *pri_set_apn(struct pri_context *ctx,
DBusConnection *conn,
if (strlen(apn) > OFONO_GPRS_MAX_APN_LENGTH)
return __ofono_error_invalid_format(msg);
- if (g_str_equal(apn, ctx->context.apn))
- return dbus_message_new_method_return(msg);
+ if (g_str_equal(apn, ctx->context.apn)) {
+ if (msg)
+ return dbus_message_new_method_return(msg);
+ else
+ return NULL;
+ }
if (is_valid_apn(apn) == FALSE)
return __ofono_error_invalid_format(msg);
--
2.9.3
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono