* [PATCH 0/1] Handle getenv failure case
@ 2011-03-23 11:42 Jeevaka Badrappan
2011-03-23 11:42 ` [PATCH 1/1] stk: Fix " Jeevaka Badrappan
0 siblings, 1 reply; 3+ messages in thread
From: Jeevaka Badrappan @ 2011-03-23 11:42 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
Hi,
If ofono is started before setting the LANG enviroment variable, then
call to getenv fails. This results in the failure of test case
Provide Local Information - Language setting(27.22.4.15 seq 1.5).
Plan is to default to en when the getenv fails. Warning message has
also been added. Distribution will be informed to start ofono after
the locale is set.
Regards,
Jeevaka
Jeevaka Badrappan (1):
stk: Fix getenv failure case
src/stk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] stk: Fix getenv failure case
2011-03-23 11:42 [PATCH 0/1] Handle getenv failure case Jeevaka Badrappan
@ 2011-03-23 11:42 ` Jeevaka Badrappan
2011-03-23 14:55 ` Denis Kenzior
0 siblings, 1 reply; 3+ messages in thread
From: Jeevaka Badrappan @ 2011-03-23 11:42 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 811 bytes --]
---
src/stk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index 68b6240..94ad396 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2177,8 +2177,9 @@ static void get_lang(struct stk_response *rsp, struct ofono_stk *stk)
l = getenv("LANG");
if (l == NULL) {
- rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
- goto out;
+ l = "en";
+ ofono_warn("LANG environment variable not set"
+ " - defaulting to en");
}
memcpy(lang, l, 2);
@@ -2187,7 +2188,6 @@ static void get_lang(struct stk_response *rsp, struct ofono_stk *stk)
rsp->result.type = STK_RESULT_TYPE_SUCCESS;
rsp->provide_local_info.language = lang;
-out:
if (stk_respond(stk, rsp, stk_command_cb))
stk_command_cb(&failure, stk);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] stk: Fix getenv failure case
2011-03-23 11:42 ` [PATCH 1/1] stk: Fix " Jeevaka Badrappan
@ 2011-03-23 14:55 ` Denis Kenzior
0 siblings, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2011-03-23 14:55 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
Hi Jeevaka,
On 03/23/2011 06:42 AM, Jeevaka Badrappan wrote:
> ---
> src/stk.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-23 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 11:42 [PATCH 0/1] Handle getenv failure case Jeevaka Badrappan
2011-03-23 11:42 ` [PATCH 1/1] stk: Fix " Jeevaka Badrappan
2011-03-23 14:55 ` 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.