meta-tizen: neard: move recipe and patches to the proper dir
[scm/bb/tizen-distro.git] / meta-tizen / meta-tizen-adaptation / meta / recipes-connectivity / connman / connman / 0014-Tizen-Check-some-telephony-flags-before-active-conte.patch
1 From 1eb2741818fb2d2ec09ab055c8e4d1df1f2fb481 Mon Sep 17 00:00:00 2001
2 From: "guoqiang.liu" <guoqiang.liu@archermind.com>
3 Date: Fri, 27 Dec 2013 14:22:52 +0800
4 Subject: [PATCH 14/32] Tizen: Check some telephony flags before active context
5
6 Telephony active maybe fail if data_allowed or ps_attached is false,
7 so check it before actived.
8
9 When data_allowed is false, if connman starts to auto connect 3G
10 service, it will result in 3G service auto connected fail, which
11 leads to it will not be auto connected next time.
12
13 Change-Id: Ibdd9c34fee7a612c1788a364c69550c4f7e79123
14 Signed-off-by: guoqiang.liu <guoqiang.liu@archermind.com>
15 ---
16  plugins/telephony.c | 8 ++++++++
17  1 file changed, 8 insertions(+)
18
19 diff --git a/plugins/telephony.c b/plugins/telephony.c
20 index 63e7f6e..ea0bf65 100644
21 --- a/plugins/telephony.c
22 +++ b/plugins/telephony.c
23 @@ -323,6 +323,7 @@ static int __network_connect(struct connman_network *network)
24  {
25         struct connman_device *device;
26         struct telephony_modem *modem;
27 +       struct telephony_service *service;
28  
29         DBG("network %p", network);
30  
31 @@ -334,9 +335,16 @@ static int __network_connect(struct connman_network *network)
32         if (modem == NULL)
33                 return -ENODEV;
34  
35 +       service = modem->s_service;
36 +       if (service == NULL)
37 +               return -ENOLINK;
38 +
39         if (modem->powered == FALSE)
40                 return -ENOLINK;
41  
42 +       if (modem->data_allowed == FALSE || service->ps_attached == FALSE)
43 +               return -ENOLINK;
44 +
45         return __request_network_activate(network);
46  }
47  
48 -- 
49 1.8.1.4
50