Re: [PATCH 3/3] gisi: use strerror_r() instead of strerror()

2010-11-29 Thread Rémi Denis-Courmont
On Friday 26 November 2010 23:07:29 ext Denis Kenzior, you wrote:
 So my question is why we're using g_printerr in the first place inside a
 library.  Perhaps an approach similar to g_at_chat_set_debug is in order?

I don't know. I guess I will wait for Aki's infamous rewritten gisi anyway.

-- 
Rémi Denis-Courmont
Nokia Devices RD, Maemo Software, Helsinki
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] configure: do not hard-code the C run-time library name

2010-11-29 Thread Rémi Denis-Courmont
Since oFono does (obviously) not use -nostdlib, this only broke support
for alternative C run-times.
---
 configure.ac |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7f7a935..0c1986a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,7 +61,7 @@ AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
 AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads],
[enable threading support]), [enable_threads=${enableval}])
 
-AC_CHECK_LIB(c, signalfd, dummy=yes,
+AC_CHECK_FUNC(signalfd, dummy=yes,
AC_MSG_ERROR(signalfd support is required))
 
 AC_CHECK_LIB(dl, dlopen, dummy=yes,
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] Mark ofono/*.h symbolink links as built sources

2010-11-29 Thread Rémi Denis-Courmont
This forces automake/make to build them first if needed (as before).
But it avoids marking every single header as a dependency of every
single object. Thus we do not need a bogus full rebuild of the tree
everytime a header is added.
---
 Makefile.am |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a4c47e8..ee7949d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -326,7 +326,8 @@ src_ofonod_LDADD = $(builtin_libadd) @GLIB_LIBS@ 
@DBUS_LIBS@ @CAPNG_LIBS@ -ldl
 src_ofonod_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=$(srcdir)/src/ofono.ver
 
-CLEANFILES = src/builtin.h $(local_headers) $(rules_DATA)
+BUILT_SOURCES = $(local_headers)
+CLEANFILES = src/builtin.h $(BUILT_SOURCES) $(rules_DATA)
 
 plugindir = $(libdir)/ofono/plugins
 
@@ -512,8 +513,6 @@ src/builtin.h: src/genbuiltin $(builtin_sources)
 plugins/%.rules:
$(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@
 
-$(src_ofonod_OBJECTS) $(unit_objects): $(local_headers)
-
 include/ofono/version.h: include/version.h
$(AM_V_at)$(MKDIR_P) include/ofono
$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$ $@
-- 
1.7.1

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] Mark ofono/*.h symbolink links as built sources

2010-11-29 Thread Marcel Holtmann
Hi Remi,

 This forces automake/make to build them first if needed (as before).
 But it avoids marking every single header as a dependency of every
 single object. Thus we do not need a bogus full rebuild of the tree
 everytime a header is added.

I had this before, but it caused problems with make distcheck. So you
have double checked that this still works?

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] configure: do not hard-code the C run-time library name

2010-11-29 Thread Marcel Holtmann
Hi Remi,

 Since oFono does (obviously) not use -nostdlib, this only broke support
 for alternative C run-times.
 ---
  configure.ac |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

looks good enough to me. Patch has been applied.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 2/3] Use %m instead of strerror() in syslog messages

2010-11-29 Thread Marcel Holtmann
Hi Remi,

   strerror() is not thread-safe, nor in the glibc implementation,
   nor in the POSIX specification. In my experience, it will infrequently
   crash when another thread uses locale data in any way, including
   string formatting and such...
   
   Since the Huawei driver uses thread, we might as well avoid strerror().
   ---
   
drivers/isimodem/sim.c |3 ++-
plugins/hfp.c  |4 ++--
plugins/isigen.c   |   13 -
plugins/n900.c |   14 +++---
plugins/nokia-gpio.c   |   29 +
5 files changed, 36 insertions(+), 27 deletions(-)
  
  Since we do not use threads, do you still want this patch?  If you do,
  can you please break this up into two patches, one for drivers/isimodem
  and one for plugins?  We prefer patches to be split by directory.
 
 Why do we initialize glib and dbus with thread support? If the plan is to 
 smoothen the hypothetical use of threads in the future, then this patch 
 should 
 probably go in as well?

we do not initialize it with thread support, but in case a plugin
actually uses threads it could force it. This is common across BlueZ,
ConnMan and oFono and really just in case thing. In ConnMan we have this
case with the WiMAX plugin. For oFono we should hopefully never require
threading support.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] Add voice call boolean property for MO/MT distinction

2010-11-29 Thread Marcel Holtmann
Hi Remi,

   This becomes a problem if we have more than one application managing
   voice calls. And I expect that will _be_ the most common case. You have
   the main call UI, but you also have the Bluetooth headset/carkit, the
   USB AT commands port, and possibly some third party call applications.
  
  Right. At least for HFP the call direction needs to be in the AT+CLCC
  reply. I.e. if the bluetoothd ofono telephony driver is used and
  bluetoothd starts after one or more calls are already in progress
  bluetoothd wouldn't have seen the call setup process and therefore not
  know the direction of the call (without this property).
 
 Yeah. For USB CDC ACM gadget functionality, there is basically the same 
 problem. Because oFono assumes it has full control over the modem, most 
 cellular commands have to go through the oFono D-Bus API.
 
 However, a number of other commands talk to completely different stuff, 
 including but not limited to:
 * AT+CBC et al deals with energy management, which is proprietary in Nokia's 
 case and hence cannot be reached from GPL'd oFono.

where is the problem here. An oFono plugin could just talk D-Bus to this
daemon.

 * AT+CKPD, AT+CTSA and friends use either Linux uinput driver or perhaps to 
 the windowing framework (X11, Wayland?).

This is not even a problem. Using uinput and this is solved. Wayland
talks kernel input only anyway and so can X11.

 * AT+CBKLT is hooked to the screensaver whatever takes care of it.

No matter what you do, this is a more complex problem. The screensaver
run as user session. You might just need to modify it to also listen on
the D-Bus system bus on a well defined service name and problem solved.

 * AT+CPBR and friends is hooked to the phonebook, which is Qt-based, and 
 therefore inadequate inside oFono.

I am not buying into the AT+CPBR for the local and user specific
phonebook. That one is inside Tracker anyway and also inside the user
session. Trying to really support this is a broken idea. CPBR can not
expose the information of modern contacts storage anyway, so just don't
bother.

If you really care about it then use Bluetooth PBAP via obexd which we
have enabled already.

 * At Nokia, we also have some non-standard commands for internal use.
 * Some operators require some funky AT commands of their own. It might not be 
 possible to open-source them, even if we want to.

And these should be on an engineering mode only USB CDC ACM interface
with a different backend anyway.

 I would like to emphasize that, even if many of those commands are mostly if 
 not only used in testing, they may still need to cooperate with oFono and/or 
 to be present in the end-user devices. Besides, duplicating the 
 implementation 
 effort inside and outside oFono would be a waste of time.
 
 All in all, implementing the AT commands DCE emulator inside oFono is not a 
 realistic option. That is not to say that it must be closed-source, at least 
 not most parts of it, but it's going to (have to) talk D-Bus to oFono.

I disagree here. The AT commands emulator belongs inside oFono.

Only because someone wants to shoehorn this into something nasty,
doesn't mean we should do it. And I am not going to scarifies the
simplicity of the oFono D-Bus API for this.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Read/Write EFcfis/EFcphs-cff

2010-11-29 Thread Jeevaka Badrappan

Hi,

This patch reads and writes the VoiceUnconditional call forwarding status
from and to the SIM files EFcfis/EFcphs-cff. New property ForwardingFlagOnSim
is added to inform the status of the VoiceUnconditional status read from SIM.

If EFcfis is present, EFcfis file is read and the status is updated via
properties VoiceUnconditional and ForwardingFlagOnSim. If VoiceUnconditional
call forwaring rule is enabled, VoiceUnconditional property holds the
forwared to number whereas ForwardingFlagOnSim holds the status of the call
forwarding rule.

If cfis is not present but EFcphs-cff is present, then EFcphs-cff is read
and the status is updated via the property ForwardingFlagOnSim. 

offline-online state transitions results in caching the call forwaring status
every time. To avoid this, call forwarding atom is moved to the post sim and
its moved also due to the fact that call forwarding status doesn't change in
roaming.

Regards,
Jeevaka

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 1/7] call-forwarding: Read/Write cfis/cphs-cff

2010-11-29 Thread Jeevaka Badrappan
---
 src/call-forwarding.c |  266 +++-
 1 files changed, 260 insertions(+), 6 deletions(-)

diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index ce03c40..bb345a6 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -34,6 +34,7 @@
 #include ofono.h
 
 #include common.h
+#include simutil.h
 
 #define CALL_FORWARDING_FLAG_CACHED 0x1
 
@@ -58,6 +59,12 @@ struct ofono_call_forwarding {
int query_next;
int query_end;
struct cf_ss_request *ss_req;
+   struct ofono_sim *sim;
+   unsigned char cfis_record_id;
+   unsigned char cfis_indicator;
+   ofono_bool_t cphs_cff_present;
+   ofono_bool_t status_on_sim;
+   ofono_bool_t online;
struct ofono_ussd *ussd;
unsigned int ussd_watch;
const struct ofono_call_forwarding_driver *driver;
@@ -202,6 +209,85 @@ static const char *cf_type_lut[] = {
AllConditional
 };
 
+static void sim_cfis_update_cb(int ok, void *data)
+{
+   if (!ok)
+   ofono_info(Failed to update EFcfis);
+}
+
+static void sim_cphs_cff_update_cb(int ok, void *data)
+{
+   if (!ok)
+   ofono_info(Failed to update EFcphs-cff);
+}
+
+static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)
+{
+   gboolean cfu_voice = FALSE;
+   struct ofono_call_forwarding_condition *cond = NULL;
+   GSList *l;
+
+   /*
+* For now we only support Voice, although Fax  all Data
+* basic services are applicable as well.
+*/
+   for (l = cf-cf_conditions[0]; l; l = l-next) {
+   cond = l-data;
+
+   if ((cond-cls  BEARER_CLASS_VOICE) 
+   (strlen(cond-phone_number.number)  0)) {
+   cfu_voice = TRUE;
+   break;
+   }
+   }
+
+   if (cfu_voice == cf-status_on_sim)
+   return;
+
+   cf-status_on_sim = cfu_voice;
+
+   if (cf-cfis_record_id) {
+   unsigned char data[16];
+   int number_len;
+
+   memset(data, 0xff, sizeof(data));
+
+   /* Profile Identifier */
+   data[0] = 0x01;
+
+   if (cfu_voice) {
+   number_len = strlen(cond-phone_number.number);
+
+   /* CFU indicator Status - Voice */
+   data[1] = (cf-cfis_indicator |= 0x01);
+   number_len = (number_len + 1) / 2;
+   data[2] = number_len + 1;
+   data[3] = cond-phone_number.type;
+
+   sim_encode_bcd_number(cond-phone_number.number,
+   data + 4);
+
+   } else
+   data[1] = (cf-cfis_indicator = 0xFE);
+
+   ofono_sim_write(cf-sim, SIM_EFCFIS_FILEID,
+   sim_cfis_update_cb,
+   OFONO_SIM_FILE_STRUCTURE_FIXED,
+   cf-cfis_record_id, data,
+   sizeof(data), cf);
+   return;
+   }
+
+   if (cf-cphs_cff_present) {
+   unsigned char cff_voice = cfu_voice ? 0x0A : 0x05;
+
+   ofono_sim_write(cf-sim, SIM_EF_CPHS_CFF_FILEID,
+   sim_cphs_cff_update_cb,
+   OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
+   0, cff_voice, sizeof(cff_voice), cf);
+   }
+}
+
 static void set_new_cond_list(struct ofono_call_forwarding *cf,
int type, GSList *list)
 {
@@ -372,6 +458,7 @@ static DBusMessage *cf_get_properties_reply(DBusMessage 
*msg,
DBusMessageIter iter;
DBusMessageIter dict;
int i;
+   dbus_bool_t status;
 
reply = dbus_message_new_method_return(msg);
 
@@ -384,10 +471,21 @@ static DBusMessage *cf_get_properties_reply(DBusMessage 
*msg,
OFONO_PROPERTIES_ARRAY_SIGNATURE,
dict);
 
-   for (i = 0; i  4; i++)
-   property_append_cf_conditions(dict, cf-cf_conditions[i],
+   if (cf-online == TRUE) {
+   for (i = 0; i  4; i++)
+   property_append_cf_conditions(dict,
+   cf-cf_conditions[i],
BEARER_CLASS_VOICE,
cf_type_lut[i]);
+   } else if (cf-status_on_sim == TRUE)
+   property_append_cf_conditions(dict,
+   cf-cf_conditions[CALL_FORWARDING_TYPE_UNCONDITIONAL],
+   BEARER_CLASS_VOICE,
+   cf_type_lut[CALL_FORWARDING_TYPE_UNCONDITIONAL]);
+
+   status = cf-status_on_sim;
+   ofono_dbus_dict_append(dict, ForwardingFlagOnSim, 

[PATCH 3/7] isigen: Move call forwarding to post sim

2010-11-29 Thread Jeevaka Badrappan
---
 plugins/isigen.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/isigen.c b/plugins/isigen.c
index 3384e9f..47f2553 100644
--- a/plugins/isigen.c
+++ b/plugins/isigen.c
@@ -402,6 +402,7 @@ static void isigen_post_sim(struct ofono_modem *modem)
DBG((%p) with %s, modem, isi-ifname);
 
ofono_phonebook_create(isi-modem, 0, isimodem, isi-idx);
+   ofono_call_forwarding_create(isi-modem, 0, isimodem, isi-idx);
 }
 
 static void isigen_post_online(struct ofono_modem *modem)
@@ -418,7 +419,6 @@ static void isigen_post_online(struct ofono_modem *modem)
ofono_cbs_create(isi-modem, 0, isimodem, isi-idx);
ofono_ssn_create(isi-modem, 0, isimodem, isi-idx);
ofono_ussd_create(isi-modem, 0, isimodem, isi-idx);
-   ofono_call_forwarding_create(isi-modem, 0, isimodem, isi-idx);
ofono_call_settings_create(isi-modem, 0, isimodem, isi-idx);
ofono_call_barring_create(isi-modem, 0, isimodem, isi-idx);
ofono_call_meter_create(isi-modem, 0, isimodem, isi-idx);
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 2/7] ifx: Move call forwarding to post sim

2010-11-29 Thread Jeevaka Badrappan
---
 plugins/ifx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/ifx.c b/plugins/ifx.c
index 037273a..cd6e667 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -703,6 +703,7 @@ static void ifx_post_sim(struct ofono_modem *modem)
ofono_stk_create(modem, 0, ifxmodem, data-dlcs[AUX_DLC]);
ofono_phonebook_create(modem, OFONO_VENDOR_IFX,
atmodem, data-dlcs[AUX_DLC]);
+   ofono_call_forwarding_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
 }
 
 static void ifx_post_online(struct ofono_modem *modem)
@@ -724,7 +725,6 @@ static void ifx_post_online(struct ofono_modem *modem)
ofono_ussd_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
 
ofono_ssn_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
-   ofono_call_forwarding_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
ofono_call_settings_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
ofono_call_meter_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
ofono_call_barring_create(modem, 0, atmodem, data-dlcs[AUX_DLC]);
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 7/7] TODO: Marking the Read/Write EFcfis task as done

2010-11-29 Thread Jeevaka Badrappan
---
 TODO |9 -
 doc/features.txt |5 +
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/TODO b/TODO
index c484871..b33063a 100644
--- a/TODO
+++ b/TODO
@@ -92,15 +92,6 @@ SMS
 SIM / SIM File system
 =
 
-- Read / Write EFcfis.  Call forwarding settings can be bootstrapped on the
-  SIM for faster notification of the user that call forwarding is active.
-  These settings are stored in EFcfis.  oFono should read these settings and
-  update the call forwarding atom appropriately.
-
-  Priority: Low
-  Complexity: C2
-  Owner: Jeevaka Badrappan jeevaka.badrap...@elektrobit.com
-
 - SIM Call History plugin.  New UICCs support four new SIM elementary files
   for storing call history information on the SIM: EFici, EFict, EFoci, EFoct.
   A plugin should be developed for oFono that will write to these files.
diff --git a/doc/features.txt b/doc/features.txt
index 06f5203..0a90a70 100644
--- a/doc/features.txt
+++ b/doc/features.txt
@@ -209,6 +209,11 @@ SIM
   oFono halts the SIM initialization procedure and the modem remains in the
   PRESIM state.  In this state oFono will only allow emergency calls.
 
+- Read / Write EFcfis / EFcphs-cff.  oFono reads EFcfis/EFcphs-cff SIM files
+  to check if VoiceUnconditional call forwarding rule is enabled.  If enabled,
+  ForwardingFlagOnSim will be set and VoiceUnconditional may contain the
+  forwarded to number if the number is available.
+
 Radio settings
 ==
 
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 5/7] phonesim: Move call forwarding to post sim

2010-11-29 Thread Jeevaka Badrappan
---
 plugins/phonesim.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/phonesim.c b/plugins/phonesim.c
index d2faf42..e29d04d 100644
--- a/plugins/phonesim.c
+++ b/plugins/phonesim.c
@@ -470,6 +470,8 @@ static void phonesim_post_sim(struct ofono_modem *modem)
if (!data-calypso)
ofono_stk_create(modem, OFONO_VENDOR_PHONESIM,
atmodem, data-chat);
+
+   ofono_call_forwarding_create(modem, 0, atmodem, data-chat);
 }
 
 static void phonesim_post_online(struct ofono_modem *modem)
@@ -482,7 +484,6 @@ static void phonesim_post_online(struct ofono_modem *modem)
DBG(%p, modem);
 
ofono_ussd_create(modem, 0, atmodem, data-chat);
-   ofono_call_forwarding_create(modem, 0, atmodem, data-chat);
ofono_call_settings_create(modem, 0, atmodem, data-chat);
 
if (data-calypso)
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 6/7] doc: Add new property to call forwarding

2010-11-29 Thread Jeevaka Badrappan
---
 doc/call-forwarding-api.txt |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/doc/call-forwarding-api.txt b/doc/call-forwarding-api.txt
index 067531a..e8b4b9f 100644
--- a/doc/call-forwarding-api.txt
+++ b/doc/call-forwarding-api.txt
@@ -57,3 +57,8 @@ Propertiesstring VoiceUnconditional [readwrite]
 
Contains the value of the voice Not Reachable call
forwarding rule.
+
+   boolean ForwardingFlagOnSim [readonly]
+
+   Boolean representing the voice unconditional call
+   forwarding rule status.
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH 4/7] plugins/n900: Move call forwarding to post sim

2010-11-29 Thread Jeevaka Badrappan
---
 plugins/n900.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/n900.c b/plugins/n900.c
index a9e6b59..3f6aa39 100644
--- a/plugins/n900.c
+++ b/plugins/n900.c
@@ -491,6 +491,7 @@ static void n900_post_sim(struct ofono_modem *modem)
DBG();
 
ofono_phonebook_create(isi-modem, 0, isimodem, isi-idx);
+   ofono_call_forwarding_create(isi-modem, 0, isimodem, isi-idx);
 }
 
 static void n900_post_online(struct ofono_modem *modem)
@@ -506,7 +507,6 @@ static void n900_post_online(struct ofono_modem *modem)
ofono_cbs_create(isi-modem, 0, isimodem, isi-idx);
ofono_ssn_create(isi-modem, 0, isimodem, isi-idx);
ofono_ussd_create(isi-modem, 0, isimodem, isi-idx);
-   ofono_call_forwarding_create(isi-modem, 0, isimodem, isi-idx);
ofono_call_settings_create(isi-modem, 0, isimodem, isi-idx);
ofono_call_barring_create(isi-modem, 0, isimodem, isi-idx);
ofono_call_meter_create(isi-modem, 0, isimodem, isi-idx);
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 2/3] stk: Handle provide local info proactive command

2010-11-29 Thread Denis Kenzior
Hi Yang,

On 11/28/2010 08:47 PM, Gu, Yang wrote:
 Hi Denis,
 
 diff --git a/src/smsutil.c b/src/smsutil.c
 index e6dbf5f..5394817 100644
 --- a/src/smsutil.c
 +++ b/src/smsutil.c
 @@ -324,10 +324,10 @@ gboolean sms_encode_scts(const struct sms_scts *in,
 unsigned char *pdu,
 if (in-year  99)
 return FALSE;

 -   if (in-month  12)
 +   if (in-month  12 || in-month == 0)
 return FALSE;

 -   if (in-day  31)
 +   if (in-day  31 || in-day == 0)
 return FALSE;

 if (in-hour  23)
 @@ -339,7 +339,7 @@ gboolean sms_encode_scts(const struct sms_scts *in,
 unsigned char *pdu,
 if (in-second  59)
 return FALSE;

 -   if ((in-timezone  12*4-1) || (in-timezone  -(12*4-1)))
 +   if ((in-timezone  12*4) || (in-timezone  -(12*4-1)))

 Err, why would +48 be valid?
 
 I think all the timezone should be a circle (24 hours). If it can't be -48, 
 it needs to contain +48. 
 Also please see 9.2.6.9 in 
 http://gsm-history.org/fileadmin/user_upload/Key_SMS_Documents/GSM_Rec_03.40_v_2.2.0.pdf,
  which says The Time Zone may be a number in the range -47 to +48.
 

Ok, fair enough.  Though do note that the timezone field must account
for daylight savings time.  So in theory GMT+14 and GMT-12 are valid
timezone values as well.  See
http://en.wikipedia.org/wiki/List_of_time_zones_by_UTC_offset

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 1/5] text-telephony: add public header

2010-11-29 Thread Denis Kenzior
Hi Waldo,

On 11/27/2010 03:04 PM, Bastian, Waldo wrote:
 +   void (*remove)(struct ofono_ctm *tt);
 +   void (*query_tty)(struct ofono_ctm *tt,
 +   ofono_ctm_query_cb_t cb,
 +   void *data);
 +   void (*set_tty)(struct ofono_ctm *tt,
 +   int enable,

 I also changed this to ofono_bool_t enable
 
 Fyi, I noticed that radio-settings.h has this as an int as well:
 
 67 void (*set_fast_dormancy)(struct ofono_radio_settings *rs,
 68 int enable,
 69 
 ofono_radio_settings_fast_dormancy_set_cb_t,
 70 void *data);
 
 The query callback otoh uses ofono_bool_t.
 

Thanks for pointing this out.  It has now been fixed.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


ConnectionContext creation for LTE PDN Connection.

2010-11-29 Thread Sjur BRENDELAND
Hi all,

We have started to investigate LTE impact on oFono, 
specifically how to integrate LTE and initial PDN connection,
and we have some questions regarding this.

This raises some questions about the handling of
ConnectionContexts.

When a terminal attach to LTE network it would
normally do an implicit context activation request
associated to attach request (+CGATT=1).
When the context activation is completed this will
result in an event notifying about the activated PDN
connection according to
27.007 10.1.19 Packet Domain event reporting +CGEREP.

+CGEV: ME PDN ACT cid

At this point we have a connection context in the modem.

The question is then, how should we model this in oFono?
Should we assume/require that a Connection Context
already is created by ConnMan and pre-exists in 
oFono (possibly with a flag indicating that this
represents the initial PDN, or perhaps just taking
the internet ConnectionContext)?
Or should oFono automatically create a Connection Context?

Furthermore, should oFono automatically proceed and
set Active=true, bind the connection to a network interface
and set network interface in state UP, or should the
ConnectionContext initially set Active=false, 
waiting for ConnMan to activate it?


Regards,
Sjur
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] sim: fix issue in triggering EFest read

2010-11-29 Thread Jeevaka Badrappan
---
 src/sim.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index e5e304c..5a84833 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1445,7 +1445,11 @@ static void sim_efust_read_cb(int ok, int length, int 
record,
 * must be present if EFfdn or EFbdn are present
 */
if (sim_ust_is_available(sim-efust, sim-efust_length,
-   SIM_UST_SERVICE_ENABLED_SERVICE_TABLE)) {
+   SIM_UST_SERVICE_ENABLED_SERVICE_TABLE) ||
+   sim_ust_is_available(sim-efust, sim-efust_length,
+   SIM_UST_SERVICE_FDN) ||
+   sim_ust_is_available(sim-efust, sim-efust_length,
+   SIM_UST_SERVICE_BDN)) {
ofono_sim_read(sim, SIM_EFEST_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efest_read_cb, sim);
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: ConnectionContext creation for LTE PDN Connection.

2010-11-29 Thread Rémi Denis-Courmont
Hello,

On Monday 29 November 2010 16:46:43 ext Sjur BRENDELAND, you wrote:
 This raises some questions about the handling of
 ConnectionContexts.
 
 When a terminal attach to LTE network it would
 normally do an implicit context activation request
 associated to attach request (+CGATT=1).

Yeah. So the ConnectionManager cannot be 'Powered' off in LTE.

 When the context activation is completed this will
 result in an event notifying about the activated PDN
 connection according to
 27.007 10.1.19 Packet Domain event reporting +CGEREP.
 
 +CGEV: ME PDN ACT cid
 
 At this point we have a connection context in the modem.
 
 The question is then, how should we model this in oFono?
 Should we assume/require that a Connection Context
 already is created by ConnMan and pre-exists in
 oFono (possibly with a flag indicating that this
 represents the initial PDN, or perhaps just taking
 the internet ConnectionContext)?

The modem driver ought to know what the default PDN is, and match it to the 
correct oFono primary context. no?

 Or should oFono automatically create a Connection Context?
 
 Furthermore, should oFono automatically proceed and
 set Active=true, bind the connection to a network interface
 and set network interface in state UP,

Definitely not. This would interfere with any other existing IP connection, say 
WiFi.

 or should the ConnectionContext initially set Active=false,
 waiting for ConnMan to activate it?

This assumes that the default PDN would be the Internet connection. For data-
only LTE, this might work. But wouldn't this fail miserably for networks with 
separate PDN for IMS and Internet?

-- 
Rémi Denis-Courmont
Nokia Devices RD, Maemo Software, Helsinki
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: ConnectionContext creation for LTE PDN Connection.

2010-11-29 Thread Marcel Holtmann
Hi Remi,

  Or should oFono automatically create a Connection Context?
  
  Furthermore, should oFono automatically proceed and
  set Active=true, bind the connection to a network interface
  and set network interface in state UP,
 
 Definitely not. This would interfere with any other existing IP connection, 
 say 
 WiFi.

why would bringing an interface up interfere? We are doing this right
now. Just the IP assignment is done by ConnMan, but the interface
up/down status is controlled by oFono or even BlueZ in case of
Bluetooth.

Regards

Marcel


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 1/2] phonesim: implement ctm atom

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:22 PM, Lucas De Marchi wrote:
 ---
  plugins/phonesim.c |  150 
 ++--
  1 files changed, 146 insertions(+), 4 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 2/2] TODO: Mark CTM task as done

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:22 PM, Lucas De Marchi wrote:
 ---
  TODO |   11 ---
  doc/features.txt |7 +++
  2 files changed, 7 insertions(+), 11 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] sim: fix issue in triggering EFest read

2010-11-29 Thread Jeevaka Badrappan
---
 src/sim.c |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index e5e304c..30a6ac2 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1441,11 +1441,18 @@ static void sim_efust_read_cb(int ok, int length, int 
record,
 
/*
 * Check whether the SIM provides EFest file
-* According to 31.102, section 4.2.24 and 4.2.44 the EFest file
-* must be present if EFfdn or EFbdn are present
+* According to 3GPP TS 31.102 section 4.2.47, EFest file
+* shall be present if FDN or BDN or EST is available
+* Lets be paranoid and check for the special cases as well
+* where EST is not available(FDN or BDN available), but EFest
+* is present
 */
if (sim_ust_is_available(sim-efust, sim-efust_length,
-   SIM_UST_SERVICE_ENABLED_SERVICE_TABLE)) {
+   SIM_UST_SERVICE_ENABLED_SERVICE_TABLE) ||
+   sim_ust_is_available(sim-efust, sim-efust_length,
+   SIM_UST_SERVICE_FDN) ||
+   sim_ust_is_available(sim-efust, sim-efust_length,
+   SIM_UST_SERVICE_BDN)) {
ofono_sim_read(sim, SIM_EFEST_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efest_read_cb, sim);
-- 
1.7.0.4

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 1/9] coding-style: add rule about checking NULL pointer

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:38 PM, Lucas De Marchi wrote:
 ---
  doc/coding-style.txt |   21 +
  1 files changed, 21 insertions(+), 0 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] sim: fix typo

2010-11-29 Thread Gustavo F. Padovan
---
 src/simapplication.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/simapplication.cpp b/src/simapplication.cpp
index 05ae21f..71bb81d 100644
--- a/src/simapplication.cpp
+++ b/src/simapplication.cpp
@@ -,7 +,7 @@ void DemoSimApplication::sendSendSSMenu()
 items += item;
 
 item.setIdentifier( SendSSMenu_CLIP );
-item.setLabel( CLIP (Calling Line Idnetification Presentation) );
+item.setLabel( CLIP (Calling Line Identification Presentation) );
 items += item;
 
 item.setIdentifier( SendSSMenu_CLIR );
-- 
1.7.3.2

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


[PATCH] simfs: make sim_fs_read_block work for 256 byte files

2010-11-29 Thread Kristen Carlson Accardi
---
 src/simfs.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/simfs.c b/src/simfs.c
index 5f459ab..258a42f 100644
--- a/src/simfs.c
+++ b/src/simfs.c
@@ -59,6 +59,7 @@ static gboolean sim_fs_op_read_block(gpointer user_data);
 struct sim_fs_op {
int id;
unsigned char *buffer;
+   int bufoff;
enum ofono_sim_file_structure structure;
unsigned short offset;
gboolean info_only;
@@ -217,7 +218,6 @@ static void sim_fs_op_read_block_cb(const struct 
ofono_error *error,
struct sim_fs_op *op = g_queue_peek_head(fs-op_q);
int start_block;
int end_block;
-   int bufoff;
int dataoff;
int tocopy;
 
@@ -230,25 +230,25 @@ static void sim_fs_op_read_block_cb(const struct 
ofono_error *error,
end_block = (op-offset + (op-num_bytes - 1)) / 256;
 
if (op-current == start_block) {
-   bufoff = 0;
+   op-bufoff = 0;
dataoff = op-offset % 256;
tocopy = MIN(256 - op-offset % 256,
op-num_bytes - op-current * 256);
} else {
-   bufoff = (op-current - start_block - 1) * 256 +
-   op-offset % 256;
dataoff = 0;
tocopy = MIN(256, op-num_bytes - op-current * 256);
}
 
DBG(bufoff: %d, dataoff: %d, tocopy: %d,
-   bufoff, dataoff, tocopy);
+   op-bufoff, dataoff, tocopy);
 
-   memcpy(op-buffer + bufoff, data + dataoff, tocopy);
+   memcpy(op-buffer + op-bufoff, data + dataoff, tocopy);
cache_block(fs, op-current, 256, data, len);
 
op-current++;
 
+   op-bufoff += tocopy;
+
if (op-current  end_block) {
ofono_sim_file_read_cb_t cb = op-cb;
 
-- 
1.7.2.3

___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 2/9] drivers: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
On 11/27/2010 01:38 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  drivers/atmodem/atutil.c|2 +-
  drivers/atmodem/atutil.h|2 +-
  drivers/atmodem/call-barring.c  |6 ++--
  drivers/atmodem/call-forwarding.c   |4 +-
  drivers/atmodem/call-meter.c|   14 ++--
  drivers/atmodem/call-settings.c |   14 ++--
  drivers/atmodem/call-volume.c   |4 +-
  drivers/atmodem/cbs.c   |6 ++--
  drivers/atmodem/devinfo.c   |8 +++---
  drivers/atmodem/gprs-context.c  |2 +-
  drivers/atmodem/gprs.c  |6 ++--
  drivers/atmodem/network-registration.c  |   18 
  drivers/atmodem/phonebook.c |4 +-
  drivers/atmodem/sim-poll.c  |2 +-
  drivers/atmodem/sim.c   |   32 +++---
  drivers/atmodem/sms.c   |   12 +-
  drivers/atmodem/stk.c   |4 +-
  drivers/atmodem/ussd.c  |6 ++--
  drivers/atmodem/voicecall.c |   24 +++---
  drivers/calypsomodem/stk.c  |6 ++--
  drivers/calypsomodem/voicecall.c|6 ++--
  drivers/hfpmodem/call-volume.c  |4 +-
  drivers/hfpmodem/network-registration.c |6 ++--
  drivers/hfpmodem/voicecall.c|   28 +-
  drivers/hsomodem/gprs-context.c |4 +-
  drivers/hsomodem/radio-settings.c   |2 +-
  drivers/huaweimodem/audio-settings.c|2 +-
  drivers/huaweimodem/gprs-context.c  |6 ++--
  drivers/huaweimodem/voicecall.c |8 +++---
  drivers/ifxmodem/audio-settings.c   |2 +-
  drivers/ifxmodem/gprs-context.c |8 +++---
  drivers/ifxmodem/radio-settings.c   |2 +-
  drivers/ifxmodem/stk.c  |6 ++--
  drivers/ifxmodem/voicecall.c|   18 
  drivers/isimodem/audio-settings.c   |6 ++--
  drivers/isimodem/call-barring.c |   12 +-
  drivers/isimodem/call-forwarding.c  |   12 +-
  drivers/isimodem/call-meter.c   |4 +-
  drivers/isimodem/call-settings.c|   10 
  drivers/isimodem/cbs.c  |9 +++
  drivers/isimodem/devinfo.c  |   12 +-
  drivers/isimodem/gprs-context.c |   19 +++--
  drivers/isimodem/gprs.c |   10 
  drivers/isimodem/infoserver.c   |4 +-
  drivers/isimodem/network-registration.c |   22 +---
  drivers/isimodem/phonebook.c|   10 
  drivers/isimodem/radio-settings.c   |   10 
  drivers/isimodem/sim.c  |   12 +-
  drivers/isimodem/sms.c  |   17 +++
  drivers/isimodem/ssn.c  |6 ++--
  drivers/isimodem/ussd.c |   10 
  drivers/isimodem/voicecall.c|   12 --
  drivers/mbmmodem/gprs-context.c |6 ++--
  drivers/mbmmodem/stk.c  |6 ++--
  drivers/nwmodem/radio-settings.c|2 +-
  drivers/stemodem/gprs-context.c |   14 ++--
  drivers/stemodem/radio-settings.c   |2 +-
  drivers/stemodem/voicecall.c|   16 +++---
  58 files changed, 256 insertions(+), 265 deletions(-)
 

Patch has been applied.  However, I had to amend the patch since it
introduced style issues (particularly lines over 80 characters).  Is
there any way to preserve the max line width in the future?  Otherwise
you might have to amend them by hand...

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 3/9] unit: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:38 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  unit/test-caif.c|2 +-
  unit/test-mux.c |2 +-
  unit/test-simutil.c |4 ++--
  3 files changed, 4 insertions(+), 4 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 4/9] gisi: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:38 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  gisi/client.c |   46 +++---
  gisi/iter.c   |2 +-
  gisi/server.c |6 +++---
  gisi/verify.c |4 ++--
  4 files changed, 29 insertions(+), 29 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 5/9] examples: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:38 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  examples/nettime.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 6/9] gatchat: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:39 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  gatchat/gatchat.c |   46 +++---
  gatchat/gathdlc.c |8 
  gatchat/gatio.c   |4 ++--
  gatchat/gatmux.c  |6 +++---
  gatchat/gatppp.c  |4 ++--
  gatchat/gatresult.c   |   44 ++--
  gatchat/gatserver.c   |   16 
  gatchat/gatutil.c |6 +++---
  gatchat/gsmdial.c |2 +-
  gatchat/ppp_auth.c|6 +++---
  gatchat/ppp_cp.c  |4 ++--
  gatchat/ppp_ipcp.c|4 ++--
  gatchat/ppp_lcp.c |6 +++---
  gatchat/ringbuffer.c  |   14 +++---
  gatchat/test-qcdm.c   |6 +++---
  gatchat/test-server.c |   18 +-
  16 files changed, 97 insertions(+), 97 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 8/9] plugins: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:39 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  plugins/bluetooth.c   |6 +++---
  plugins/calypso.c |4 ++--
  plugins/hfp.c |   20 ++--
  plugins/hso.c |   12 ++--
  plugins/huawei.c  |   10 +-
  plugins/ifx.c |   24 
  plugins/isigen.c  |   10 +-
  plugins/mbm.c |   12 ++--
  plugins/n900.c|6 +++---
  plugins/nokia-gpio.c  |6 +++---
  plugins/nokia.c   |   10 +-
  plugins/novatel.c |   22 +++---
  plugins/palmpre.c |   10 +-
  plugins/phonesim.c|   22 +++---
  plugins/smart-messaging.c |4 ++--
  plugins/ste.c |   12 ++--
  plugins/udev.c|4 ++--
  plugins/wavecom.c |8 
  plugins/zte.c |   12 ++--
  19 files changed, 107 insertions(+), 107 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 9/9] core: explicitly compare pointers to NULL

2010-11-29 Thread Denis Kenzior
Hi Lucas,

On 11/27/2010 01:39 PM, Lucas De Marchi wrote:
 This patch was generated by the following semantic patch
 (http://coccinelle.lip6.fr/)
 
 // smpl
 @fix disable is_null,isnt_null1@
 expression *E;
 @@
 
 - !E
 + E == NULL
 // /smpl
 ---
  src/audio-settings.c  |   12 
  src/call-barring.c|   18 ++--
  src/call-forwarding.c |   20 +++---
  src/call-meter.c  |   26 +-
  src/call-settings.c   |   26 +-
  src/call-volume.c |6 ++--
  src/cbs.c |   16 +-
  src/common.c  |2 +-
  src/dbus.c|8 +++---
  src/gprs.c|   28 ++--
  src/history.c |2 +-
  src/main.c|2 +-
  src/message-waiting.c |4 +-
  src/modem.c   |   14 +-
  src/nettime.c |2 +-
  src/network.c |   28 ++--
  src/phonebook.c   |   10 +++---
  src/plugin.c  |2 +-
  src/radio-settings.c  |   20 +++---
  src/sim.c |   16 +-
  src/simfs.c   |   28 ++--
  src/simutil.c |   16 +-
  src/sms.c |   40 ++--
  src/smsagent.c|   12 
  src/smsutil.c |   34 
  src/stk.c |   62 +-
  src/stkagent.c|2 +-
  src/stkutil.c |4 +-
  src/ussd.c|   46 
  src/util.c|   14 +-
  src/voicecall.c   |   70 
  31 files changed, 295 insertions(+), 295 deletions(-)
 

I applied this patch but broke it up into several for the core files I
really want to track separately.  Thanks for doing all this.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] sim: fix typo

2010-11-29 Thread Denis Kenzior
Hi Gustavo,

On 11/29/2010 12:51 PM, Gustavo F. Padovan wrote:
 ---
  src/simapplication.cpp |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] sim: fix issue in triggering EFest read

2010-11-29 Thread Denis Kenzior
Hi Jeevaka,

On 11/29/2010 10:57 AM, Jeevaka Badrappan wrote:
 ---
  src/sim.c |   13 ++---
  1 files changed, 10 insertions(+), 3 deletions(-)
 

Patch has been applied, thanks.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH] stk: Add busy error for the display text command

2010-11-29 Thread andrzej zaborowski
Hi Guillaume,

On 25 November 2010 09:44, Lucas, GuillaumeX guillaumex.lu...@intel.com wrote:
 From: Guillaume Lucas guillaumex.lu...@intel.com

 According to the sequence 1.2 of the ETSI TS 102 384 a busy
 screen error type must be returned for the display text
 proactive command when the message is not urgent and if the
 ME is not able to display the text.
 ---
  doc/stk-api.txt |    1 +
  src/stk.c       |    7 +++
  src/stkagent.c  |   12 ++--
  src/stkagent.h  |    1 +
  4 files changed, 19 insertions(+), 2 deletions(-)

 diff --git a/doc/stk-api.txt b/doc/stk-api.txt
 index b9ca592..79daee6 100644
 --- a/doc/stk-api.txt
 +++ b/doc/stk-api.txt
 @@ -116,6 +116,7 @@ Methods             byte RequestSelection(string title, 
 byte icon_id,
                        cleared prior to the display of this text.

                        Possible Errors: [service].Error.SimToolkit.GoBack
 +                                        [service].Error.SimToolkit.Busy

                        Implementation notes:

 diff --git a/src/stk.c b/src/stk.c
 index ac2e646..e6b78a4 100644
 --- a/src/stk.c
 +++ b/src/stk.c
 @@ -1250,6 +1250,10 @@ static void display_text_cb(enum stk_agent_result 
 result, void *user_data)
                        STK_RESULT_TYPE_NO_RESPONSE : STK_RESULT_TYPE_SUCCESS);
                break;

 +       case STK_AGENT_RESULT_BUSY:
 +               send_simple_response(stk, STK_RESULT_TYPE_TERMINAL_BUSY);
 +               break;
 +

According to TS 102.223 on Screen Busy we also need to append a
additional info field in the Terminal Busy response with a 1-byte
value 01 (screen is busy).

Denis on IRC also wondered if this response should be allowed when the
message is flagged urgent.

        case STK_AGENT_RESULT_TERMINATE:
        default:
                send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
 @@ -1363,6 +1367,7 @@ static void request_confirmation_cb(enum 
 stk_agent_result result,
                break;

        case STK_AGENT_RESULT_TERMINATE:
 +       default:
                send_simple_response(stk, STK_RESULT_TYPE_USER_TERMINATED);
                break;

Most of the other commands also allow a Terminal busy response in
table 6.1 in section 6.11, without giving a specific additional info
value.  I think it would be ok to treat them the same way as
DisplayText and supply the screen is busy value, what do you think?

Best regards
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono