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. [PATCH 1/1] gweb: Add NULL check before use (Ravi Prasad RK)
2. Re: [PATCH] Store passphrase(PSK) after WPS provisioning has
successfully completed (Patrik Flykt)
3. Re: [PATCH 1/1] gweb: Add NULL check before use (Patrik Flykt)
4. [PATCH] technology: Allow raw key for tethering (i.e. 64
bytes in hexadecimal representation) (Jose Blanquicet)
----------------------------------------------------------------------
Message: 1
Date: Thu, 14 Apr 2016 10:46:55 +0530
From: Ravi Prasad RK <[email protected]>
To: [email protected]
Cc: Ravi Prasad RK <[email protected]>
Subject: [PATCH 1/1] gweb: Add NULL check before use
Message-ID: <[email protected]>
As per code logic, 'begin' and 'end' will never be NULL.
So, NULL check for g_strdup() call is redundant.
---
gweb/gweb.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/gweb/gweb.c b/gweb/gweb.c
index 5f18a0e..6ce5028 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1465,6 +1465,9 @@ GWebParser *g_web_parser_new(const char *begin, const
char *end,
{
GWebParser *parser;
+ if (!begin || !end)
+ return NULL;
+
parser = g_try_new0(GWebParser, 1);
if (!parser)
return NULL;
@@ -1473,12 +1476,6 @@ GWebParser *g_web_parser_new(const char *begin, const
char *end,
parser->begin_token = g_strdup(begin);
parser->end_token = g_strdup(end);
-
- if (!parser->begin_token) {
- g_free(parser);
- return NULL;
- }
-
parser->func = func;
parser->user_data = user_data;
--
1.7.9.5
------------------------------
Message: 2
Date: Thu, 14 Apr 2016 09:35:54 +0300
From: Patrik Flykt <[email protected]>
To: Jose Blanquicet <[email protected]>, [email protected]
Subject: Re: [PATCH] Store passphrase(PSK) after WPS provisioning has
successfully completed
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
On Wed, 2016-04-13 at 10:36 +0200, Jose Blanquicet wrote:
> When WPS Provisioning finished successfully, the passphrase gotten
> from?
> the WPS Credentials is stored first in the network structure in?
> handle_wps_completion() and then on the service structure in?
> service_indicate_state(). The problems is that the service's
> settings?
> file is created/updated through service_save() before updating the?
> service structure with the new passphrase. Therefore, the passphrase
> is?
> not actually written in the file.?
>
> This patch moves the updating of the passphrase before storing the?
> information in the settings file.
Applied, thanks!
> ---
> ?src/service.c | 20 ++++++++++----------
> ?1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/src/service.c b/src/service.c
> index 1fff483..361e8e4 100644
> --- a/src/service.c
> +++ b/src/service.c
> @@ -5402,16 +5402,6 @@ static int service_indicate_state(struct
> connman_service *service)
> ?
> ? reply_pending(service, 0);
> ?
> - g_get_current_time(&service->modified);
> - service_save(service);
> -
> - dns_changed(service);
> - domain_changed(service);
> - proxy_changed(service);
> -
> - if (old_state != CONNMAN_SERVICE_STATE_ONLINE)
> - __connman_notifier_connect(service->type);
> -
> ? if (service->type == CONNMAN_SERVICE_TYPE_WIFI &&
> ? connman_network_get_bool(service->network,
> ? "WiFi.UseWPS")) {
> @@ -5425,6 +5415,16 @@ static int service_indicate_state(struct
> connman_service *service)
> ? connman_network_set_bool(service->network,
> ? "WiFi.UseWPS
> ", false);
> ? }
> +
This line contained a trailing whitespace, watch out for those in the
future. I fixed this in order not to have another worst case roundtrip
of 24h.
> + g_get_current_time(&service->modified);
> + service_save(service);
> +
> + dns_changed(service);
> + domain_changed(service);
> + proxy_changed(service);
> +
> + if (old_state != CONNMAN_SERVICE_STATE_ONLINE)
> + __connman_notifier_connect(service->type);
> ?
> ? method = __connman_ipconfig_get_method(service-
> >ipconfig_ipv6);
> ? if (method == CONNMAN_IPCONFIG_METHOD_OFF)
Patrik
------------------------------
Message: 3
Date: Thu, 14 Apr 2016 09:36:14 +0300
From: Patrik Flykt <[email protected]>
To: Ravi Prasad RK <[email protected]>, [email protected]
Subject: Re: [PATCH 1/1] gweb: Add NULL check before use
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"
On Thu, 2016-04-14 at 10:46 +0530, Ravi Prasad RK wrote:
> As per code logic, 'begin' and 'end' will never be NULL.
> So, NULL check for g_strdup() call is redundant.
Applied, thanks!
Patrik
------------------------------
Message: 4
Date: Thu, 14 Apr 2016 11:18:13 +0200
From: Jose Blanquicet <[email protected]>
To: [email protected]
Subject: [PATCH] technology: Allow raw key for tethering (i.e. 64
bytes in hexadecimal representation)
Message-ID: <[email protected]>
Although the gsupplicant component allows to use a raw key when a new
network is being created through the function add_network_security_psk,
the technology component does not allow it because in order to set the
property TetheringPassphrase the string's length must be within the
range [8, 63], otherwise it will be taken as wrong value without check
if it is a raw key.
---
src/technology.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/technology.c b/src/technology.c
index 1891d06..ffc34ca 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -917,13 +917,21 @@ static DBusMessage *set_property(DBusConnection *conn,
}
} else if (g_str_equal(name, "TetheringPassphrase")) {
const char *str;
+ int i;
+ size_t len;
dbus_message_iter_get_basic(&value, &str);
+ len = strlen(str);
if (technology->type != CONNMAN_SERVICE_TYPE_WIFI)
return __connman_error_not_supported(msg);
- if (strlen(str) < 8 || strlen(str) > 63)
+ if (len == 64) {
+ for (i = 0; i < 64; i++)
+ if (!g_ascii_isxdigit(str[i]))
+ return
__connman_error_passphrase_required(msg);
+ }
+ else if (len < 8 || len > 63)
return __connman_error_passphrase_required(msg);
if (g_strcmp0(technology->tethering_passphrase, str) != 0) {
--
1.9.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman
------------------------------
End of connman Digest, Vol 6, Issue 10
**************************************