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. Create statistics file and service folder strictly only after
successful connect (Jose Blanquicet)
----------------------------------------------------------------------
Message: 1
Date: Fri, 24 Feb 2017 08:12:30 +0000
From: Jose Blanquicet <[email protected]>
To: [email protected]
Subject: Create statistics file and service folder strictly only after
successful connect
Message-ID:
<cafc8ij+116bd3jyret7-ua98csh4zjrqapy-gvvui0hnd+p...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi,
We noticed that the service directory and the statistics file are
created even if the connection is not successful because for example
user entered an incorrect key.
I think that it is because before starting the connection process,
ConnMan tries to read the statistics file in
service.c:service_connect(). Doing so, the function
__connman_stats_service_register() will create the directory and the
file if they do not exists. I saw that commit 50fb779bc95 already
tried to solved this but it still happens.
To solve this, I propose to either do the same of 50fb779bc95 in
service_connect():
- if (__connman_stats_service_register(service) == 0) {
+ if (!service->new_service &&
+
__connman_stats_service_register(service) == 0) {
Or, maybe better, why ConnMan needs to access the file that early?
Shouldn't it be done when service goes into CONFIGURATION state or
READY state for new services? If it does not break any statistics
feature, I would suggest to completely remove that piece of code from
service_connect():
- if (__connman_stats_service_register(service) == 0) {
- __connman_stats_get(service, false,
- &service->stats.data);
- __connman_stats_get(service, true,
- &service->stats_roaming.data);
- }
What do yo think?
Regards,
Jose Blanquicet
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 16, Issue 25
***************************************