diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2017-03-21 13:56:36 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2017-05-02 13:30:59 +0000 |
commit | 1893ea57fb31d51c64c20c3376659f9d6a2ea4cf (patch) | |
tree | 60b662e530c939ab4cfcf3b470b8e86917b0aafd /libqdb | |
parent | 842e0c9a9e95c7e8b0b02791f620fd859477d2e1 (diff) |
Reuse network configurations set on device if possible
Don't allow reconfiguring the network on the device without a reset in
between. It wouldn't lead to a working configuration, since the host has
already gotten an IP from the existing configuration at this point.
But if the already configured network happens to be free, use it. This
allows devices to work keeping the same address even if host qdb is
restarted.
This doesn't guard against the possibility that the existing
configuration conflicts with a network already in place. But telling
apart that situation would be too difficult: How to tell whether the
network is the device or something else? In that case the user just
has to replug the device. Then it will pick an unused subnet.
Task-number: QTBUG-59451
Change-Id: I10c948713736dd79442265ac6a590b8a7cf8345a
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Diffstat (limited to 'libqdb')
-rw-r--r-- | libqdb/networkconfigurationcommon.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libqdb/networkconfigurationcommon.h b/libqdb/networkconfigurationcommon.h new file mode 100644 index 0000000..1b146bb --- /dev/null +++ b/libqdb/networkconfigurationcommon.h @@ -0,0 +1,32 @@ +/****************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Debug Bridge. +** +** $QT_BEGIN_LICENSE:COMM$ +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** $QT_END_LICENSE$ +** +******************************************************************************/ +#ifndef NETWORKCONFIGURATIONCOMMON_H +#define NETWORKCONFIGURATIONCOMMON_H + +#include <cstdint> + +enum class ConfigurationResult : uint32_t { + Success, + Failure, + AlreadySet , +}; + +#endif // NETWORKCONFIGURATIONCOMMON_H |