wifi/olpc-mesh: drop assert(companion) from get_autoconnect_allowed()
The comment is wrong. Since 6eaded9071
('device: add
get_autoconnect_allowed() virtual function'), get_autoconnect_allowed()
is called before the device state is consulted.
This commit is contained in:
@@ -82,9 +82,9 @@ get_autoconnect_allowed (NMDevice *device)
|
|||||||
NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (device);
|
NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (device);
|
||||||
NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);
|
NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);
|
||||||
|
|
||||||
/* We shall always have a companion if we're >= DISCONENCTED, and this
|
/* We can't even connect if we don't have a companion yet. */
|
||||||
* ought not be called until then. */
|
if (!priv->companion)
|
||||||
g_return_val_if_fail (priv->companion, FALSE);
|
return FALSE;
|
||||||
|
|
||||||
/* We must not attempt to autoconnect when the companion is connected or
|
/* We must not attempt to autoconnect when the companion is connected or
|
||||||
* connecting, * because we'd tear down its connection. */
|
* connecting, * because we'd tear down its connection. */
|
||||||
|
Reference in New Issue
Block a user