All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix minor issue in set up menu handling
@ 2010-12-27 19:07 Jeevaka Badrappan
  2010-12-27 19:07 ` [PATCH] stk: fix " Jeevaka Badrappan
  0 siblings, 1 reply; 3+ messages in thread
From: Jeevaka Badrappan @ 2010-12-27 19:07 UTC (permalink / raw)
  To: ofono

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

Hi,

 menu_changed signal is emitted incase of stk_menu_create_from_set_up_menu
failure as well. This patch changes the order of menu_changed signal and
also introduces NULL check.

Regards,
Jeevaka

badrjee (1):
  stk: fix issue in set up menu handling

 src/stk.c |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)


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

* [PATCH] stk: fix issue in set up menu handling
  2010-12-27 19:07 Fix minor issue in set up menu handling Jeevaka Badrappan
@ 2010-12-27 19:07 ` Jeevaka Badrappan
  2010-12-27 21:09   ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Jeevaka Badrappan @ 2010-12-27 19:07 UTC (permalink / raw)
  To: ofono

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

---
 src/stk.c |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 9dcbda6..5e5c2e4 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1093,26 +1093,28 @@ static gboolean handle_command_set_up_menu(const struct stk_command *cmd,
 						struct stk_response *rsp,
 						struct ofono_stk *stk)
 {
-	gboolean modified = FALSE;
+	struct stk_menu *menu = NULL;
 
-	if (stk->main_menu) {
-		stk_menu_free(stk->main_menu);
-		stk->main_menu = NULL;
+	if (cmd->setup_menu.items) {
+		menu = stk_menu_create_from_set_up_menu(cmd);
 
-		modified = TRUE;
+		if (menu == NULL) {
+			rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
+			return TRUE;
+		}
 	}
 
-	if (cmd->setup_menu.items) {
-		stk->main_menu = stk_menu_create_from_set_up_menu(cmd);
+	if (menu == NULL && stk->main_menu == NULL)
+		return TRUE;
 
-		if (stk->main_menu)
-			modified = TRUE;
-		else
-			rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
+	if (stk->main_menu) {
+		stk_menu_free(stk->main_menu);
+		stk->main_menu = NULL;
 	}
 
-	if (modified)
-		emit_menu_changed(stk);
+	stk->main_menu = menu;
+
+	emit_menu_changed(stk);
 
 	return TRUE;
 }
-- 
1.7.0.4


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

* Re: [PATCH] stk: fix issue in set up menu handling
  2010-12-27 19:07 ` [PATCH] stk: fix " Jeevaka Badrappan
@ 2010-12-27 21:09   ` Denis Kenzior
  0 siblings, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2010-12-27 21:09 UTC (permalink / raw)
  To: ofono

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

Hi Jeevaka,

On 12/27/2010 01:07 PM, Jeevaka Badrappan wrote:
> ---
>  src/stk.c |   28 +++++++++++++++-------------
>  1 files changed, 15 insertions(+), 13 deletions(-)
> 

Patch has been applied, thanks.

Regards,
-Denis

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-27 19:07 Fix minor issue in set up menu handling Jeevaka Badrappan
2010-12-27 19:07 ` [PATCH] stk: fix " Jeevaka Badrappan
2010-12-27 21:09   ` Denis Kenzior

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.