Re: build fail with --disable-atmodem

2011-06-01 Thread Aki Niemi
On Wed, 2011-06-01 at 05:57 +, ext 오인호 wrote:
 i tried to compile with --disable-atmodem, an error occurred.
 
 please help what to do. (i want only isimodem)
 
 - without --disable-atmodem, compile success.

I sent a patch on 24.3. that fixes the issue. Gatchat is now required to
build core, but gets disabled along with atmodem.

Maybe Marcel or Denis could take a look at that patch (reattaching it
here).

Cheers,
Aki
From 1920b813a4db120f0d6692e9d4d86f3fe313a263 Mon Sep 17 00:00:00 2001
From: Aki Niemi aki.ni...@nokia.com
Date: Thu, 24 Mar 2011 17:30:12 +0200
Subject: [PATCH] build: Add gatchat to core sources
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Otherwise, --disable-atmodem breaks build.
---
 Makefile.am |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index b0cbcd7..39d8962 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -154,8 +154,7 @@ endif
 
 if ATMODEM
 builtin_modules += atmodem
-builtin_sources += $(gatchat_sources) \
-drivers/atmodem/atmodem.h \
+builtin_sources += drivers/atmodem/atmodem.h \
 drivers/atmodem/atmodem.c \
 drivers/atmodem/call-settings.c \
 drivers/atmodem/sms.c \
@@ -365,9 +364,9 @@ builtin_sources += plugins/push-notification.c
 
 sbin_PROGRAMS = src/ofonod
 
-src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) src/ofono.ver \
-			src/main.c src/ofono.h src/log.c src/plugin.c \
-			src/modem.c src/common.h src/common.c \
+src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) $(gatchat_sources) \
+			src/ofono.ver src/main.c src/ofono.h src/log.c \
+			src/plugin.c src/modem.c src/common.h src/common.c \
 			src/manager.c src/dbus.c src/util.h src/util.c \
 			src/network.c src/voicecall.c src/ussd.c src/sms.c \
 			src/call-settings.c src/call-forwarding.c \
-- 
1.7.1

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


[PATCH V3 0/4] Add dial support for HFP emulator

2011-06-01 Thread Frédéric Danis
Create a generic dial function that can be called by DBus or emulator
Add support of ATD and AT+BLDN
Save last dialed number in /var/lib/ofono/modem/voicecall to be used
by AT+BLDN

Frédéric Danis (4):
  voicecall: create generic dial function
  voicecall: add ATD support for HFP emulator
  voicecall: save last dialed number
  voicecall: add +BLDN support for HFP emulator

 src/voicecall.c |  270 +--
 1 files changed, 243 insertions(+), 27 deletions(-)

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


[PATCH V3 3/4] voicecall: save last dialed number

2011-06-01 Thread Frédéric Danis
---
 src/voicecall.c |   45 +
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/src/voicecall.c b/src/voicecall.c
index a6ccddd..f176e25 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -37,11 +37,15 @@
 #include common.h
 #include simutil.h
 #include smsutil.h
+#include storage.h
 
 #define MAX_VOICE_CALLS 16
 
 #define VOICECALL_FLAG_SIM_ECC_READY 0x1
 
+#define SETTINGS_STORE voicecall
+#define SETTINGS_GROUP Settings
+
 GSList *g_drivers = NULL;
 
 struct multi_release {
@@ -72,6 +76,8 @@ struct ofono_voicecall {
guint tone_source;
unsigned int hfp_watch;
struct ofono_emulator *pending_em;
+   GKeyFile *settings;
+   char *imsi;
 };
 
 struct voicecall {
@@ -1478,6 +1484,12 @@ static int voicecall_dial(struct ofono_voicecall *vc, 
const char *number,
 
vc-driver-dial(vc, ph, clir, cb, vc);
 
+   if (vc-settings) {
+   g_key_file_set_string(vc-settings, SETTINGS_GROUP,
+   Number, number);
+   storage_sync(vc-imsi, SETTINGS_STORE, vc-settings);
+   }
+
return 0;
 }
 
@@ -2466,6 +2478,33 @@ static void emulator_hfp_unregister(struct ofono_atom 
*atom)
__ofono_modem_remove_atom_watch(modem, vc-hfp_watch);
 }
 
+static void voicecall_load_settings(struct ofono_voicecall *vc)
+{
+   const char *imsi;
+
+   imsi = ofono_sim_get_imsi(vc-sim);
+   if (imsi == NULL)
+   return;
+
+   vc-settings = storage_open(imsi, SETTINGS_STORE);
+
+   if (vc-settings == NULL)
+   return;
+
+   vc-imsi = g_strdup(imsi);
+}
+
+static void voicecall_close_settings(struct ofono_voicecall *vc)
+{
+   if (vc-settings) {
+   storage_close(vc-imsi, SETTINGS_STORE, vc-settings, TRUE);
+
+   g_free(vc-imsi);
+   vc-imsi = NULL;
+   vc-settings = NULL;
+   }
+}
+
 static void voicecall_unregister(struct ofono_atom *atom)
 {
DBusConnection *conn = ofono_dbus_get_connection();
@@ -2476,6 +2515,8 @@ static void voicecall_unregister(struct ofono_atom *atom)
 
emulator_hfp_unregister(atom);
 
+   voicecall_close_settings(vc);
+
if (vc-sim_state_watch) {
ofono_sim_remove_state_watch(vc-sim, vc-sim_state_watch);
vc-sim_state_watch = 0;
@@ -2615,6 +2656,9 @@ static void sim_state_watch(enum ofono_sim_state 
new_state, void *user)
 
free_sim_ecc_numbers(vc, FALSE);
set_new_ecc(vc);
+   case OFONO_SIM_STATE_READY:
+   voicecall_load_settings(vc);
+   break;
default:
break;
}
@@ -2627,6 +2671,7 @@ static void sim_watch(struct ofono_atom *atom,
struct ofono_sim *sim = __ofono_atom_get_data(atom);
 
if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) {
+   voicecall_close_settings(vc);
vc-sim_state_watch = 0;
vc-sim = NULL;
return;
-- 
1.7.1

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