3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:49:37 +01:00

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.
This commit is contained in:
James Prestwood 2018-08-07 11:17:33 -07:00 committed by Denis Kenzior
parent ff197edfc4
commit bacf27291b

View File

@ -646,16 +646,10 @@ static void parse_modem(const char *path, struct l_dbus_message_iter *props)
l_debug("modem found: %s", path); l_debug("modem found: %s", path);
if (l_queue_find(modems, match_modem_by_path, path)) { if (l_queue_find(modems, match_modem_by_path, path)) {
/* /* should never happen */
* 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.
*/
l_error("modem %s already found", path); l_error("modem %s already found", path);
#ifdef HAVE_EXECINFO_H
__iwd_backtrace_print(2); return;
#endif
exit(1);
} }
modem = l_new(struct ofono_modem, 1); modem = l_new(struct ofono_modem, 1);