From e005b06c003bb4ba47781cc38eaf3f9916f81e73 Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Sat, 16 Mar 2013 01:18:46 +0900 Subject: [PATCH] merge with master --- debian/tel-plugin-packetservice.postinst | 0 include/ps.h | 0 ...reate-modems-only-when-one-modem-is-added.patch | 49 ----------------- ...a-Change-SFR-internet-APN-and-add-Bouygue.patch | 44 --------------- .../0003-context-Fix-context-creation-issue.patch | 64 ---------------------- packaging/tel-plugin-packetservice.spec | 16 +----- 6 files changed, 1 insertion(+), 172 deletions(-) mode change 100755 => 100644 debian/tel-plugin-packetservice.postinst mode change 100644 => 100755 include/ps.h delete mode 100644 packaging/0001-main-Create-modems-only-when-one-modem-is-added.patch delete mode 100644 packaging/0002-dnet_db_data-Change-SFR-internet-APN-and-add-Bouygue.patch delete mode 100644 packaging/0003-context-Fix-context-creation-issue.patch diff --git a/debian/tel-plugin-packetservice.postinst b/debian/tel-plugin-packetservice.postinst old mode 100755 new mode 100644 diff --git a/include/ps.h b/include/ps.h old mode 100644 new mode 100755 diff --git a/packaging/0001-main-Create-modems-only-when-one-modem-is-added.patch b/packaging/0001-main-Create-modems-only-when-one-modem-is-added.patch deleted file mode 100644 index e22e929..0000000 --- a/packaging/0001-main-Create-modems-only-when-one-modem-is-added.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ddb37eaa4cb56a44fa2531e5ae828f3a84eaa49b Mon Sep 17 00:00:00 2001 -From: Guillaume Zajac -Date: Wed, 10 Oct 2012 16:50:27 +0200 -Subject: [PATCH 1/3] main: Create modems only when one modem is added -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - ---- - src/main.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/src/main.c b/src/main.c -index c07a1e1..5c4e27b 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -34,6 +34,18 @@ static gboolean on_load() - return TRUE; - } - -+static enum tcore_hook_return __on_hook_modem_added(Server *s, CoreObject *source, -+ enum tcore_notification_command command, unsigned int data_len, void *data, void *user_data) -+{ -+ gpointer *master = user_data; -+ -+ dbg("modem added event called"); -+ -+ _ps_master_create_modems(master); -+ -+ return TCORE_HOOK_RETURN_CONTINUE; -+} -+ - static gboolean on_init(TcorePlugin *p) - { - gpointer *master; -@@ -57,7 +69,10 @@ static gboolean on_init(TcorePlugin *p) - } - - master = _ps_master_create_master(conn, p); -- rv = _ps_master_create_modems(master); -+ -+ tcore_server_add_notification_hook(tcore_plugin_ref_server(p), -+ TNOTI_MODEM_ADDED, -+ __on_hook_modem_added, master); - - dbg("initialized PacketService plugin!"); - return TRUE; --- -1.7.10.4 - diff --git a/packaging/0002-dnet_db_data-Change-SFR-internet-APN-and-add-Bouygue.patch b/packaging/0002-dnet_db_data-Change-SFR-internet-APN-and-add-Bouygue.patch deleted file mode 100644 index c70104f..0000000 --- a/packaging/0002-dnet_db_data-Change-SFR-internet-APN-and-add-Bouygue.patch +++ /dev/null @@ -1,44 +0,0 @@ -From d42754b918740bddb60447f97a5fa6071f96622b Mon Sep 17 00:00:00 2001 -From: Guillaume Zajac -Date: Mon, 15 Oct 2012 18:12:23 +0200 -Subject: [PATCH 2/3] dnet_db_data: Change SFR internet APN and add Bouygues - operator -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - ---- - resources/dnet_db_data.sql | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/resources/dnet_db_data.sql b/resources/dnet_db_data.sql -index 3844a63..a33b95c 100644 ---- a/resources/dnet_db_data.sql -+++ b/resources/dnet_db_data.sql -@@ -27,6 +27,7 @@ INSERT INTO "network_info" (network_info_id, network_name, mccmnc) VALUES (26, ' - INSERT INTO "network_info" (network_info_id, network_name, mccmnc) VALUES (27, 'Tizen', '11111'); - INSERT INTO "network_info" (network_info_id, network_name, mccmnc) VALUES (28, 'T Mobile UK', '23430'); - INSERT INTO "network_info" (network_info_id, network_name, mccmnc) VALUES (29, 'T Mobile PL', '26002'); -+INSERT INTO "network_info" (network_info_id, network_name, mccmnc) VALUES (30, 'F-Bouygues Telecom', '20820'); - - INSERT INTO "max_pdp"(network_info_id, max_pdp_3g) VALUES(1, 2); - INSERT INTO "max_pdp"(network_info_id, max_pdp_3g) VALUES(2, 3); -@@ -71,7 +72,7 @@ INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, au - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(39, 'O2 MMS','internet',0,NULL,NULL,1,'82.113.100.5:8080','http://10.81.0.7:8002',300,0,0,NULL,0,NULL,NULL,18,2, 0, 1, 0); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(40, 'SKT Internet','web.sktelecom.com',0,NULL,NULL,1,NULL,NULL,300,0,0,NULL,0,NULL,NULL,19,1,0,1,1); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(41, 'SKT MMS','web.sktelecom.com',0,NULL,NULL,0,'220.103.230.150:9093','http://omms.nate.com:9082/oma_mms',300, 0,0,NULL,0,NULL,NULL,19,2, 0, 1, 0); --INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(42, 'SFR Internet','sl2sfr',1,NULL,NULL,1,NULL,NULL,300,0,0,NULL,0,NULL,NULL,20,1,0,1,1); -+INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(42, 'SFR Internet','push',1,NULL,NULL,1,NULL,NULL,300,0,0,NULL,0,NULL,NULL,20,1,0,1,1); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(43, 'SFR MMS','mmssfr',1,NULL,NULL,1,'10.151.0.1:8080','http://mms1',300,0,0,NULL,0,NULL,NULL,20,2, 0, 1, 0); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(44, 'T Mobile Internet','internet.t-mobile',1,'t-mobile','tm',1,NULL,NULL,150,0,0,NULL,0,NULL,NULL,21,1,0,1,1); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(45, 'T Mobile MMS','internet.t-mobile',1,'t-mobile','tm',1,'172.28.23.131:8008','http://mms.t-mobile.de/servlets/mms',150,0,0,NULL,0,NULL,NULL,21,2, 0, 1, 0); -@@ -91,5 +92,7 @@ INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, au - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(59, 'T Mobile MMS','general.t-mobile.uk',1,'user','tm',1,'149.254.201.135:8080','http://mmsc.t-mobile.co.uk:8002',300, 0,0,NULL,0,NULL,NULL,28,2, 0, 1, 0); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(60, 'T Mobile Internet','internet',0,NULL,NULL,1,NULL,NULL,300, 0,0,NULL,0,NULL,NULL,29,1,0,1,1); - INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(61, 'T Mobile MMS','mms',0,NULL,NULL,1,'213.158.194.226:8080','http://mms/servlets/mms',300, 0,0,NULL,0,NULL,NULL,29,2, 0, 1, 0); -+INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(62, 'Bouygues Internet',NULL,0,NULL,NULL,1,NULL,NULL,300,0,0,NULL,0,NULL,NULL,30,1,0,1,1); -+INSERT INTO "pdp_profile" (profile_id, profile_name, apn, auth_type, auth_id, auth_pwd, pdp_protocol,proxy_ip_addr,home_url,linger_time, traffic_class,is_static_ip_addr,ip_addr,is_static_dns_addr,dns_addr1,dns_addr2,network_info_id,svc_category_id, hidden, editable, default_internet_con) VALUES(63, 'Bouygues MMS','mms.bouygtel.com',1,NULL,NULL,1,'62.201.129.226:8080','http://mms.bouyguestelecom.fr/mms/wapenc',300,0,0,NULL,0,NULL,NULL,30,2, 0, 1, 0); - - --- -1.7.10.4 - diff --git a/packaging/0003-context-Fix-context-creation-issue.patch b/packaging/0003-context-Fix-context-creation-issue.patch deleted file mode 100644 index 4633937..0000000 --- a/packaging/0003-context-Fix-context-creation-issue.patch +++ /dev/null @@ -1,64 +0,0 @@ -From bc75ead8cdd5510afbdceb3627573331c699dae6 Mon Sep 17 00:00:00 2001 -From: Guillaume Zajac -Date: Tue, 23 Oct 2012 14:30:17 +0200 -Subject: [PATCH 3/3] context: Fix context creation issue -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 8bit - -New internet context is always set as default internet connection. -Check proxy_addr formatting before filling in data base. ---- - src/context.c | 23 ++++++++++++++++++++++- - 1 file changed, 22 insertions(+), 1 deletion(-) - -diff --git a/src/context.c b/src/context.c -index db775a8..152db83 100644 ---- a/src/context.c -+++ b/src/context.c -@@ -881,6 +881,19 @@ static int __ps_context_insert_profile_to_database(GHashTable *property, int net - - } - -+ /* -+ * Whether a profile is created with no proxy address and port, -+ * settings application is passing ':' as proxy_addr value. -+ * Checking proxy _address creation on application is needed, but -+ * address:port formatting is also double check in packet service -+ * telephony plugin. -+ */ -+ if (g_strcmp0(proxy_addr, ":") == 0) { -+ dbg("Invalid proxy address, set it to NULL"); -+ g_free(proxy_addr); -+ proxy_addr = NULL; -+ } -+ - dbg("apn (%s), auth_type (%s), auth_id(%s), auth_pwd(%s), proxy_addr(%s), home_url(%s), svc_id(%s)", - apn, auth_type, auth_id, auth_pwd, proxy_addr, home_url, svc_id); - -@@ -899,7 +912,7 @@ static int __ps_context_insert_profile_to_database(GHashTable *property, int net - strcat(szQuery," network_info_id, svc_category_id, hidden, editable, default_internet_con) values( "); - strcat(szQuery," ?, ?, ?, ?, ?, ?,");//1,2,3,4,5,6 - strcat(szQuery," 1, ?, ?, 300,");//7,8 -- strcat(szQuery," ?, ?, 0, 1, 0)");//9,10 -+ strcat(szQuery," ?, ?, 0, 1, ?)");//9,10,11 - - insert_key1 = g_strdup_printf("%d", profile_id); - insert_key2 = g_strdup_printf("%d", network_id); -@@ -924,6 +937,14 @@ static int __ps_context_insert_profile_to_database(GHashTable *property, int net - g_hash_table_insert(in_param, "9", g_strdup(insert_key2)); - g_hash_table_insert(in_param, "10", g_strdup(svc_id)); - -+ /* If profile received is Internet type */ -+ if (g_strcmp0(svc_id, "1") == 0) { -+ dbg("Set new internet profile as default Internet connection"); -+ g_hash_table_insert(in_param, "11", g_strdup("1")); -+ /* Profile is MMS or other type don't set it as default */ -+ } else -+ g_hash_table_insert(in_param, "11", g_strdup("0")); -+ - g_free(insert_key1);g_free(insert_key2);g_free(profile_name); - g_free(apn);g_free(auth_type);g_free(auth_id);g_free(auth_pwd); - g_free(proxy_addr);g_free(home_url);g_free(svc_id); --- -1.7.10.4 - diff --git a/packaging/tel-plugin-packetservice.spec b/packaging/tel-plugin-packetservice.spec index 8dc48c4..9b3987e 100644 --- a/packaging/tel-plugin-packetservice.spec +++ b/packaging/tel-plugin-packetservice.spec @@ -1,18 +1,11 @@ #sbs-git:slp/pkgs/t/tel-plugin-packetservice Name: tel-plugin-packetservice Summary: Telephony Packet Service library -Version: 0.1.36 +Version: 0.1.34 Release: 1 Group: System/Libraries License: Apache Source0: tel-plugin-packetservice-%{version}.tar.gz -%ifarch %ix86 -%if "%{simulator}" != "1" -patch0: 0001-main-Create-modems-only-when-one-modem-is-added.patch -patch1: 0002-dnet_db_data-Change-SFR-internet-APN-and-add-Bouygue.patch -patch2: 0003-context-Fix-context-creation-issue.patch -%endif -%endif Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig BuildRequires: cmake @@ -27,13 +20,6 @@ Telephony Packet Service library %prep %setup -q -%ifarch %ix86 -%if "%{simulator}" != "1" -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%endif -%endif %build cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DSYSCONFDIR=%{_sysconfdir} -- 2.7.4