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 v2] service: do not reply twice to Connect (Beno?t Monin) 2. Re: [PATCH v2] service: do not reply twice to Connect (Daniel Wagner) 3. [Question]: Scan schedule (M?ns Zigher) 4. [PATCH] ipconfig: Incase of Manual IP Configuration, saving Gateway (Rahul Jain) ---------------------------------------------------------------------- Message: 1 Date: Wed, 22 Aug 2018 22:02:36 +0200 From: Beno?t Monin <benoit.mo...@gmx.fr> To: Daniel Wagner <w...@monom.org> Cc: connman@lists.01.org Subject: [PATCH v2] service: do not reply twice to Connect Message-ID: <e1c2e6c861bc0f8da1c1c8fa5d75fada5c05af3d.1534968111.git.benoit.mo...@gmx.fr> Calling Connect an a service sometime triggers the following error message in the log: dbus-daemon[591]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.139" (uid=0 pid=27373 comm="/usr/sbin/connmand ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.141" (uid=0 pid=27384 comm="/usr/bin/connmanctl ") This is caused by connmand replying twice to the Connect method. It can be reproduced by calling connect on a manually configured ethernet service while checking the dbus exchange with dbus-monitor. The dbus daemon rejects the second reply since there is no corresponding method call. Fix this by moving the call to reply_pending out of __connman_service_connect to connect_service and removing the direct (and maybe duplicated) reply. Also remove the reply_pending call in __connman_service_disconnect, this is already done in service_indicate_state when entering the state CONNMAN_SERVICE_STATE_DISCONNECT. --- src/service.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) changelog: - change from v1: move reply_pending instead of checking service->pending, as suggested by Daniel diff --git a/src/service.c b/src/service.c index 1a7576f6..326bfa3e 100644 --- a/src/service.c +++ b/src/service.c @@ -4333,18 +4333,10 @@ static DBusMessage *connect_service(DBusConnection *conn, err = __connman_service_connect(service, CONNMAN_SERVICE_CONNECT_REASON_USER); - if (err == -EINPROGRESS) - return NULL; - - if (service->pending) { - dbus_message_unref(service->pending); - service->pending = NULL; - } - - if (err < 0) - return __connman_error_failed(msg, -err); + if (err != -EINPROGRESS) + reply_pending(service, -err); - return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); + return NULL; } static DBusMessage *disconnect_service(DBusConnection *conn, @@ -6491,7 +6483,6 @@ int __connman_service_connect(struct connman_service *service, return err; } - reply_pending(service, -err); } return err; @@ -6508,8 +6499,6 @@ int __connman_service_disconnect(struct connman_service *service) connman_agent_cancel(service); - reply_pending(service, ECONNABORTED); - __connman_stats_service_unregister(service); if (service->network) { ------------------------------ Message: 2 Date: Thu, 23 Aug 2018 08:15:33 +0200 From: Daniel Wagner <w...@monom.org> To: Beno?t Monin <benoit.mo...@gmx.fr> Cc: connman@lists.01.org Subject: Re: [PATCH v2] service: do not reply twice to Connect Message-ID: <4a972628-84aa-723f-4abf-fd4d15371...@monom.org> Content-Type: text/plain; charset=utf-8; format=flowed Good Morning Beno?t, On 08/22/2018 10:02 PM, Beno?t Monin wrote: > Calling Connect an a service sometime triggers the following error message in > the log: > > dbus-daemon[591]: [system] Rejected send message, 0 matched rules; > type="method_return", sender=":1.139" (uid=0 pid=27373 > comm="/usr/sbin/connmand ") interface="(unset)" member="(unset)" error > name="(unset)" requested_reply="0" destination=":1.141" (uid=0 pid=27384 > comm="/usr/bin/connmanctl ") > > This is caused by connmand replying twice to the Connect method. It can be > reproduced by calling connect on a manually configured ethernet service while > checking the dbus exchange with dbus-monitor. The dbus daemon rejects the > second reply since there is no corresponding method call. > > Fix this by moving the call to reply_pending out of __connman_service_connect > to connect_service and removing the direct (and maybe duplicated) reply. > > Also remove the reply_pending call in __connman_service_disconnect, this is > already done in service_indicate_state when entering the state > CONNMAN_SERVICE_STATE_DISCONNECT. Thanks a lot! This a good cleanup and fix. Patch applied. Thanks, Daniel ------------------------------ Message: 3 Date: Thu, 23 Aug 2018 11:44:17 +0200 From: M?ns Zigher <mans.zig...@gmail.com> To: connman@lists.01.org Subject: [Question]: Scan schedule Message-ID: <CAEhQi8n1CEx-piKNYaSg3W7VWj+RE4se7thoYu8=r04-2cs...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi, I am developing an application that is using the dbus api. The application will setup the wifi for the unit. I am struggling a bit to see the best practice for making sure we have fully updated list of services. I know I can configure connman to automatically scan by using BackgroundScanning which is by default set to true. Is the best practice to let connman manage the scanning or should my application trigger a scan whenever needed. The default scan schedule for connman is not enough as I see it but I know you can setup a scan schedule in wpa_supplicant but it looks like connman is starting wpa_supplicant so I am not sure how to change this default scan schedule that connman is setting up. Any comments are appreciated. BR M?ns Zigher -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.01.org/pipermail/connman/attachments/20180823/b30e32d6/attachment-0001.html> ------------------------------ Message: 4 Date: Thu, 23 Aug 2018 17:20:45 +0530 From: Rahul Jain <rahul.j...@samsung.com> To: "connman@lists.01.org" <connman@lists.01.org> Cc: AMIT KUMAR JAISWAL <amit.jais...@samsung.com> Subject: [PATCH] ipconfig: Incase of Manual IP Configuration, saving Gateway Message-ID: <20180823115045epcms5p280afcfaa9ab389ef02ca15ebe1b90ca1@epcms5p2> Content-Type: text/plain; charset="us-ascii" An HTML attachment was scrubbed... URL: <http://lists.01.org/pipermail/connman/attachments/20180823/dd031ee2/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 13402 bytes Desc: not available URL: <http://lists.01.org/pipermail/connman/attachments/20180823/dd031ee2/attachment.gif> ------------------------------ Subject: Digest Footer _______________________________________________ connman mailing list connman@lists.01.org https://lists.01.org/mailman/listinfo/connman ------------------------------ End of connman Digest, Vol 34, Issue 12 ***************************************