[PATCH 1/6] ppp: Fix incorrect packet length for little-endian

2010-06-23 Thread Zhenhua Zhang
packet-length is in TCP/IP network byte order. It needs to call ntohs() to convert to host byte order, which is little-endian. --- gatchat/ppp_ipcp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gatchat/ppp_ipcp.c b/gatchat/ppp_ipcp.c index a1eacdf..0b3c381 100644 ---

[PATCH 3/6] atmodem: Fix GAtPPPConnectFunc interface change

2010-06-23 Thread Zhenhua Zhang
--- drivers/atmodem/gprs-context.c |5 +++-- gatchat/gsmdial.c |5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c index 4ddf88e..fea80b0 100644 --- a/drivers/atmodem/gprs-context.c +++

[PATCH 2/6] gatppp: Add PPP server extension

2010-06-23 Thread Zhenhua Zhang
1. Add interface to set PPP server info by g_at_ppp_set_server_info. 2. Pass local and peer address through IPCP handshaking. --- gatchat/gatppp.c | 13 +++- gatchat/gatppp.h |7 ++- gatchat/ppp.h |6 ++- gatchat/ppp_ipcp.c | 183

[PATCH 6/6] gsmdial: Configure network interface for PPP

2010-06-23 Thread Zhenhua Zhang
--- gatchat/gsmdial.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c index a69a610..59f1a5c 100644 --- a/gatchat/gsmdial.c +++ b/gatchat/gsmdial.c @@ -38,6 +38,8 @@ #include gattty.h #include gatppp.h

[PATCH] ppp: Fix leak in pppcp_send_protocol_reject

2010-06-21 Thread Zhenhua Zhang
Free the reject pppcp packet after ppp_transmit. --- gatchat/ppp_cp.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/gatchat/ppp_cp.c b/gatchat/ppp_cp.c index bade6bb..b0a18aa 100644 --- a/gatchat/ppp_cp.c +++ b/gatchat/ppp_cp.c @@ -938,6 +938,8 @@ void

[PATCH 1/5] gatppp: Add PPP server extension

2010-06-21 Thread Zhenhua Zhang
1. Add interface to set PPP server info by g_at_ppp_set_server_info. 2. Pass local and peer address through IPCP handshaking. --- gatchat/gatppp.c | 13 +++- gatchat/gatppp.h |7 ++- gatchat/ppp.h |6 ++- gatchat/ppp_ipcp.c | 177

[PATCH 3/5] test-server: Add PPP server support

2010-06-21 Thread Zhenhua Zhang
So that gsmdial and wvdial could talk to test-server and establish PPP connection. --- gatchat/test-server.c | 131 ++--- 1 files changed, 123 insertions(+), 8 deletions(-) diff --git a/gatchat/test-server.c b/gatchat/test-server.c index

[PATCH 4/5] test-server: Configure network interface

2010-06-21 Thread Zhenhua Zhang
Require ROOT priviledge to: 1. Run external command to configure and bring up network interface. 2. Enable kernel IP forwarding. --- gatchat/test-server.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/gatchat/test-server.c

[PATCH 2/5] atmodem: Fix GAtPPPConnectFunc interface change

2010-06-21 Thread Zhenhua Zhang
--- drivers/atmodem/gprs-context.c |5 +++-- gatchat/gsmdial.c |5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c index 4ddf88e..fea80b0 100644 --- a/drivers/atmodem/gprs-context.c +++

[PATCH 5/5] gsmdial: Configure network interface for PPP

2010-06-21 Thread Zhenhua Zhang
--- gatchat/gsmdial.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c index a69a610..59f1a5c 100644 --- a/gatchat/gsmdial.c +++ b/gatchat/gsmdial.c @@ -38,6 +38,8 @@ #include gattty.h #include gatppp.h

[PATCH] TODO: PPP server support owner

2010-06-20 Thread Zhenhua Zhang
--- TODO |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/TODO b/TODO index 4a12b6f..95a9fcc 100644 --- a/TODO +++ b/TODO @@ -220,6 +220,7 @@ GPRS Priority: High Complexity: C2 + Owner: Zhenhua Zhang zhenhua.zh...@intel.com - On-demand SOCKS5 proxy support

[PATCH 00/11] Add PPP server support

2010-06-11 Thread Zhenhua Zhang
The patches extend GAtPPP to support PPP server role, so that you use gsmdial or wvdial to talk to test-server (Patch 6/11 adds PPP server support in test-server). If you're interesting to try it, connect two machines by BlueZ serial proxy. Server side: 1. Run ./test-server by 'root'. It will

[PATCH 02/11] gatserver: Check for disconnection when resuming

2010-06-11 Thread Zhenhua Zhang
If the internal GAtIO is no longer valid, treat it as if our channel was disconnected. --- gatchat/gatserver.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 6bb9244..3fa26a0 100644 --- a/gatchat/gatserver.c +++

[PATCH 04/11] atmodem: Fix GAtPPPConnectFunc interface change

2010-06-11 Thread Zhenhua Zhang
--- drivers/atmodem/gprs-context.c |5 +++-- gatchat/gsmdial.c |5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c index 4ddf88e..fea80b0 100644 --- a/drivers/atmodem/gprs-context.c +++

[PATCH 05/11] test-server: Fix GIOChannel leak in create_tty

2010-06-11 Thread Zhenhua Zhang
Remove client_io and unref server_io after creating GAtServer. --- gatchat/test-server.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gatchat/test-server.c b/gatchat/test-server.c index 74ddd4d..5c1cfa4 100644 --- a/gatchat/test-server.c +++

[PATCH 06/11] test-server: Add PPP server support

2010-06-11 Thread Zhenhua Zhang
So that gsmdial and wvdial could talk to test-server and establish PPP connection. --- gatchat/test-server.c | 131 ++--- 1 files changed, 123 insertions(+), 8 deletions(-) diff --git a/gatchat/test-server.c b/gatchat/test-server.c index

[PATCH 11/11] gsmdial: Delay ppp_unref after IO processing

2010-06-11 Thread Zhenhua Zhang
--- gatchat/gsmdial.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c index 59f1a5c..d6cacc5 100644 --- a/gatchat/gsmdial.c +++ b/gatchat/gsmdial.c @@ -71,6 +71,7 @@ enum state { static int state = 0; static int

[PATCH 10/11] test-server: Delay ppp_unref after IO processing

2010-06-11 Thread Zhenhua Zhang
The ppp_disconnect is invoked during ppp receives LCP packet and enter PPP dead phase. It's not good to stop the IO processing in disconnect function. Delay the ppp_unref after packet is processed. --- gatchat/test-server.c | 19 +-- 1 files changed, 17 insertions(+), 2

[PATCH] Fix return empty currency for huawei EM770W

2010-06-07 Thread Zhenhua Zhang
Huawei EM770W responses empty +CPUC: \r\n. So return empty currency and zero ppuval. --- drivers/atmodem/call-meter.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/atmodem/call-meter.c b/drivers/atmodem/call-meter.c index 0553d78..74528ee 100644 ---

[PATCH 01/16] Refactor: use g_slist_find_custom for watchlist

2010-05-13 Thread Zhenhua Zhang
Use g_slist_find_custom to search watchlist. Add method to remove all watch items without freeing ofono_watchlist itself. --- src/ofono.h |1 + src/watch.c | 75 ++ 2 files changed, 40 insertions(+), 36 deletions(-) diff --git

[PATCH 02/16] emulator: Add ofono_emulator and emulator

2010-05-13 Thread Zhenhua Zhang
It implements the emulator manager to create or destroy emulators. The type of emulator can be DUN, HFP AG or SPP. --- Makefile.am|6 +- include/dbus.h |2 + include/emulator.h | 41 ++ src/emulator.c | 355

[PATCH 04/16] emulator: Add ofono_emulator get_properties method

2010-05-13 Thread Zhenhua Zhang
To list the object path of all available emulators. --- src/emulator.c | 52 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index f9f7108..e6ffb78 100644 --- a/src/emulator.c +++

[PATCH 03/16] emulator: Add status_watches and notify status

2010-05-13 Thread Zhenhua Zhang
Add watchlist for ofono_emulator to notify the status change when an emulator create, destroy or other status. --- src/emulator.c | 73 src/ofono.h| 21 2 files changed, 94 insertions(+), 0 deletions(-) diff --git

[PATCH 08/16] emulator: Add ofono_emulator in phonesim

2010-05-13 Thread Zhenhua Zhang
--- plugins/phonesim.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/plugins/phonesim.c b/plugins/phonesim.c index d0cd7f3..49d3af3 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -57,6 +57,7 @@ #include ofono/voicecall.h #include ofono/gprs.h

[PATCH 11/16] emulator: Add voicecall dialing case

2010-05-13 Thread Zhenhua Zhang
--- src/voicecall.c | 208 ++- 1 files changed, 207 insertions(+), 1 deletions(-) diff --git a/src/voicecall.c b/src/voicecall.c index b2bb41f..1b6a6c7 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -36,6 +36,7 @@ #include common.h

[PATCH 09/16] emulator: Add interface to send AT result

2010-05-13 Thread Zhenhua Zhang
--- src/emulator.c | 20 src/ofono.h|7 +++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index 5ad0d78..e66e9ca 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -294,6 +294,26 @@ static gboolean

[PATCH 06/16] emulator: Add emulator get_properties method

2010-05-13 Thread Zhenhua Zhang
--- src/emulator.c | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index bed0f46..f1cb9ef 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -212,7 +212,40 @@ static DBusMessage

[PATCH 12/16] emulator: Add test case for ofono emulator

2010-05-13 Thread Zhenhua Zhang
--- Makefile.am |6 +- gatchat/test-emulator.c | 616 +++ 2 files changed, 621 insertions(+), 1 deletions(-) create mode 100644 gatchat/test-emulator.c diff --git a/Makefile.am b/Makefile.am index 707c622..12cdd3e 100644 ---

[PATCH 16/16] emulator: Add doc/emulator-api.txt

2010-05-13 Thread Zhenhua Zhang
Add doc for emulator interface. --- doc/emulator-api.txt | 32 1 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 doc/emulator-api.txt diff --git a/doc/emulator-api.txt b/doc/emulator-api.txt new file mode 100644 index 000..42af66d ---

[PATCH 14/16] emulator: Add destroy-emulator script

2010-05-13 Thread Zhenhua Zhang
To remove all emulators in current modem --- test/destroy-emulator | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) create mode 100755 test/destroy-emulator diff --git a/test/destroy-emulator b/test/destroy-emulator new file mode 100755 index 000..3b8ecfb ---

[PATCH 13/16] emulator: Add Emulators in list-modems script

2010-05-13 Thread Zhenhua Zhang
--- test/list-modems |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/test/list-modems b/test/list-modems index 7425c8d..a159282 100755 --- a/test/list-modems +++ b/test/list-modems @@ -45,7 +45,8 @@ for path in properties[Modems]:

[PATCH 15/16] emulator: Add doc/emulatormanager-api.txt

2010-05-13 Thread Zhenhua Zhang
Add doc for emulator manager interface --- doc/emulatormanager-api.txt | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) create mode 100644 doc/emulatormanager-api.txt diff --git a/doc/emulatormanager-api.txt b/doc/emulatormanager-api.txt new

[PATCH] Add telephony_str_to_error to decode error code

2010-05-13 Thread Zhenhua Zhang
Use to decode a final error string to error code. --- drivers/atmodem/atutil.c |7 +++ src/common.c | 25 + src/common.h |1 + 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/atmodem/atutil.c

Re: [PATCH] Add send_method_call to g_dbus

2010-04-20 Thread Zhenhua Zhang
Hi Valo, On 04/20/2010 05:32 PM, Kalle Valo wrote: Gustavo F. Padovangust...@padovan.org writes: Puting send_method_call and send_method_call_with_reply on g_dbus will avoid some code duplication and will make things easier mainly for the Bluetooth plugins (HFP, DUN, SAP) inside oFono.

Re: [PATCH] Fix Let data device be optional for mbm driver

2010-04-18 Thread Zhenhua Zhang
/modem.c:unregister_property() property 0x8a57ee0 Regards Marcel ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono From 44c8aba6261c95258c3b8918bbc321b1a3512d5f Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang zhenhua.zh...@intel.com Date

[PATCH] Fix Let data device be optional for mbm driver

2010-04-15 Thread Zhenhua Zhang
Dell 5530 modem has no data device port. So data device should be optional in mbm drvier. --- plugins/mbm.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/plugins/mbm.c b/plugins/mbm.c index 439d3b9..aeea81d 100644 --- a/plugins/mbm.c +++

Re: calypso does not power up from 0.17

2010-04-14 Thread Zhenhua Zhang
Hi, On 04/14/2010 04:52 PM, Nicola Mfb wrote: Hi! 0.16 is the last release that works (well) on the openmoko freerunner while from 0.17 to 0.20 I have: r...@om-gta02 ~ $ dbus-send --system --dest=org.ofono --print-reply /freerunner org.ofono.Modem.SetProperty string:Powered

Re: Is there GPRS API doc

2010-04-13 Thread Zhenhua Zhang
Hi Ye, On 04/13/2010 04:38 PM, Huang, Ye wrote: hi , I can find ofono have supported gprs function in ofono v0.20 by reading overview.txt and source code . but i can not find api doc about gprs. Could update the latest API doc on http://www.ofono.org? The D-Bus API is described in

[PATCH 0/8] Prototype to integrate gatserver with oFono

2010-04-13 Thread Zhenhua Zhang
These 8 patches are prototypes to integrate gatserver with oFono core: 1. Move watch_list into struct ofono_atom so that each component can be watched in an unique way. 2. Add src/emulator.c and dbus interface to create emulator. 3. Add at emulator plugin to watch call status and handle dial

[PATCH 1/8] Add signal watches for atom

2010-04-13 Thread Zhenhua Zhang
It replaces watch lists dispersed in each component. So that each component like Voicecall, SMS can be watched in unique way. --- src/modem.c | 55 +++ src/ofono.h | 19 +++ 2 files changed, 74 insertions(+), 0 deletions(-)

[PATCH 2/8] Refactor netreg watchlist with atom watchlist

2010-04-13 Thread Zhenhua Zhang
--- src/network.c | 32 +++- 1 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/network.c b/src/network.c index b2e5821..c975c7d 100644 --- a/src/network.c +++ b/src/network.c @@ -79,7 +79,6 @@ struct ofono_netreg { struct ofono_sim *sim;

[PATCH 3/8] Refactor sim watchlist with atom watchlist

2010-04-13 Thread Zhenhua Zhang
--- src/sim.c | 30 ++ 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/sim.c b/src/sim.c index f64c7d4..b9e6b4a 100644 --- a/src/sim.c +++ b/src/sim.c @@ -89,7 +89,6 @@ struct ofono_sim { unsigned char efli_length; enum

[PATCH 5/8] Add emulator dialing call support

2010-04-13 Thread Zhenhua Zhang
--- include/emulator.h |4 +- src/emulator.c | 110 2 files changed, 112 insertions(+), 2 deletions(-) diff --git a/include/emulator.h b/include/emulator.h index 3d07e36..0412f5a 100644 --- a/include/emulator.h +++

[PATCH 6/8] Add prototype to watch voicecall

2010-04-13 Thread Zhenhua Zhang
--- src/emulator.c | 77 +++ src/ofono.h |4 +++ src/voicecall.c | 33 +++ 3 files changed, 114 insertions(+), 0 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index e21d826..4b4591f 100644 ---

[PATCH 7/8] Add atemulator plugin

2010-04-13 Thread Zhenhua Zhang
--- Makefile.am |3 + plugins/atemulator.c | 299 ++ 2 files changed, 302 insertions(+), 0 deletions(-) create mode 100644 plugins/atemulator.c diff --git a/Makefile.am b/Makefile.am index eda7ad6..3abd577 100644 --- a/Makefile.am

[PATCH 8/8] Add emulator interface for phonesim

2010-04-13 Thread Zhenhua Zhang
--- plugins/phonesim.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/plugins/phonesim.c b/plugins/phonesim.c index ca12cf2..15dabca 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -56,6 +56,7 @@ #include ofono/voicecall.h #include ofono/gprs.h #include

[PATCH 3/7] Add implementation for ATE and other basic command

2010-03-31 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 162 +- 1 files changed, 158 insertions(+), 4 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 7d5c3c7..5206a12 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -260,10 +260,10 @@

[PATCH 1/7] Fix Add check for return modem to avoid crash

2010-03-31 Thread Zhenhua Zhang
--- plugins/modemconf.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/plugins/modemconf.c b/plugins/modemconf.c index cf0ee8b..e30fce6 100644 --- a/plugins/modemconf.c +++ b/plugins/modemconf.c @@ -138,6 +138,10 @@ static struct ofono_modem *create_modem(GKeyFile

[PATCH 5/7] Fix echo command back even if don't process it

2010-03-31 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 4796b71..a47d46c 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -1050,19 +1050,19 @@ static gboolean

[PATCH 4/7] Add Repeat last command support

2010-03-31 Thread Zhenhua Zhang
--- gatchat/gatserver.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 5206a12..4796b71 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -996,8 +996,13 @@ static void new_bytes(GAtServer *p)

[PATCH 7/7] Add test implementation for CPBS

2010-03-31 Thread Zhenhua Zhang
--- gatchat/test-server.c | 24 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/gatchat/test-server.c b/gatchat/test-server.c index 916198b..f170d88 100644 --- a/gatchat/test-server.c +++ b/gatchat/test-server.c @@ -361,6 +361,29 @@ static void

[PATCH 1/2] Add server send result code

2010-03-30 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 141 +++ gatchat/gatserver.h | 17 ++ 2 files changed, 137 insertions(+), 21 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index c75fbf5..5f21766 100644 --- a/gatchat/gatserver.c +++

[PATCH 2/2] Add flag to parse one command line at once

2010-03-30 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 5f21766..ce78857 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -119,6 +119,7 @@ struct _GAtServer { GAtServerResult

[PATCH 2/3] Add server send result code

2010-03-29 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 98 --- gatchat/gatserver.h | 17 + 2 files changed, 102 insertions(+), 13 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 07999a8..cad9d91 100644 --- a/gatchat/gatserver.c +++

[PATCH 3/3] Add flag to parse one command line at once

2010-03-29 Thread Zhenhua Zhang
--- gatchat/gatserver.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index cad9d91..251c3b8 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -116,6 +116,7 @@ struct _GAtServer { gboolean destroyed;

[PATCH 0/5] Prototype to handle asynchronized callback

2010-03-25 Thread Zhenhua Zhang
Hi, These patches are the prototype to handle the asynchronized callback for AtServer. During the callback function execution period, GAtServer waits for its result and then process next command. At the same time, the server is capable to accept new data comes from the client side and cache them

[PATCH 4/5] Add register S3-S5 basic command callbacks

2010-03-25 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 162 +++ 1 files changed, 162 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 5d2a036..9d4d221 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -294,6 +294,159 @@

[PATCH 5/5] Add register ATE and other basic command callbacks

2010-03-25 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 195 +- 1 files changed, 191 insertions(+), 4 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 9d4d221..06b5751 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -302,10 +302,10 @@

Re: [PATCH 08/10] Fix do not emit error if extended error has emitted

2010-03-23 Thread Zhenhua Zhang
Hi Denis, On 03/23/2010 02:27 AM, Denis Kenzior wrote: Hi Zhenhua, --- gatchat/gatserver.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 1ffc2c3..9683fa3 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c

[PATCH] Update patch for parsing basic command

2010-03-23 Thread Zhenhua Zhang
Rebase with latest upstream and resent it. ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono

[PATCH] Add basic command parsing

2010-03-23 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 110 ++- 1 files changed, 109 insertions(+), 1 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 6579b38..c207bd8 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -308,9 +308,117 @@

[PATCH 04/10] Add server at command data structure

2010-03-19 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 27 +++ gatchat/gatserver.h | 22 ++ 2 files changed, 49 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 0658553..6173765 100644 --- a/gatchat/gatserver.c +++

[PATCH 02/10] Add basic command parsing

2010-03-19 Thread Zhenhua Zhang
According to V.250 5.3.1, the basic command is either a single character or the '' followed by a single character. --- gatchat/gatserver.c | 99 +- 1 files changed, 97 insertions(+), 2 deletions(-) diff --git a/gatchat/gatserver.c

[PATCH 03/10] Add extended command parsing

2010-03-19 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 65 +- 1 files changed, 63 insertions(+), 2 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 2c53d84..0658553 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -197,16 +197,77 @@

[PATCH 07/10] Add G_AT_SERVER_RESULT_EXT_ERROR

2010-03-19 Thread Zhenhua Zhang
--- gatchat/gatserver.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.h b/gatchat/gatserver.h index 5e9eb62..6fb78bd 100644 --- a/gatchat/gatserver.h +++ b/gatchat/gatserver.h @@ -43,6 +43,7 @@ enum _GAtServerResult {

Add parse framework for GAtServer

2010-03-19 Thread Zhenhua Zhang
Update patches based on comments and rebase with latest git. ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono

[PATCH 09/10] Refactor g_at_server_send_final

2010-03-19 Thread Zhenhua Zhang
Cache the result code as last_result from at command callback. And flush out the last result code when the whole command line is parsed, except the last result is an extended error code, like +CMS ERROR or +CME ERROR. --- gatchat/gatserver.c | 55

[PATCH 01/10] Add framework of server parser

2010-03-19 Thread Zhenhua Zhang
a. The parser fetch and parse one command per loop. The prefix is the command prefix without parameter. For example, the prefix of AT+CLIP=1 is +CLIP. b. Search registered notification node in command_list. Invoke the callback if found. c. Termiate the execution if the result is an error.

[PATCH 06/10] Add g_at_server_register and unregister callback

2010-03-19 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 48 gatchat/gatserver.h |6 ++ 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 3f60f1c..1ffc2c3 100644 --- a/gatchat/gatserver.c +++

[PATCH 10/10] Add utilities to send server response

2010-03-19 Thread Zhenhua Zhang
The server response could be either result code or information text. Result code types: final, intermediate and unsolicited. Information text: one or multiple lines of text. --- gatchat/gatserver.c | 42 ++ gatchat/gatserver.h | 17 + 2

[PATCH 05/10] Add notify at command callback

2010-03-19 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 48 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 6173765..3f60f1c 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -227,9 +227,57 @@ static

[PATCH 08/10] Fix do not emit error if extended error has emitted

2010-03-19 Thread Zhenhua Zhang
--- gatchat/gatserver.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 1ffc2c3..9683fa3 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -165,6 +165,10 @@ static void g_at_server_send_final(GAtServer

[PATCH 02/11] Add framework of server parser

2010-03-17 Thread Zhenhua Zhang
a. The parser fetch and parse one command per loop. The prefix is the command prefix without parameter. For example, the prefix of AT+CLIP=1 is +CLIP. b. Search registered notification node in command_list. Invoke the callback if found. c. Termiate the execution if the result is an error.

[PATCH 05/11] Add server at command data structure

2010-03-17 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 27 +++ gatchat/gatserver.h | 22 ++ 2 files changed, 49 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index f3807eb..bbaef52 100644 --- a/gatchat/gatserver.c +++

[PATCH 07/11] Add g_at_server_register and unregister callback

2010-03-17 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 48 gatchat/gatserver.h |6 ++ 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 6e3347c..c17a7b5 100644 --- a/gatchat/gatserver.c +++

[PATCH 08/11] Add G_AT_SERVER_RESULT_EXT_ERROR

2010-03-17 Thread Zhenhua Zhang
--- gatchat/gatserver.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.h b/gatchat/gatserver.h index 5e9eb62..6fb78bd 100644 --- a/gatchat/gatserver.h +++ b/gatchat/gatserver.h @@ -43,6 +43,7 @@ enum _GAtServerResult {

Re: [PATCH 01/11] Rename g_at_server_send_result

2010-03-17 Thread Zhenhua Zhang
not be applied. Thanks. Zhenhua From 588126076e1fc10f57b75afe734d51046ab46d6d Mon Sep 17 00:00:00 2001 From: Zhenhua Zhang zhenhua.zh...@intel.com Date: Wed, 17 Mar 2010 16:36:22 +0800 Subject: [PATCH] Remove old server_parse_line --- gatchat/gatserver.c | 49

[PATCH 1/6] Add register S3 basic command callback

2010-03-17 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 54 +++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 06ea912..80e6d45 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -233,6 +233,53 @@ void

[PATCH 0/6] Add test cases for GAtServer

2010-03-17 Thread Zhenhua Zhang
These patches register callback functions for each AT command. Patch #1-#5 register basic commands into gatserver.c. Patch #6 add a simple voice call test case in test-server.c. TODO: 1. ATE,ATV,ATQ could share a template function. 2. Register more basic commands defined in 27.007.

[PATCH 2/6] Add register S5 basic command callback

2010-03-17 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 48 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 80e6d45..1a8ac58 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -280,6 +280,53 @@ done:

[PATCH 5/6] Add register ATV basic command callback

2010-03-17 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index e9b1cf4..5a234d6 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -427,6 +427,56 @@

[PATCH 1/7] Remove old server_parse_line

2010-03-03 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 45 - 1 files changed, 0 insertions(+), 45 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index c9256e2..4175112 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -173,55 +173,10 @@ static

[PATCH 4/7] Add extended command parsing

2010-03-03 Thread Zhenhua Zhang
See V.250 5.4 Extended syntax commands for details. --- gatchat/gatserver.c | 56 ++- 1 files changed, 55 insertions(+), 1 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index b3c3f5f..4a19b6b 100644 --- a/gatchat/gatserver.c

[PATCH 7/7] Add g_at_server_register to register callback

2010-03-03 Thread Zhenhua Zhang
--- gatchat/gatserver.c | 47 +++ gatchat/gatserver.h |6 ++ 2 files changed, 53 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index bea51f5..c49e5f8 100644 --- a/gatchat/gatserver.c +++

[PATCH 5/7] Add server at command data structure

2010-03-03 Thread Zhenhua Zhang
Implement hashtable to store server supported command list. AT command could be action command or parameter command. Defined in V.250 5.2.5. --- gatchat/gatserver.c | 29 + gatchat/gatserver.h | 21 + 2 files changed, 50 insertions(+), 0

[PATCH 1/4] Add command echo back if ATE=1

2010-03-02 Thread Zhenhua Zhang
--- gatchat/gatserver.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index f19d267..c72e798 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -382,6 +382,9 @@ static void new_bytes(GAtServer *p)

[PATCH 2/4] Add define for read and write buffer size

2010-02-26 Thread Zhenhua Zhang
--- gatchat/gatserver.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 95a9e8f..15bbbff 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -32,6 +32,8 @@ #include ringbuffer.h #include gatserver.h +#define

[PATCH 4/4] Add write server response into non-blocking IO

2010-02-26 Thread Zhenhua Zhang
Write server response into non-blocking GIOChannel when we have G_IO_OUT signal. --- gatchat/gatserver.c | 66 +++ 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index a136a6f..5b5e2f7

[PATCH 3/4] Add write buffer queue for non-blocking write

2010-02-26 Thread Zhenhua Zhang
The head of the queue is the data to be written, the tail is the free buffer to cache data into. If the tail of queue is full, allocate a new free buffer and append it at the tail. --- gatchat/gatserver.c | 105 ++- 1 files changed, 95

[PATCH 1/4] Do not trigger user disconnect at g_at_shutdown

2010-02-26 Thread Zhenhua Zhang
Similar to gatchat, introduce read_watcher_destroy_notify and do not trigger user disconnect at g_at_shutdown. Delay destroy of gatserver until read_watcher is destroyed. --- gatchat/gatserver.c | 42 -- 1 files changed, 28 insertions(+), 14 deletions(-)

Re: [PATCH 1/3] Do not trigger user disconnect at g_at_shutdown

2010-02-21 Thread Zhenhua Zhang
Hi, I rebased my patches for modem emulator and did some updates: 1. Patch 1/3 is the same as 4/4 sent on Feb 9th. 2. Patch 2/3 is updated according to Denis's comments. So we only have one full list at all. 3. Patch 3/3 is to fetch data from full list and write them into non blocking IO.

[PATCH 2/4] Add handle the case when write buffer is full

2010-02-10 Thread Zhenhua Zhang
If current write_buf is fulled, put it into the full list and fetch a new ring buffer from the free list. --- gatchat/gatserver.c | 63 -- 1 files changed, 60 insertions(+), 3 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c

Re: [PATCH 1/4] Add write ring buffer for non-blocking write

2010-02-10 Thread Zhenhua Zhang
Hi Padovan, On 02/11/2010 01:23 AM, Gustavo F. Padovan wrote: * Zhenhua Zhangzhenhua.zh...@intel.com [2010-02-10 16:13:40 +0800]: + + for (i = 0; i MAX_BUFFER_NUM; i++) { +#ifdef WRITE_SCHEDULER_DEBUG + buf = ring_buffer_new(4); +#else + buf =

[PATCH 2/3] Add handle the case when write buffer is full

2010-02-10 Thread Zhenhua Zhang
If current write_buf is fulled, put it into the full list and fetch a new ring buffer from the free list. --- gatchat/gatserver.c | 63 -- 1 files changed, 60 insertions(+), 3 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c

[PATCH 1/3] Add write ring buffer for non-blocking write

2010-02-10 Thread Zhenhua Zhang
Use two layers to cache server side response data to client. 1. A fixed-length ring buffer. 2. A list of free ring buffers and a list of empty full ring buffer. If current ring buffer is full, put it into full buffer list and fetch a free buffer frome free list. --- gatchat/gatserver.c | 106

[PATCH 3/4] Rename server_io to channel

2010-02-09 Thread Zhenhua Zhang
To make it consistent with GAtChat. --- gatchat/gatserver.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index ad6afb9..d131b0c 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -88,7 +88,7 @@ struct

[PATCH 1/4] Rename buf to read_buf in GAtServer

2010-02-09 Thread Zhenhua Zhang
Because we may introduce write_buf for sever response buffer. --- gatchat/gatserver.c | 54 +- 1 files changed, 27 insertions(+), 27 deletions(-) diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index a01ded6..16c976d 100644 ---

[PATCH 4/4] Do not trigger user disconnect at g_at_shutdown

2010-02-09 Thread Zhenhua Zhang
Similar to gatchat, introduce read_watcher_destroy_notify and do not trigger user disconnect at g_at_shutdown. Delay destroy of gatserver until read_watcher is destroyed. --- gatchat/gatserver.c | 44 ++-- 1 files changed, 30 insertions(+), 14

Re: [RFC] [PATCH 0/2] HFP AG integration with PulseAudio

2010-02-03 Thread Zhenhua Zhang
Hi Jprvita, On 02/04/2010 02:30 AM, João Paulo Rechi Vita wrote: Just updating, this patch actually worked when testing with a different adapter (Fujitsu-Siemens CSR-based). The adapter causing problems was a Broadcom 2.1, the internal adapter of a Dell Mini10. Also, suspending the source /

[PATCH] Fix change state immediately when meet the slash

2010-02-02 Thread Zhenhua Zhang
According to V.250 spec section 5.2.4 Repeating a command line, if the prefix A/ or a/ is received, we should execute the last command immediately. No need to meet \r. --- gatchat/gatserver.c | 20 +--- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git

<    1   2   3   >