Re: [PATCH] Radio-setting: Add GSM and UMTS band

2016-04-26 Thread Denis Kenzior

Hi Antara,

On 04/26/2016 08:38 AM, Antara Borwankar wrote:

From: Antara Borwankar 

To add GSM band and UMTS band to persitent data
---
  src/radio-settings.c | 100 ++-
  1 file changed, 68 insertions(+), 32 deletions(-)



Applied, thanks.

Regards,
-Denis

___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH v2 1/2] configure: Bump glib dependecy to 2.32

2016-04-26 Thread Denis Kenzior

Hi Daniel,

On 04/26/2016 02:39 AM, Daniel Wagner wrote:

On 04/26/2016 08:19 AM, John Ernberg wrote:


-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
-   AC_MSG_ERROR(GLib >= 2.28 is required))
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
+   AC_MSG_ERROR(GLib >= 2.32 is required))


Some time ago we had a discussion on the ConnMan mailing list doing the
same thing. IIRC, 2.32 has a larger memory footprint compared to 2.28.
That was an issue back than. Don't know if that is still relevant.



Yes, that is a good point.  Still, I don't think it makes sense to try 
and depend on a version from 2011.  Newer glib versions are even worse.


Our goal is to migrate oFono away from glib and onto ell, which is the 
proper solution to the footprint problem long-term.


Regards,
-Denis

___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH v2 0/2] [RFC] Clean up undefined function pointer casts

2016-04-26 Thread Denis Kenzior

Hi John,

On 04/26/2016 01:19 AM, John Ernberg wrote:

From: John Ernberg 

v2: Bump glib requirement to version 2.32 to gain access to g_queue_free_full,
this saves using a wrapper function to clean up the queue in the stk.

John Ernberg (2):
   configure: Bump glib dependecy to 2.32
   stk: clean up undefined function pointer casts

  configure.ac | 4 ++--
  src/stk.c| 6 ++
  2 files changed, 4 insertions(+), 6 deletions(-)



Both applied, thanks.

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


Re: [PATCH v2 1/2] configure: Bump glib dependecy to 2.32

2016-04-26 Thread Daniel Wagner
On 04/26/2016 08:19 AM, John Ernberg wrote:

> -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
> - AC_MSG_ERROR(GLib >= 2.28 is required))
> +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
> + AC_MSG_ERROR(GLib >= 2.32 is required))

Some time ago we had a discussion on the ConnMan mailing list doing the
same thing. IIRC, 2.32 has a larger memory footprint compared to 2.28.
That was an issue back than. Don't know if that is still relevant.

cheers,
daniel
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


[PATCH v2 2/2] stk: clean up undefined function pointer casts

2016-04-26 Thread John Ernberg
From: John Ernberg 

---
 src/stk.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/stk.c b/src/stk.c
index 01c95b5..373f696 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2315,8 +2315,7 @@ static gboolean handle_command_refresh(const struct 
stk_command *cmd,
break;
}
 
-   g_slist_foreach(file_list, (GFunc) g_free, NULL);
-   g_slist_free(file_list);
+   g_slist_free_full(file_list, g_free);
 
return FALSE;
}
@@ -3163,8 +3162,7 @@ static void stk_unregister(struct ofono_atom *atom)
stk->main_menu = NULL;
}
 
-   g_queue_foreach(stk->envelope_q, (GFunc) g_free, NULL);
-   g_queue_free(stk->envelope_q);
+   g_queue_free_full(stk->envelope_q, g_free);
 
ofono_modem_remove_interface(modem, OFONO_STK_INTERFACE);
g_dbus_unregister_interface(conn, path, OFONO_STK_INTERFACE);
-- 
1.9.1
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


[PATCH v2 1/2] configure: Bump glib dependecy to 2.32

2016-04-26 Thread John Ernberg
From: John Ernberg 

Needed to support g_queue_free_full
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f6253e5..88ac6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,8 +63,8 @@ AC_CHECK_FUNC(signalfd, dummy=yes,
 AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))
 
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
-   AC_MSG_ERROR(GLib >= 2.28 is required))
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
+   AC_MSG_ERROR(GLib >= 2.32 is required))
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
-- 
1.9.1
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


[PATCH v2 0/2] [RFC] Clean up undefined function pointer casts

2016-04-26 Thread John Ernberg
From: John Ernberg 

v2: Bump glib requirement to version 2.32 to gain access to g_queue_free_full,
this saves using a wrapper function to clean up the queue in the stk.

John Ernberg (2):
  configure: Bump glib dependecy to 2.32
  stk: clean up undefined function pointer casts

 configure.ac | 4 ++--
 src/stk.c| 6 ++
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
1.9.1
___
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono


Re: [PATCH 4/5] push notification: track and clean up atom watches

2016-04-26 Thread John Ernberg
Hi Denis,

On 04/25/2016 08:56 PM, Denis Kenzior wrote:
> Hi John,
>
> On 04/25/2016 02:02 AM, John Ernberg wrote:
>> Hi Denis,
>>
>> On 04/22/2016 09:43 PM, Denis Kenzior wrote:
>>> Hi John,
>>>
>>> On 04/22/2016 08:07 AM, John Ernberg wrote:
 From: John Ernberg 

 Prevents glib from causing SIGFPE during certain circumstances of 
 modem
 removal.
>>>
>>> Do you have a stack trace handy?
>> I have one for the bluez5 hfp plugin which was recreated by stopping
>> oFono, the rest of the changes were added as a sort of safeguard.
>>
>> Stack trace:
>>
>> (gdb)
>> (gdb) bt
>> #0  0x76d88748 in raise (sig=8)
>>   at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
>> #1  0x76e8bcac in __aeabi_ldiv0 ()
>>   at
>> /opt/yocto/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libgcc/config/arm/lib1funcs.S:1331
>>  
>>
>> #2  0x76e0e1b4 in g_hash_table_lookup_node (hash_return=> pointer>,
>>   key=0xe17418, hash_table=0xe10e38)
>>   at 
>> /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/ghash.c:371
>> #3  g_hash_table_lookup (hash_table=0xe10e38, key=key@entry=0xe17418)
>>   at 
>> /usr/src/debug/glib-2.0/1_2.38.2-r0/glib-2.38.2/glib/ghash.c:1076
>> #4  0x0008ccb8 in sim_watch (atom=, cond=,
>>   data=0xe18f88) at plugins/hfp_ag_bluez5.c:260
>> #5  0x000910d0 in call_watches (atom=atom@entry=0xe17540,
>>   cond=cond@entry=OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) at
>> src/modem.c:261
>> #6  0x00091de0 in __ofono_atom_unregister (atom=atom@entry=0xe17540)
>>   at src/modem.c:281
>> #7  0x00091e54 in flush_atoms (
>>   new_state=new_state@entry=MODEM_STATE_POWER_OFF, modem=0xe18f88)
>>   at src/modem.c:430
>> #8  0x00091f60 in modem_change_state (modem=0xe18f88,
>>   new_state=MODEM_STATE_POWER_OFF) at src/modem.c:511
>> #9  0x000921c8 in set_powered (modem=modem@entry=0xe18f88,
>>   powered=powered@entry=0) at src/modem.c:882
>> #10 0x00092990 in modem_unregister (modem=0xe18f88) at src/modem.c:2040
>> #11 0x00093cec in ofono_modem_driver_unregister (d=0x112168)
>>   at src/modem.c:2176
>
> What calls this?  The corresponding exit function in question is not 
> present in the stack trace.
The modem plugins call it during their exit. Since the plugins are all 
calling exit the drivers gets unregistered.
>
>> #12 0x00091040 in __ofono_plugin_cleanup () at src/plugin.c:197
>> #13 0x00014e24 in main (argc=85540, argv=0x7ee60d44) at src/main.c:255
>>
>> oFono debug log:
>>
>> ofonod[5126]: src/plugin.c:__ofono_plugin_cleanup()
>> ofonod[5126]: plugins/push-notification.c:push_notification_exit()
>> ofonod[5126]: plugins/smart-messaging.c:smart_messaging_exit()
>> ofonod[5126]: plugins/bluez5.c:bt_unregister_profile() Bluetooth:
>> Unregistering profile /bluetooth/profile/dun_gw
>> ofonod[5126]: plugins/bluez5.c:bt_unregister_profile() Bluetooth:
>> Unregistering profile /bluetooth/profile/hfp_hf
>> ofonod[5126]:
>> src/handsfree-audio.c:ofono_handsfree_card_driver_unregister() driver:
>> 0x113994
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1139a4, name: hfp
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x11391c, name: ublox
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1138b4, name: quectel
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113854, name: he910
>> ofonod[5126]:
>> src/private-network.c:ofono_private_network_driver_unregister() driver:
>> 0x113828, name: ConnMan Private Network
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1137d0, name: sim900
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113778, name: samsung
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113720, name: speedupcdma
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1136c0, name: speedup
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113668, name: alcatel
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113600, name: icera
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1135a8, name: linktop
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113550, name: nokiacdma
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1134f8, name: nokia
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1134a0, name: tc65
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113408, name: ste
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1133a0, name: ifx
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113348, name: palmpre
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x1132e8, name: novatel
>> ofonod[5126]: src/modem.c:ofono_modem_driver_unregister() driver:
>> 0x113290, name: sierra
>> ofonod[5126]: