From bacf27291bd6a057669d74b3428dc3573bc8482c Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 7 Aug 2018 11:17:33 -0700 Subject: [PATCH] ofono: removed exit from parse_modem During development multiple ModemAdded callbacks were seen, which caused duplicate modems to be created. Since then this condition has never been seen again, so instead of exiting we will just print and return. This wont allow duplicate modems to be created anyways so its much better to do this than fataly exiting. --- plugins/ofono.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 75f5d1a0..8c019ce0 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -646,16 +646,10 @@ static void parse_modem(const char *path, struct l_dbus_message_iter *props) l_debug("modem found: %s", path); if (l_queue_find(modems, match_modem_by_path, path)) { - /* - * TODO: This can be removed once its found why sometimes two - * modem added callbacks happen. It is very infrequent but - * has been seen to happen. - */ + /* should never happen */ l_error("modem %s already found", path); -#ifdef HAVE_EXECINFO_H - __iwd_backtrace_print(2); -#endif - exit(1); + + return; } modem = l_new(struct ofono_modem, 1);