Hi Antara,

On 04/01/2019 06:47 AM, Antara Borwankar wrote:
Adding the handling of error when the driver returns
CME ERROR:4.

This error will be returned for non xmm vendor modems
using ifxmodem driver for sim.
---
  src/sim.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index 9f0183f..1943989 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -680,8 +680,13 @@ static void sim_set_slot_callback(const struct ofono_error 
*error, void *data)
sim->pending_active_card_slot = sim->active_card_slot; - reply = __ofono_error_failed(sim->pending);
-               __ofono_dbus_pending_reply(&sim->pending, reply);
+               if (error->type == OFONO_ERROR_TYPE_CME && error->error == 4) {
+                       reply = __ofono_error_not_implemented(sim->pending);
+                       __ofono_dbus_pending_reply(&sim->pending, reply);
+               } else {
+                       reply = __ofono_error_failed(sim->pending);
+                       __ofono_dbus_pending_reply(&sim->pending, reply);
+               }

Lets use __ofono_error_from_error here instead.

return;
        }


Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to