All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Check if ussd is busy when doing ss
@ 2010-09-06  2:19 Yang Gu
  2010-09-09 14:07 ` Denis Kenzior
  2010-09-13 13:18 ` Pekka Pessi
  0 siblings, 2 replies; 6+ messages in thread
From: Yang Gu @ 2010-09-06  2:19 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 4825 bytes --]

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(-)

diff --git a/src/call-barring.c b/src/call-barring.c
index 7607f3f..a8bb3bd 100644
--- a/src/call-barring.c
+++ b/src/call-barring.c
@@ -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,
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index 4e77144..c8a79b1 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -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,
diff --git a/src/call-settings.c b/src/call-settings.c
index ab20062..ef96345 100644
--- a/src/call-settings.c
+++ b/src/call-settings.c
@@ -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))
diff --git a/src/ofono.h b/src/ofono.h
index d95f2f2..9b2e53f 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -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>
 
diff --git a/src/ussd.c b/src/ussd.c
index 825d560..fbb07d2 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -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)
 {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Check if ussd is busy when doing ss
  2010-09-06  2:19 [PATCH] Check if ussd is busy when doing ss Yang Gu
@ 2010-09-09 14:07 ` Denis Kenzior
  2010-09-10  8:27   ` Gu, Yang
  2010-09-13 13:18 ` Pekka Pessi
  1 sibling, 1 reply; 6+ messages in thread
From: Denis Kenzior @ 2010-09-09 14:07 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

Hi Yang,

On 09/05/2010 09:19 PM, Yang Gu wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] Check if ussd is busy when doing ss
  2010-09-09 14:07 ` Denis Kenzior
@ 2010-09-10  8:27   ` Gu, Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Gu, Yang @ 2010-09-10  8:27 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

Hi Denis,


>-----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 ss
>
>Hi Yang,
>
>On 09/05/2010 09:19 PM, Yang Gu wrote:
>> 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?
>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Check if ussd is busy when doing ss
  2010-09-06  2:19 [PATCH] Check if ussd is busy when doing ss Yang Gu
  2010-09-09 14:07 ` Denis Kenzior
@ 2010-09-13 13:18 ` Pekka Pessi
  2010-09-14  9:51   ` Gu, Yang
  1 sibling, 1 reply; 6+ messages in thread
From: Pekka Pessi @ 2010-09-13 13:18 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

Hi Yang,

2010/9/6 Yang Gu <yang.gu@intel.com>:
> 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.)

-- 
Pekka.Pessi mail at nokia.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] Check if ussd is busy when doing ss
  2010-09-13 13:18 ` Pekka Pessi
@ 2010-09-14  9:51   ` Gu, Yang
  2010-09-14 12:46     ` Pekka Pessi
  0 siblings, 1 reply; 6+ messages in thread
From: Gu, Yang @ 2010-09-14  9:51 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

Hi, 


>-----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 ss
>
>Hi Yang,
>
>2010/9/6 Yang Gu <yang.gu@intel.com>:
>> 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.)

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Check if ussd is busy when doing ss
  2010-09-14  9:51   ` Gu, Yang
@ 2010-09-14 12:46     ` Pekka Pessi
  0 siblings, 0 replies; 6+ messages in thread
From: Pekka Pessi @ 2010-09-14 12:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

Hi Yang,

2010/9/14 Gu, Yang <yang.gu@intel.com>:
>>> 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.)
>
> 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.

-- 
Pekka.Pessi mail at nokia.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-14 12:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-06  2:19 [PATCH] Check if ussd is busy when doing ss Yang Gu
2010-09-09 14:07 ` Denis Kenzior
2010-09-10  8:27   ` Gu, Yang
2010-09-13 13:18 ` Pekka Pessi
2010-09-14  9:51   ` Gu, Yang
2010-09-14 12:46     ` Pekka Pessi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.