...
 
Commits (7)
  • Daniel Wagner's avatar
    service: Return OperationAborted when agent gets Canceled · 2faa7972
    Daniel Wagner authored
    When the user decided to cancel the connect attempt, the agent sends
    net.connman.Agent.Error.Canceled. Currently, we return InvalidArgument
    for normal non-hidden networks and ConnectedAborted for hidden
    networks. Return OperationAborted also for non-hidden networks to
    avoid confusion on the user ends. That means the cancel operation was
    successful and nothing went wrong as invalid argument indicates.
    
    Reported by Vasyl Vavrychuk.
    2faa7972
  • Benoît Monin's avatar
    service: Signal when services are moved · be165aa6
    Benoît Monin authored
    When calling MoveBefore or MoveAfter on a service, no signal is emitted
    by ConnMan. This makes it impossible for a D-Bus client to maintain an
    ordered list of services in sync with ConnMan.
    
    This patch schedules the emission of the signal ServicesChanged from the
    function move_service(), so the new list will get published over D-Bus.
    be165aa6
  • Jussi Laakkonen's avatar
    service: Prevent sending D-Bus error reply twice with hidden networks · 1a49ce63
    Jussi Laakkonen authored
    When the input request has timed out or some other error has occurred do
    not allow to send duplicate D-Bus error replies. This would result in
    crashes when hidden network is first informed with ETIMEDOUT and error
    is returned and if the __connman_device_request_hidden_scan() reports an
    error or that it is already running (EALREADY) and then second error
    reply is sent.
    
    After each reply to pending D-Bus message (reply_pending()) the
    service->pending is set NULL but since request_input_cb() holds the
    reference to the pending D-Bus message (user_data) there will be a
    second reply.
    
    This fixes the issue by 1) recording the error also when D-Bus error is
    other than Canceled to prevent connecting attempt at done label and 2)
    skipping hidden network connect in such case as well.
    1a49ce63
  • Jussi Laakkonen's avatar
    Add service_schedule_changed() proto before move_service() · f93b8475
    Jussi Laakkonen authored
    Get fork to build after including upstream commit, in fork:
    be165aa6 - in upstream:
    acf200507c9a9648f0839d9a11d0a1215ae99a41
    f93b8475
  • Santtu Lakkala's avatar
  • Santtu Lakkala's avatar
    Merge branch 'jb46450' into 'master' · 3629617c
    Santtu Lakkala authored
    [connman] Fix hidden WiFi crashes and hidden property saving. JB#46450
    
    See merge request !224
    3629617c
  • Santtu Lakkala's avatar
......@@ -54,6 +54,8 @@ Methods void Release()
keys are the field names and the values are the
actual fields. Alternatively an error indicating that
the request got canceled can be returned.
OperationAborted will be return on a successfull
cancel request.
Most common return field names are "Name" and of
course "Passphrase".
......
......@@ -152,6 +152,7 @@ struct wifi_bss {
gulong event_id[BSS_EVENT_COUNT];
GUtilIntHistory *history; /* Signal strength history */
guint strength; /* Median strength */
gboolean hidden;
};
typedef enum wifi_network_state {
......@@ -2558,8 +2559,14 @@ static void wifi_device_bss_add_3(struct wifi_device *dev,
}
if (net) {
struct connman_service *service;
DBG("adding %s to %s", bss->path, ident);
service = connman_service_lookup_from_network(net->network);
GASSERT(service);
if (service && bss_data->hidden)
__connman_service_set_hidden(service);
/*
* We are keeping BSS-less networks alive for some time in
* the hope that they will recover. And sometimes they do!
......@@ -2589,6 +2596,8 @@ static void wifi_device_bss_add_3(struct wifi_device *dev,
service = connman_service_lookup_from_network(net->network);
GASSERT(service);
if (service) {
if (bss_data->hidden)
__connman_service_set_hidden(service);
connman_service_create_ip4config(service, dev->ifi);
connman_service_create_ip6config(service, dev->ifi);
}
......@@ -2705,11 +2714,14 @@ static void wifi_device_bss_add_2(struct wifi_device *dev,
/* Assign SSID and add put it back */
hidden->ssid = g_bytes_ref(bss->ssid);
wifi_device_bss_add_3(dev, hidden);
bss_data->hidden = TRUE;
}
} else {
/* No SSID broadcast */
struct wifi_bss *named = wifi_device_named_bss(dev,
bss->bssid);
bss_data->hidden = TRUE;
if (named) {
/* We already know SSID for this network */
bss_data->ssid = g_bytes_ref(named->ssid);
......@@ -2717,6 +2729,7 @@ static void wifi_device_bss_add_2(struct wifi_device *dev,
(int)g_bytes_get_size(named->ssid),
(char*)g_bytes_get_data(named->ssid,
NULL));
named->hidden = TRUE;
}
}
wifi_device_bss_add_3(dev, bss_data);
......
This diff is collapsed.