Hi JH,
On 1/24/20 6:49 PM, JH wrote:
Hi,
I am running ofono for SARA-R4 Modem, systemd show many following
messages, does it need be concerned?
Interface org.ofono.AllowedAccessPoints not found on the interface_list
This error message should be benign. See if the attached patch quiets
this down for you.
Regards,
-Denis
>From 8e78d4dba5d54b4b1175a53973ceb6f829c22bfa Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denk...@gmail.com>
Date: Fri, 7 Feb 2020 11:06:32 -0600
Subject: [PATCH] allowed-apns: Do not try to unregister unnecessarily
allowed-apns plugin will try to uregister the AllowedAccessPoints
interface whenever the sim state changes, even when not registered.
This results in the (benign) error being printed inside
ofono_modem_remove_interface:
Interface org.ofono.AllowedAccessPoints not found on the interface_list
---
plugins/allowed-apns.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/plugins/allowed-apns.c b/plugins/allowed-apns.c
index b222b91c..199202b5 100644
--- a/plugins/allowed-apns.c
+++ b/plugins/allowed-apns.c
@@ -52,6 +52,7 @@ struct allowed_apns_ctx {
struct ofono_sim_context *sim_context;
DBusMessage *pending;
DBusMessage *reply;
+ bool registered;
};
static void context_destroy(gpointer data)
@@ -162,6 +163,9 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *data)
DBusConnection *conn = ofono_dbus_get_connection();
if (new_state != OFONO_SIM_STATE_READY) {
+ if (!ctx->registered)
+ return;
+
g_dbus_unregister_interface(conn,
ofono_modem_get_path(ctx->modem),
ALLOWED_ACCESS_POINTS_INTERFACE);
@@ -169,6 +173,7 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *data)
ofono_modem_remove_interface(ctx->modem,
ALLOWED_ACCESS_POINTS_INTERFACE);
+ ctx->registered = false;
return;
}
@@ -183,6 +188,7 @@ static void sim_state_watch(enum ofono_sim_state new_state, void *data)
return;
}
+ ctx->registered = true;
ofono_modem_add_interface(ctx->modem,
ALLOWED_ACCESS_POINTS_INTERFACE);
}
--
2.21.0
_______________________________________________
ofono mailing list -- ofono@ofono.org
To unsubscribe send an email to ofono-le...@ofono.org