Re: [PATCH] ussd: Cancel pending requests when unregistering

2018-05-23 Thread Denis Kenzior

Hi Slava,

On 05/23/2018 08:48 AM, Slava Monich wrote:

And reset state to idle before unregistering the D-Bus interface.
This may occur e.g. when we receive REFRESH from STK.
---
  src/ussd.c | 16 
  1 file changed, 16 insertions(+)



Applied, thanks.

Regards,
-Denis

___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH 1/2] Adding the ofono_sim_initialized_notify function after ofono_sim_inserted_notify, as suggested by Denis Kenzior in this commit : 54d56d763e40bc44c99a9b24aa0477bd373ea085

2018-05-23 Thread Denis Kenzior

Hi Florent,

On 05/22/2018 08:08 AM, Florent Beillonnet wrote:

---
  plugins/gemalto.c | 2 ++
  1 file changed, 2 insertions(+)


You really shouldn't need to do this given that you have a URC inside 
gemalto_ciev_notify() that does exactly this already.


No, I think there's a tiny bug in the core introduced by the commit you 
reference above.  Try this change?


@@ -847,7 +847,7 @@ static void sim_enter_pin_cb(const struct 
ofono_error *error, void *data)


__ofono_dbus_pending_reply(>pending, reply);

-   if (sim->initialized)
+   if (sim->initialized || error->type != OFONO_ERROR_TYPE_NO_ERROR)
goto recheck;

if (sim->pin_type == OFONO_SIM_PASSWORD_SIM_PIN ||

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH 2/2] Rework at_pin_send_puk It seems that the function at_pin_send_puk should have been changed along with at_pin_send, because it's also refering to the at_pin_send_cb callback See this co

2018-05-23 Thread Denis Kenzior

Hi Florent,

On 05/22/2018 08:08 AM, Florent Beillonnet wrote:

---
  drivers/atmodem/sim.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)



I went ahead and applied this after fixing up the commit header & 
description.  Please see doc/coding-style.txt, item M5 in particular.


Thanks!

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH] udevng: remove vendor ID to make it generic for intel modem

2018-05-23 Thread Denis Kenzior

Hi Varun,

On 05/23/2018 12:29 AM, Varun Gargi wrote:

---
  plugins/udevng.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)



Applied, thanks.

Regards,
-Denis

___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


[PATCH] ussd: Cancel pending requests when unregistering

2018-05-23 Thread Slava Monich
And reset state to idle before unregistering the D-Bus interface.
This may occur e.g. when we receive REFRESH from STK.
---
 src/ussd.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/ussd.c b/src/ussd.c
index f5dd9d9..23b3323 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -810,6 +810,22 @@ static void ussd_unregister(struct ofono_atom *atom)
DBusConnection *conn = ofono_dbus_get_connection();
struct ofono_modem *modem = __ofono_atom_get_modem(atom);
const char *path = __ofono_atom_get_path(atom);
+   DBusMessage *reply;
+
+   if (ussd->pending) {
+   reply = __ofono_error_canceled(ussd->pending);
+   __ofono_dbus_pending_reply(>pending, reply);
+   }
+
+   if (ussd->cancel) {
+   reply = dbus_message_new_method_return(ussd->cancel);
+   __ofono_dbus_pending_reply(>cancel, reply);
+   }
+
+   if (ussd->req)
+   ussd_request_finish(ussd, -ECANCELED, 0, NULL, 0);
+
+   ussd_change_state(ussd, USSD_STATE_IDLE);
 
g_slist_free_full(ussd->ss_control_list, ssc_entry_destroy);
ussd->ss_control_list = NULL;
-- 
1.9.1

___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono