Compare commits

...

7 Commits

Author SHA1 Message Date
Slava Monich
8e35a047da Merge branch 'omp-jb53535' into 'master'
Get rid of unwanted retries on manual network connection

See merge request mer-core/ofono!278
2021-03-12 15:57:59 +00:00
Bogdan Migunov
2b4b5a224d [ril] Get rid of unwanted retries on manual network connection. Fixes JB#53535
There is an issue when network operators return "allowed" flag no matter
which SIM card you are using currently. In that case, when user tries to
manually connect to such networks, it takes too long to have 2 (by
default) retries until device will get back to its home network.
So the solution is not to set additional retries to the
RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL request, as it has been done
in RILJ.
2021-03-12 18:10:50 +03:00
Slava Monich
50a5f2547e Merge branch 'hfp' into 'master'
Register HandsfreeAudioManager straight away at startup

See merge request mer-core/ofono!277
2020-11-19 22:36:22 +00:00
Slava Monich
d682fcd5fe [ofono] Request D-Bus name after initializing all plugins. JB#52107
To ensure that all D-Bus objects which should be available straight
after startup are there when the first incoming D-Bus call arrives.
2020-11-19 20:18:23 +02:00
Slava Monich
5799320480 [ril] Took out erroneous assert 2020-11-19 20:09:35 +02:00
Slava Monich
3eea7c868e [hfp_hf_bluez5] Removed __ofono_handsfree_audio_manager_ calls
Those functions are called by ofono_handsfree_audio_ref/unref which
ensure that initialization is only done once.
2020-11-19 19:20:50 +02:00
Slava Monich
4844fc6cf9 [hfp_ag_bluez5] Register HandsfreeAudioManager straight away at startup. JB#52107
Otherwise it's not clear how the client is supposed to wait for
org.ofono.HandsfreeAudioManager to appear and how to figure out
whether it's ever going to appear.
2020-11-19 17:06:05 +02:00
5 changed files with 11 additions and 12 deletions

View File

@@ -436,7 +436,6 @@ static void ril_netreg_register_manual(struct ofono_netreg *netreg,
ofono_info("nw select manual: %s%s%s", mcc, mnc, suffix);
grilio_request_append_format(req, "%s%s%s", mcc, mnc, suffix);
grilio_request_set_timeout(req, nd->network_selection_timeout);
grilio_request_set_retry(req, 0, REGISTRATION_MAX_RETRIES);
grilio_queue_send_request_full(nd->q, req,
RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL,
ril_netreg_register_cb, ril_netreg_cbd_free,

View File

@@ -2369,7 +2369,6 @@ static int ril_plugin_init(void)
static void ril_plugin_exit(void)
{
DBG("");
GASSERT(ril_driver);
ofono_ril_transport_unregister(&ril_socket_transport);
ofono_modem_driver_unregister(&ril_modem_driver);

View File

@@ -495,8 +495,6 @@ static void hfp_ag_enable(DBusConnection *conn)
connection_hash = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, connection_destroy);
ofono_handsfree_audio_ref();
hfp_ag_enabled = TRUE;
}
@@ -525,7 +523,6 @@ static void hfp_ag_disable(DBusConnection *conn)
g_dbus_unregister_interface(conn, HFP_AG_EXT_PROFILE_PATH,
BLUEZ_PROFILE_INTERFACE);
ofono_handsfree_card_driver_unregister(&hfp_ag_driver);
ofono_handsfree_audio_unref();
}
hfp_ag_enabled = FALSE;
@@ -552,6 +549,7 @@ static int hfp_ag_init(void)
bluez_disconnect_cb,
NULL, NULL);
ofono_handsfree_audio_ref();
return 0;
}
@@ -565,6 +563,7 @@ static void hfp_ag_exit(void)
}
hfp_ag_disable(conn);
ofono_handsfree_audio_unref();
}
OFONO_PLUGIN_DEFINE(hfp_ag_bluez5, "Hands-Free Audio Gateway Profile Plugins",

View File

@@ -49,7 +49,6 @@
#include <ofono/handsfree.h>
#include <ofono/handsfree-audio.h>
#include <ofono/siri.h>
#include <ofono.h>
#include <drivers/atmodem/atutil.h>
#include <drivers/hfpmodem/slc.h>
@@ -833,8 +832,6 @@ static int hfp_init(void)
if (DBUS_TYPE_UNIX_FD < 0)
return -EBADF;
__ofono_handsfree_audio_manager_init();
/* Registers External Profile handler */
if (!g_dbus_register_interface(conn, HFP_EXT_PROFILE_PATH,
BLUEZ_PROFILE_INTERFACE,
@@ -890,8 +887,6 @@ static void hfp_exit(void)
g_dbus_client_unref(bluez);
ofono_handsfree_audio_unref();
__ofono_handsfree_audio_manager_cleanup();
}
OFONO_PLUGIN_DEFINE(hfp_bluez5, "External Hands-Free Profile Plugin", VERSION,

View File

@@ -3,6 +3,8 @@
* oFono - Open Source Telephony
*
* Copyright (C) 2008-2011 Intel Corporation. All rights reserved.
* Copyright (C) 2015-2020 Jolla Ltd.
* Copyright (C) 2019-2020 Open Mobile Platform LLC.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -281,7 +283,7 @@ int main(int argc, char **argv)
dbus_error_init(&error);
conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, OFONO_SERVICE, &error);
conn = g_dbus_setup_bus(DBUS_BUS_SYSTEM, NULL, &error);
if (conn == NULL) {
if (dbus_error_is_set(&error) == TRUE) {
ofono_error("Unable to hop onto D-Bus: %s",
@@ -308,7 +310,12 @@ int main(int argc, char **argv)
g_free(option_plugin);
g_free(option_noplugin);
g_main_loop_run(event_loop);
if (g_dbus_request_name(conn, OFONO_SERVICE, &error)) {
g_main_loop_run(event_loop);
} else {
ofono_error("Unable to register D-Bus name: %s", error.message);
dbus_error_free(&error);
}
__ofono_plugin_cleanup();