dbus: Add Terminated error
PATCH v4 1/2 dbus: Add Terminated error
--- src/dbus.c | 8 ++++++++ src/ofono.h | 1 + 2 files changed, 9 insertions(+)
src/dbus.c +8 -0
@@ -409,6 +409,14 @@ DBusMessage *__ofono_error_not_recognized(DBusMessage *msg) "String not recognized as USSD/SS"); } +DBusMessage *__ofono_error_terminated_by_network (DBusMessage *msg) +{ +return g_dbus_create_error (msg,OFONO_ERROR_INTERFACE +".Terminated" , +"Operation is terminated by the" +" network" ); +} +DBusMessage *__ofono_error_from_error (const struct ofono_error *error,DBusMessage *msg) {
src/ofono.h +1 -0
@@ -66,6 +66,7 @@ DBusMessage *__ofono_error_emergency_active(DBusMessage *msg);DBusMessage *__ofono_error_incorrect_password (DBusMessage *msg);DBusMessage *__ofono_error_not_allowed (DBusMessage *msg);DBusMessage *__ofono_error_not_recognized (DBusMessage *msg); +DBusMessage *__ofono_error_terminated_by_network (DBusMessage *msg);DBusMessage *__ofono_error_from_error (const struct ofono_error *error,DBusMessage *msg);
Signature · 1 line
1.7.9.5
PATCH v4 2/2 ussd: Recover idle state after a transaction error
The "USSD terminated by network" notification is handled to recover the idle state in case of USSD transaction error.
--- src/ussd.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
src/ussd.c +10 -0
@@ -414,6 +414,16 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,return ; } +if (status ==OFONO_USSD_STATUS_TERMINATED ) { +ussd_change_state (ussd,USSD_STATE_IDLE ); + +if (ussd->pending ==NULL ) +return ; + + reply =__ofono_error_terminated_by_network (ussd->pending); + goto out; + } +if (status ==OFONO_USSD_STATUS_NOT_SUPPORTED ) {ussd_change_state (ussd,USSD_STATE_IDLE );
Signature · 1 line
1.7.9.5
Re: [PATCH v4 2/2] ussd: Recover idle state after a transaction error
Hi Philippe,
Quoted 6 lines · Philippe Nunes
The "USSD terminated by network" notification is handled to recover the idle state in case of USSD transaction error.
--- src/ussd.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
Patch has been applied, thanks.
Regards,
-Denis
Hi Philippe,
Quoted 5 lines · Philippe Nunes
--- src/dbus.c | 8 ++++++++ src/ofono.h | 1 + 2 files changed, 9 insertions(+)
The patch has been applied with a few changes:
src/dbus.c DBusMessage *__ofono_error_not_recognized(DBusMessage *msg) · line 412
Quoted 9 lines
src/dbus.c +1
-0@@ -409,6 +409,14 @@ DBusMessage *__ofono_error_not_recognized(DBusMessage *msg) "String not recognized as USSD/SS"); } +DBusMessage *__ofono_error_terminated_by_network (DBusMessage *msg)
I amended the patch to read '__ofono_error_network_terminated'
src/dbus.c DBusMessage *__ofono_error_not_recognized(DBusMessage *msg) · line 416
Quoted 4 lines
src/dbus.c +4
-0+{ +return g_dbus_create_error (msg,OFONO_ERROR_INTERFACE +".Terminated" , + "Operation is terminated by the"
and changed "is" to "was"
Quoted 11 lines
src/dbus.c +3
-0+ " network"); +} +DBusMessage *__ofono_error_from_error (const struct ofono_error *error,DBusMessage *msg) {src/ofono.h +0
-0
src/ofono.h DBusMessage *__ofono_error_emergency_active(DBusMessage *msg); · line 72
Quoted 7 lines
src/ofono.h +1
-0@@ -66,6 +66,7 @@ DBusMessage *__ofono_error_emergency_active(DBusMessage *msg);DBusMessage *__ofono_error_incorrect_password (DBusMessage *msg);DBusMessage *__ofono_error_not_allowed (DBusMessage *msg);DBusMessage *__ofono_error_not_recognized (DBusMessage *msg); +DBusMessage *__ofono_error_terminated_by_network (DBusMessage *msg);DBusMessage *__ofono_error_from_error (const struct ofono_error *error,DBusMessage *msg);
Regards,
-Denis