These are no longer constants, this is necessary for the future changes. --- gsupplicant/gsupplicant.h | 4 ++-- gsupplicant/supplicant.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index 344459b..6c22aa4 100644 --- a/gsupplicant/gsupplicant.h +++ b/gsupplicant/gsupplicant.h @@ -171,8 +171,8 @@ typedef struct _GSupplicantScanParams GSupplicantScanParams; struct _GSupplicantPeerParams { const char *identifier; - const char *wps_pin; - const char *path; + char *wps_pin; + char *path; }; typedef struct _GSupplicantPeerParams GSupplicantPeerParams; diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 99a8d06..a371a88 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -4641,6 +4641,8 @@ static void interface_p2p_connect_result(const char *error, data->callback(err, data->interface, data->user_data); g_free(data->path); + g_free(data->peer->wps_pin); + g_free(data->peer->path); g_free(data->peer); g_free(data); } @@ -4708,7 +4710,7 @@ int g_supplicant_interface_p2p_connect(GSupplicantInterface *interface, if (!peer) return -ENODEV; - peer_params->path = peer->path; + peer_params->path = g_strdup(peer->path); } data = dbus_malloc0(sizeof(*data)); -- 1.8.5.5 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman