Send connman mailing list submissions to
        connman@lists.01.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCH] ntp: fix bad invalid timeout value. (Antoine Aubert)
   2. Unable to setup connman using systemd (Fabio Emiliani)


----------------------------------------------------------------------

Message: 1
Date: Wed, 12 Oct 2016 18:41:48 +0200
From: Antoine Aubert <a.aub...@overkiz.com>
To: connman@lists.01.org
Subject: [PATCH] ntp: fix bad invalid timeout value.
Message-ID: <1476290508-26027-1-git-send-email-a.aub...@overkiz.com>

g_timeout_add_second, use a 'stack' value to userdata.
When send_timeout is called, userdata point to invalid stack value.
---
 src/ntp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/ntp.c b/src/ntp.c
index 7e66c9b..0a4c912 100644
--- a/src/ntp.c
+++ b/src/ntp.c
@@ -127,6 +127,7 @@ static struct sockaddr_in6 timeserver_addr;
 static gint poll_id = 0;
 static gint timeout_id = 0;
 static guint retries = 0;
+static guint timeout_value = 0;
 
 static void send_packet(int fd, struct sockaddr *server, uint32_t timeout);
 
@@ -142,14 +143,12 @@ static void next_server(void)
 
 static gboolean send_timeout(gpointer user_data)
 {
-       uint32_t timeout = GPOINTER_TO_UINT(user_data);
-
-       DBG("send timeout %u (retries %d)", timeout, retries);
+       DBG("send timeout %u (retries %d)", timeout_value, retries);
 
        if (retries++ == NTP_SEND_RETRIES)
                next_server();
        else
-               send_packet(transmit_fd, (struct sockaddr *)&timeserver_addr, 
timeout << 1);
+               send_packet(transmit_fd, (struct sockaddr *)&timeserver_addr, 
timeout_value << 1);
 
        return FALSE;
 }
@@ -218,8 +217,9 @@ static void send_packet(int fd, struct sockaddr *server, 
uint32_t timeout)
         * trying another server.
         */
 
+       timeout_value = timeout;
        timeout_id = g_timeout_add_seconds(timeout, send_timeout,
-                                       GUINT_TO_POINTER(timeout));
+                                       NULL);
 }
 
 static gboolean next_poll(gpointer user_data)
-- 
2.7.4



------------------------------

Message: 2
Date: Wed, 12 Oct 2016 19:22:19 +0200
From: Fabio Emiliani <fabio.emili...@artgroup-spa.com>
To: connman@lists.01.org
Subject: Unable to setup connman using systemd
Message-ID: <3bbd0565-7427-3e4e-573e-032b167fc...@artgroup-spa.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Dear all,

I'm trying to setup connman using systemd. When I try to execute the 
command:

> connmanctl enable wifi
I've got the following error:

> Error wifi: Method "SetProperty" with signature "sv" on interface 
> "net.connman.Technology" doesn't exist
I had the same error when I was using connman with the old SysVinit. 
After some tries I discovered that the cause of the error was the lack 
of the CONFIG_RFKILL=y in the kernel configuration options. After the 
enable of RFKILL everything had started to work.

After the migration from SysVinit to systemd, connman doesn't want to 
see the wireless technology. The result is that connman can't control 
the wireless interface.

Another bit of info:

- I have RFKILL installed and correctly configured:

> root@lam_icu:~# rfkill list 0
> 0: phy0: Wireless LAN
>         Soft blocked: no
>         Hard blocked: no
- wpa_supplicant is installed and configured to start before connman

- the wireless interface is correctly configured, I can perform a scan, 
I can connect to a network using wpa_supplicant

- if launching connmand manually I see the following log:

> root@lam_icu:~# connmand -n
> connmand[4026]: Connection Manager version 1.28
> connmand[4026]: Checking loopback interface settings
> connmand[4026]: System hostname is lam_icu
> connmand[4026]: System domainname is artgroup
> connmand[4026]: lo {newlink} index 1 address 00:00:00:00:00:00 mtu 65536
> connmand[4026]: lo {newlink} index 1 operstate 0 <UNKNOWN>
> connmand[4026]: sit0 {newlink} index 2 address 00:00:00:00:08:00 mtu 1480
> connmand[4026]: sit0 {newlink} index 2 operstate 2 <DOWN>
> connmand[4026]: usb0 {create} index 3 type 1 <ETHER>
> connmand[4026]: usb0 {update} flags 36866 <DOWN>
> connmand[4026]: usb0 {newlink} index 3 address 5E:88:F6:99:F3:4F mtu 1500
> connmand[4026]: usb0 {newlink} index 3 operstate 2 <DOWN>
> connmand[4026]: Adding interface usb0 [ gadget ]
> connmand[4026]: eth0 {create} index 4 type 1 <ETHER>
> connmand[4026]: eth0 {RX} 16657 packets 1338888 bytes
> connmand[4026]: eth0 {TX} 0 packets 185445 bytes
> connmand[4026]: eth0 {update} flags 36866 <DOWN>
> connmand[4026]: eth0 {newlink} index 4 address 00:90:9A:9D:AC:B2 mtu 1500
> connmand[4026]: eth0 {newlink} index 4 operstate 2 <DOWN>
> connmand[4026]: Adding interface eth0 [ ethernet ]
> *connmand[4026]: wlan0 {create} index 5 type 1 <ETHER>**
> **connmand[4026]: wlan0 {update} flags 4098 <DOWN>**
> **connmand[4026]: wlan0 {newlink} index 5 address DE:AD:BE:EF:00:00 
> mtu 1500**
> **connmand[4026]: wlan0 {newlink} index 5 operstate 2 <DOWN>**
> **connmand[4026]: Adding interface wlan0 [ wifi ]*
> connmand[4026]: eth0 {RX} 16657 packets 1338888 bytes
> connmand[4026]: eth0 {TX} 0 packets 185445 bytes
> connmand[4026]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
> connmand[4026]: eth0 {newlink} index 4 address 00:90:9A:9
wlan0 is correctly added.

What is in your opinion the cause of the problem? How can I debug the issue?

Thanks in advance for your help

Regards,

Fabio Emiliani

-- 

*Fabio Emiliani*

*/Software Engineer/*

/Ph. +39 075 8298 532/

/fabioemili...@artgroup-spa.com/ <mailto:fabioemili...@artgroup-spa.com>

DISCLAIMER
This email and any attachment may contain confidential information. If 
you are not the intended recipient you are not authorised to copy or 
disclose all or any part of it without the prior written consent of ART SpA.

/ART SpA ? Step Forward With US - //www.artgroup-spa.com/logo_ART_firma-1//

/Ph. +39 075 8298 501 ? Fax +39 075 8298 525 /

P*Please consider our environment  before printing this e-mail***

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.01.org/pipermail/connman/attachments/20161012/9342950a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 16420 bytes
Desc: not available
URL: 
<http://lists.01.org/pipermail/connman/attachments/20161012/9342950a/attachment.jpe>

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
connman@lists.01.org
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 12, Issue 7
**************************************

Reply via email to