Check if ussd is busy when doing ss
PATCH 1/1 Check if ussd is busy when doing ss
It's still not clear how ss and ussd interfere with each other. Current decision is each ss (call-barring, call-forwarding, etc.) has interference with ussd, but there is no interference within these ss. That is, call-barring has interference with ussd, but call-barring has no interference with call-forwarding.
--- src/call-barring.c | 8 ++++---- src/call-forwarding.c | 6 +++--- src/call-settings.c | 4 ++-- src/ofono.h | 1 + src/ussd.c | 11 +++++++++++ 5 files changed, 21 insertions(+), 9 deletions(-)
src/call-barring.c +4 -4
@@ -669,7 +669,7 @@ static DBusMessage *cb_get_properties(DBusConnection *conn, DBusMessage *msg, {struct ofono_call_barring *cb = data; -if (cb->pending) +if (cb->pending ||__ofono_ussd_is_busy (cb->ussd))return __ofono_error_busy (msg);if (!cb->driver->query)
@@ -822,7 +822,7 @@ static DBusMessage *cb_set_property(DBusConnection *conn, DBusMessage *msg,int cls;int mode; -if (cb->pending) +if (cb->pending ||__ofono_ussd_is_busy (cb->ussd))return __ofono_error_busy (msg);if (!dbus_message_iter_init (msg, &iter))
@@ -894,7 +894,7 @@ static DBusMessage *cb_disable_all(DBusConnection *conn, DBusMessage *msg,if (!cb->driver->set)return __ofono_error_not_implemented (msg); -if (cb->pending) +if (cb->pending ||__ofono_ussd_is_busy (cb->ussd))return __ofono_error_busy (msg); if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &passwd,
@@ -941,7 +941,7 @@ static DBusMessage *cb_set_passwd(DBusConnection *conn, DBusMessage *msg,if (!cb->driver->set_passwd)return __ofono_error_not_implemented (msg); -if (cb->pending) +if (cb->pending ||__ofono_ussd_is_busy (cb->ussd))return __ofono_error_busy (msg); if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &old_passwd,
src/call-forwarding.c +3 -3
@@ -430,7 +430,7 @@ static DBusMessage *cf_get_properties(DBusConnection *conn, DBusMessage *msg,if (!cf->driver->query)return __ofono_error_not_implemented (msg); -if (cf->pending) +if (cf->pending ||__ofono_ussd_is_busy (cf->ussd))return __ofono_error_busy (msg); cf->pending =dbus_message_ref (msg);
@@ -586,7 +586,7 @@ static DBusMessage *cf_set_property(DBusConnection *conn, DBusMessage *msg,int cls;int type; -if (cf->pending) +if (cf->pending ||__ofono_ussd_is_busy (cf->ussd))return __ofono_error_busy (msg);if (!dbus_message_iter_init (msg, &iter))
@@ -704,7 +704,7 @@ static DBusMessage *cf_disable_all(DBusConnection *conn, DBusMessage *msg,if (!cf->driver->erasure)return __ofono_error_not_implemented (msg); -if (cf->pending) +if (cf->pending ||__ofono_ussd_is_busy (cf->ussd))return __ofono_error_busy (msg); if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &strtype,
src/call-settings.c +2 -2
@@ -950,7 +950,7 @@ static DBusMessage *cs_get_properties(DBusConnection *conn, DBusMessage *msg, {struct ofono_call_settings *cs = data; -if (cs->pending) +if (cs->pending ||__ofono_ussd_is_busy (cs->ussd))return __ofono_error_busy (msg);if (cs->flags &CALL_SETTINGS_FLAG_CACHED )
@@ -1127,7 +1127,7 @@ static DBusMessage *cs_set_property(DBusConnection *conn, DBusMessage *msg,const char *property;int cls; -if (cs->pending) +if (cs->pending ||__ofono_ussd_is_busy (cs->ussd))return __ofono_error_busy (msg);if (!dbus_message_iter_init (msg, &iter))
src/ofono.h +1 -0
@@ -254,6 +254,7 @@ gboolean __ofono_ussd_passwd_register(struct ofono_ussd *ussd, const char *sc, ofono_ussd_passwd_cb_t cb, void *data, ofono_destroy_func destroy);void __ofono_ussd_passwd_unregister (struct ofono_ussd *ussd,const char *sc); +gboolean __ofono_ussd_is_busy (struct ofono_ussd *ussd);#include <ofono/netreg.h>
src/ussd.c +11 -0
@@ -65,6 +65,17 @@ struct ssc_entry {ofono_destroy_func destroy; }; +gboolean __ofono_ussd_is_busy (struct ofono_ussd *ussd) +{ +if (!ussd) +return FALSE; + +if (ussd->pending || ussd->state !=USSD_STATE_IDLE ) +return TRUE; + +return FALSE; +} +static struct ssc_entry *ssc_entry_create (const char *sc,void *cb,void *data,ofono_destroy_func destroy) {
Signature · 1 line
1.7.0.4
Hi Yang,
Quoted 5 lines · Yang Gu
It's still not clear how ss and ussd interfere with each other. Current decision is each ss (call-barring, call-forwarding, etc.) has interference with ussd, but there is no interference within these ss. That is, call-barring has interference with ussd, but call-barring has no interference with call-forwarding.
Patch has been applied, but I broke it up into four patches.
Are you planning to take care of cb_ss_control, cb_ss_password, cf_ss_control and cs_ss_control busy conditions separately?
Regards,
-Denis
Gu
Hi Denis,
Quoted 16 lines
-----Original Message-----
From: Denis Kenzior [mailto:denkenz(a)gmail.com]
Sent: Thursday, September 09, 2010 10:07 PM
To: ofono(a)ofono.org
Cc: Gu, Yang
Subject: Re: [PATCH] Check if ussd is busy when doing ssHi Yang,
Quoted 5 lines · Yang Gu
It's still not clear how ss and ussd interfere with each other. Current decision is each ss (call-barring, call-forwarding, etc.) has interference with ussd, but there is no interference within these ss. That is, call-barring has interference with ussd, but call-barring has no interference with call-forwarding.
Quoted 5 lines
Patch has been applied, but I broke it up into four patches.
Are you planning to take care of
cb_ss_control,cb_ss_password,cf_ss_controlandcs_ss_controlbusy conditions separately?
I'm not following your question. We already check if ussd is busy at the beginning of ussd_initiate(), so these functions are ok with necessary checks.
On the other hand, I think we need also check if either of these supplementary services (call barring, call forwarding and call settings) is busy when doing a real unstructured supplementary service (ussd_initiate(),ussd_respond(), etc.).
Regards,
-Yang
Hi Yang,
2010/9/6 Yang Gu <[email protected]>:
Quoted 5 lines
It's still not clear how ss and ussd interfere with each other. Current decision is each ss (call-barring, call-forwarding, etc.) has interference with ussd, but there is no interference within these ss. That is, call-barring has interference with ussd, but call-barring has no interference with call-forwarding.
There is only one signaling channel for the supplementary services. Only one supplementary service operation can be active at a time. (Or two, network can initiate ussd notify or request while mobile-originated ussd is pending.)
Signature · 1 line
Pekka.Pessi mail at nokia.com
Gu
Hi,
Quoted 16 lines
-----Original Message-----
From: ofono-bounces(a)ofono.org [mailto:ofono-bounces(a)ofono.org] On Behalf Of Pekka Pessi
Sent: Monday, September 13, 2010 9:19 PM
To: ofono(a)ofono.org
Subject: Re: [PATCH] Check if ussd is busy when doing ssHi Yang,
2010/9/6 Yang Gu <[email protected]>:
Quoted 5 lines
It's still not clear how ss and ussd interfere with each other. Current decision is each ss (call-barring, call-forwarding, etc.) has interference with ussd, but there is no interference within these ss. That is, call-barring has interference with ussd, but call-barring has no interference with call-forwarding.
Quoted 4 lines
There is only one signaling channel for the supplementary services. Only one supplementary service operation can be active at a time. (Or two, network can initiate ussd notify or request while mobile-originated ussd is pending.)
Thank you for the info. When you say only one MO ss operation can be active at a time, do you mean modem will serialize them or oFono needs always to take care, or it's hardware specific?
Regards,
-Yang
Hi Yang,
2010/9/14 Gu, Yang <[email protected]>:
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
It's still not clear how ss and ussd interfere with each other. Current decision is each ss (call-barring, call-forwarding, etc.) has interference with ussd, but there is no interference within these ss. That is, call-barring has interference with ussd, but call-barring has no interference with call-forwarding.
Quoted 6 lines
Quoted 4 lines
There is only one signaling channel for the supplementary services. Only one supplementary service operation can be active at a time. (Or two, network can initiate ussd notify or request while mobile-originated ussd is pending.)
Thank you for the info. When you say only one MO ss operation can be active at a time, do you mean modem will serialize them or oFono needs always to take care, or it's hardware specific?
It is up to the firmware can do what ever it thinks is sensible. I don't think it will make any sense to serialize them, but then, you will never know.
Signature · 1 line
Pekka.Pessi mail at nokia.com