Send connman mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

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


Today's Topics:

   1. Re: [PATCH 06/27] inet: Add function connman_inet_is_ifup()
      (Christian Spielberger)
   2. Re: [PATCH 06/27] inet: Add function connman_inet_is_ifup()
      (Daniel Wagner)
   3. [PATCH] session: cleanup session_hash table on all error
      cases. (Harish Jenny K N)
   4. Re: [PATCH 10/27] acd: add functions start/stop_listening
      (Christian Spielberger)


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

Message: 1
Date: Mon, 30 Apr 2018 11:36:32 +0200
From: Christian Spielberger <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 06/27] inet: Add function connman_inet_is_ifup()
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Mon 16.04.18  16:46, Daniel Wagner wrote:
> Hi Christian,
> 
> On 04/11/2018 04:00 PM, Christian Spielberger wrote:
> >Add function connman_inet_is_ifup() which checks if an interface is up. It 
> >will
> >be used when initializing ACD.
> >---
> >  include/inet.h |  1 +
> >  src/inet.c     | 34 ++++++++++++++++++++++++++++++++++
> >  2 files changed, 35 insertions(+)
> >
> >diff --git a/include/inet.h b/include/inet.h
> >index 6482934..9c1918f 100644
> >--- a/include/inet.h
> >+++ b/include/inet.h
> >@@ -38,6 +38,7 @@ char *connman_inet_ifname(int index);
> >  int connman_inet_ifup(int index);
> >  int connman_inet_ifdown(int index);
> >+bool connman_inet_is_ifup(int index);
> 
> Since the all the other connman_inet do return an integer as return value I
> suggest you stay consistent and use also an int as return code. The
> connman_inet_*() function with a bool as return are expected to be used in a
> condition. So this is about consistency/style. Nothing really wrong with
> your version.
> 
> Thanks,
> Daniel

Hi Daniel,

sorry for the long delay. Today I found some time to proceed with the ACD
patches. Here is the first question about your last comments.

Do you mean, it should return 0 for "The interface is down.", 1 for "The
interface is up." and a negative value in case of an error?

regards,
chris.



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

Message: 2
Date: Mon, 30 Apr 2018 11:38:50 +0200
From: Daniel Wagner <[email protected]>
To: Christian Spielberger <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 06/27] inet: Add function connman_inet_is_ifup()
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi Christian,

> sorry for the long delay. Today I found some time to proceed with the ACD
> patches. Here is the first question about your last comments.

No worries. I wasn't idle :)

> Do you mean, it should return 0 for "The interface is down.", 1 for "The
> interface is up." and a negative value in case of an error?

Nah, forget it. I was confused. The bool thing is okay.

Thanks,
Daniel


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

Message: 3
Date: Mon, 30 Apr 2018 17:28:08 +0530
From: Harish Jenny K N <[email protected]>
To: <[email protected]>
Subject: [PATCH] session: cleanup session_hash table on all error
        cases.
Message-ID:
        <[email protected]>
Content-Type: text/plain

Removing connman_session from 'session_hash' global hash
table is needed for all error cases in
session_policy_config_cb function.
This patch moves the g_hash_table_remove call to handle
in all error cases.

---
 src/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/session.c b/src/session.c
index 5778225..834b3a6 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1407,7 +1407,6 @@ static int session_policy_config_cb(struct 
connman_session *session,
                                        session_methods, NULL, NULL,
                                        session, NULL)) {
                connman_error("Failed to register %s", session->session_path);
-               g_hash_table_remove(session_hash, session->session_path);
                err = -EINVAL;
                goto err;
        }
@@ -1434,6 +1433,7 @@ static int session_policy_config_cb(struct 
connman_session *session,
        return 0;

 err:
+       g_hash_table_remove(session_hash, session->session_path);
        reply = __connman_error_failed(creation_data->pending, -err);
        g_dbus_send_message(connection, reply);
        creation_data->pending = NULL;
--
1.9.1




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

Message: 4
Date: Mon, 30 Apr 2018 15:25:00 +0200
From: Christian Spielberger <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 10/27] acd: add functions start/stop_listening
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

On Mon 16.04.18  16:26, Daniel Wagner wrote:
> Hi Christian,
> 
> On 04/11/2018 04:00 PM, Christian Spielberger wrote:
> >Adds functions for starting and stopping of the ARP listening which is 
> >essential
> >for ACD. Adds also the callback function for processing received ARP packets
> >which does nothing for the moment.
> 
> This patch doesn't compile all in my testing:
> 
> 
> src/acd.c: In function ?debug?:
> src/acd.c:64:6: error: implicit declaration of function ?vsnprintf? 
> [-Werror=implicit-function-declaration]
>  if (vsnprintf(str, sizeof(str), format, ap) > 0)
>      ^~~~~~~~~
> src/acd.c: At top level:
> src/acd.c:55:12: error: ?acd_recv_arp_packet? used but never defined [-Werror]
> static int acd_recv_arp_packet(acd_host *acd);
>            ^~~~~~~~~~~~~~~~~~~
> src/acd.c:148:13: error: ?stop_listening? defined but not used 
> [-Werror=unused-function]
> static void stop_listening(acd_host *acd)
>             ^~~~~~~~~~~~~~
> src/acd.c:113:12: error: ?start_listening? defined but not used 
> [-Werror=unused-function]
> static int start_listening(acd_host *acd)
>            ^~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[1]: *** [Makefile:4085: src/src_connmand-acd.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
>  GEN      doc/connman-vpn.8
> make: *** [Makefile:1665: all] Error 2
> warning: execution failed: build-connman.sh
> You can fix the problem, and then run
> 
> 
> My build test command is
> 
> $ git rebase -i master --exec=build-connman.sh
> 
> Thanks,
> Danie

Hi Daniel,

now I use your build-connman.sh. But I have to ask you if you really want
"-Werror", "-Werror=unused-function" for intermediate patches? It would be a
lot of work for me to split the patches differently in order to make it
compilable with this switches. We just tried to avoid one big patch for the
whole acd.c.

I agree that "-Werror=implicit-function-declaration" makes sense. But if you
prefer the whole "-Werror" switch, I will do my best.

regards,
chris


> #!/bin/sh
> set -euo pipefail
> IFS=$'\n\t'
> 
> usage() { echo "Usage: $0 [iwd]" 1>&2; exit 1; }
> 
> while getopts "h" o; do
>     case "${o}" in
>         *)
>             usage
>             ;;
>     esac
> done
> shift $((OPTIND-1))
> 
> cmd=${1:-}
> 
> config_hwsim()
> {
>     ./bootstrap && \
>       ./configure     --enable-maintainer-mode \
>                       --enable-debug \
>                       --disable-optimization \
>                       --prefix=/usr \
>                       --mandir=/usr/share/man \
>                       --localstatedir=/var \
>                       --sysconfdir=/etc \
>                       --enable-loopback \
>                       --enable-ethernet \
>                       --disable-gadget \
>                       --disable-wifi \
>                       --disable-iwd \
>                       --disable-bluetooth \
>                       --disable-ofono \
>                       --disable-neard \
>                       --disable-datafiles \
>                       --enable-hwsim $*
> }
> 
> config_iwd()
> {
>     ./bootstrap && \
>       ./configure     --enable-maintainer-mode \
>                       --enable-debug \
>                       --disable-optimization \
>                       --prefix=/usr \
>                       --mandir=/usr/share/man \
>                       --localstatedir=/var \
>                       --sysconfdir=/etc \
>                       --disable-datafiles \
>                       --with-firewall=nftables \
>                       --enable-openconnect=builtin \
>                       --enable-openvpn=builtin \
>                       --enable-vpnc=builtin \
>                       --enable-session-policy-local=builtin \
>                       --enable-nmcompat \
>                       --enable-iwd \
>                       --disable-wifi \
>                       --enable-polkit $*
> }
> 
> config_wpas()
> {
>     ./bootstrap && \
>       ./configure     --enable-debug \
>                       --disable-optimization \
>                       --prefix=/usr \
>                       --mandir=/usr/share/man \
>                       --localstatedir=/var \
>                       --sysconfdir=/etc \
>                       --disable-datafiles \
>                       --with-firewall=nftables \
>                       --enable-openvpn=builtin \
>                       --enable-session-policy-local=builtin \
>                       --enable-nmcompat \
>                       --disable-iwd \
>                       --enable-wifi \
>                       --with-dns-backend=internal \
>                       $*
> }
> 
> if [ -f config.status ]; then
>       make maintainer-clean
> fi
> 
> if [ -z "$cmd" ] ; then
>     cmd="iwd"
> fi
> 
> case $cmd in
>     "wpas")
>       config_wpas
>       ;;
>     "iwd")
>       config_iwd
>       ;;
>     "hwsim")
>       config_hwsim
>       ;;
>     *)
>       usage
>       ;;
> esac



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

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


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

End of connman Digest, Vol 30, Issue 31
***************************************

Reply via email to