Please review.

On Fri, Feb 24, 2012 at 3:56 PM, Sameer Naik
<sameer.subscripti...@damagehead.com> wrote:
> Apparently the technology is being enabled before it is even in the
> technology_list. Since the technology cannot be found in the
> technology list, its enabled flag remains unset.
>
> On Fri, Feb 24, 2012 at 1:35 AM, Sameer Naik
> <sameer.subscripti...@damagehead.com> wrote:
>> Hi,
>>
>> Have been trying to figure out what the issue is. No leads yet.
>>
>> One thing though is that the "Powered" state response to the dbus call
>> depends on whether the technology is enabled.
>>
>> if (technology->enabled > 0)
>>    powered = TRUE;
>>  else
>>    powered = FALSE;
>>
>> The logs show that the device is powered (as you pointed out). The
>> code flow shows that the technology is disabled.
>>
>> Regards
>> ~Sameer
>>
>> On Thu, Feb 23, 2012 at 10:38 PM, Sameer Naik
>> <sameer.subscripti...@damagehead.com> wrote:
>>> Hello,
>>>
>>> Yes, this happens every single time. One thing worth noting is that i
>>> have my rootfs mounted over NFS. So the ethernet interface is already
>>> connected before connman starts up. Maybe this is causing the issue.
>>>
>>> I launch connman via boot scripts with the following command
>>>
>>> $ connmand -W wext
>>>
>>> Technologies enabled are: ethernet, wifi
>>> Plugins enabled are: ether google loopback wifi
>>>
>>> My settings file contains the following.
>>>
>>> [global]
>>> OfflineMode=false
>>> Timeservers=0.pool.ntp.org;1.pool.ntp.org;2.pool.ntp.org;3.pool.ntp.org
>>>
>>> [WiFi]
>>> Enable=true
>>>
>>> [Bluetooth]
>>> Enable=false
>>>
>>> [Wired]
>>> Enable=true
>>>
>>> [3G]
>>> Enable=false
>>>
>>> [WiMAX]
>>> Enable=false
>>>
>>> Regards
>>> ~Sameer
>>>
>>> On Thu, Feb 23, 2012 at 5:09 PM, alok barsode <alokbars...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> On Thu, Feb 23, 2012 at 11:11 AM, Sameer Naik <
>>>> sameer.subscripti...@damagehead.com> wrote:
>>>>
>>>>> Hello Alok,
>>>>>
>>>>> Please find attached connman.log file.
>>>>> Do let me know if you need me to generate logs for specific modules.
>>>>>
>>>>>
>>>> Thanks for the log. I can see connman_device_set_powered() powered 1 called
>>>> on the ethernet device. so i dont know why it shows powered=false.
>>>> I am not able to repordude this problem. Do u see this every time ?  How
>>>> can i reproduce this? any specific setup? what does ur
>>>> /var/lib/connman/settings
>>>> say?
>>>>
>>>>
>>>> Cheers,
>>>> Alok.
>>>>
>>>>
>>>> Regards
>>>>> ~Sameer
>>>>>
>>>>> On Thu, Feb 23, 2012 at 1:18 PM, alok barsode <alokbars...@gmail.com>
>>>>> wrote:
>>>>> > Hi Sameer,
>>>>> >
>>>>> > On Thu, Feb 23, 2012 at 7:47 AM, Sameer Naik <
>>>>> > sameer.subscripti...@damagehead.com> wrote:
>>>>> >
>>>>> >> Hi,
>>>>> >>
>>>>> >> I have a system with on board ethernet and using connman git head.
>>>>> >> When i query the technology it says Powered state is "false" and at
>>>>> >> the same time "Connected" state is "true."
>>>>> >>
>>>>> >> $ dbus-send --system --print-reply --dest=net.connman /net/c
>>>>> >> onnman/technology/ethernet net.connman.Technology.GetProperties
>>>>> >> method return sender=:1.0 -> dest=:1.27 reply_serial=2
>>>>> >>   array [
>>>>> >>      dict entry(
>>>>> >>         string "Name"
>>>>> >>         variant             string "Wired"
>>>>> >>      )
>>>>> >>      dict entry(
>>>>> >>         string "Type"
>>>>> >>         variant             string "ethernet"
>>>>> >>      )
>>>>> >>      dict entry(
>>>>> >>         string "Powered"
>>>>> >>         variant             boolean false
>>>>> >>      )
>>>>> >>      dict entry(
>>>>> >>         string "Connected"
>>>>> >>         variant             boolean true
>>>>> >>      )
>>>>> >>      dict entry(
>>>>> >>         string "Tethering"
>>>>> >>         variant             boolean false
>>>>> >>      )
>>>>> >>   ]
>>>>> >>
>>>>> >> We definitely need more info that this, connman logs, setup details.
>>>>> > Its very tough to say what the problem is just from a dbus-send output.
>>>>> >
>>>>> >
>>>>> >
>>>>> >> Regards
>>>>> >> ~Sameer
>>>>> >>
>>>>> >
>>>>> > Cheers,
>>>>> > Alok.
>>>>> >
>>>>> >> _______________________________________________
>>>>> >> connman mailing list
>>>>> >> connman@connman.net
>>>>> >> http://lists.connman.net/listinfo/connman
>>>>> >>
>>>>> > _______________________________________________
>>>>> > connman mailing list
>>>>> > connman@connman.net
>>>>> > http://lists.connman.net/listinfo/connman
>>>>>
>>>>> _______________________________________________
>>>>> connman mailing list
>>>>> connman@connman.net
>>>>> http://lists.connman.net/listinfo/connman
>>>>>
>>>> _______________________________________________
>>>> connman mailing list
>>>> connman@connman.net
>>>> http://lists.connman.net/listinfo/connman
From 321d7ba148c807c1f3271137a7cb19cf2168bbf9 Mon Sep 17 00:00:00 2001
From: Sameer Naik <sam...@damagehead.com>
Date: Fri, 24 Feb 2012 16:06:35 +0530
Subject: [PATCH] technology: while enabling a technology, create it if it
 does not exist in the technologies_list.

Technology was not being set to enabled if it could not be found in the
technologies_list. Hence a technology would be marked disabled when it
is created.

To fix this, we replace the technology_find call with the technology_get
call, so that it is created when not found.
---
 src/technology.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/technology.c b/src/technology.c
index 12ed5af..5fa07d9 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -1101,7 +1101,7 @@ int __connman_technology_enabled(enum connman_service_type type)
 {
 	struct connman_technology *technology;
 
-	technology = technology_find(type);
+	technology = technology_get(type);
 	if (technology == NULL)
 		return -ENXIO;
 
-- 
1.7.6.5

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to