Merge lp:~phablet-team/messaging-framework/maintain-connection-state into lp:messaging-framework
- maintain-connection-state
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Olivier Tilloy |
Approved revision: | 73 |
Merged at revision: | 70 |
Proposed branch: | lp:~phablet-team/messaging-framework/maintain-connection-state |
Merge into: | lp:messaging-framework |
Prerequisite: | lp:~phablet-team/messaging-framework/limit-group-title-characters |
Diff against target: |
103 lines (+18/-8) 6 files modified
debian/changelog (+7/-0) include/messaging/connection.h (+1/-1) src/messaging/qt/network_monitor.cpp (+5/-2) src/messaging/qt/tp/connection.cpp (+3/-3) tests/mock_connection.h (+1/-1) tests/unit/messaging/connection_test.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~phablet-team/messaging-framework/maintain-connection-state |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
system-apps-ci-bot | continuous-integration | Approve | |
Gustavo Pichorim Boiko (community) | Approve | ||
Review via email: mp+309150@code.launchpad.net |
Commit message
Sets a reason when disconnecting, to differenciate if user requested disconnection or is it due to a network matter
Description of the change
Sets a reason when disconnecting, to differenciate if user requested disconnection or is it due to a network matter
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:73
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Gustavo Pichorim Boiko (boiko) wrote : | # |
Just one question.
Roberto Mier Escandon (rmescandon) wrote : | # |
Answered
Gustavo Pichorim Boiko (boiko) wrote : | # |
Looks good!
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
system-apps-ci-bot (system-apps-ci-bot) : | # |
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2016-10-05 11:38:59 +0000 | |||
3 | +++ debian/changelog 2016-10-25 18:17:47 +0000 | |||
4 | @@ -1,3 +1,10 @@ | |||
5 | 1 | messaging-framework (0.1+16.10.20161025-2ubuntu28) vivid; urgency=medium | ||
6 | 2 | |||
7 | 3 | * Added reason if calling disconnect() api method | ||
8 | 4 | * Report dbus error if failed to validate group subject | ||
9 | 5 | |||
10 | 6 | -- Roberto Mier Escandon <roberto.escandon@canonical.com> Tue, 25 Oct 2016 13:46:47 +0200 | ||
11 | 7 | |||
12 | 1 | messaging-framework (0.1+16.10.20161005-1ubuntu28) vivid; urgency=medium | 8 | messaging-framework (0.1+16.10.20161005-1ubuntu28) vivid; urgency=medium |
13 | 2 | 9 | ||
14 | 3 | * Self identifier support | 10 | * Self identifier support |
15 | 4 | 11 | ||
16 | === modified file 'include/messaging/connection.h' | |||
17 | --- include/messaging/connection.h 2016-10-05 11:37:10 +0000 | |||
18 | +++ include/messaging/connection.h 2016-10-25 18:17:47 +0000 | |||
19 | @@ -93,7 +93,7 @@ | |||
20 | 93 | virtual void connect() = 0; | 93 | virtual void connect() = 0; |
21 | 94 | 94 | ||
22 | 95 | /// @brief login signs out from server if logged in | 95 | /// @brief login signs out from server if logged in |
24 | 96 | virtual void disconnect() = 0; | 96 | virtual void disconnect(StatusChangedReason reason) = 0; |
25 | 97 | 97 | ||
26 | 98 | /// @brief normalize identifier | 98 | /// @brief normalize identifier |
27 | 99 | virtual std::string normalize_identifier(const std::string &id) = 0; | 99 | virtual std::string normalize_identifier(const std::string &id) = 0; |
28 | 100 | 100 | ||
29 | === modified file 'src/messaging/qt/network_monitor.cpp' | |||
30 | --- src/messaging/qt/network_monitor.cpp 2016-07-18 11:42:37 +0000 | |||
31 | +++ src/messaging/qt/network_monitor.cpp 2016-10-25 18:17:47 +0000 | |||
32 | @@ -47,7 +47,7 @@ | |||
33 | 47 | refresh_timer_.setSingleShot(true); | 47 | refresh_timer_.setSingleShot(true); |
34 | 48 | connect(&refresh_timer_, | 48 | connect(&refresh_timer_, |
35 | 49 | SIGNAL(timeout()), | 49 | SIGNAL(timeout()), |
37 | 50 | SLOT(idle_refresh())); | 50 | SLOT(idle_refresh()), Qt::QueuedConnection); |
38 | 51 | } | 51 | } |
39 | 52 | 52 | ||
40 | 53 | /*! | 53 | /*! |
41 | @@ -75,6 +75,8 @@ | |||
42 | 75 | SIGNAL(updateCompleted()), | 75 | SIGNAL(updateCompleted()), |
43 | 76 | this, | 76 | this, |
44 | 77 | SLOT(refresh())); | 77 | SLOT(refresh())); |
45 | 78 | |||
46 | 79 | current_ssid_ = std::string{}; | ||
47 | 78 | } | 80 | } |
48 | 79 | 81 | ||
49 | 80 | /*! | 82 | /*! |
50 | @@ -119,7 +121,8 @@ | |||
51 | 119 | auto sp = connection_.lock(); | 121 | auto sp = connection_.lock(); |
52 | 120 | if (sp) | 122 | if (sp) |
53 | 121 | { | 123 | { |
55 | 122 | sp->disconnect(); | 124 | // disconnect, not specifying reason for fw try to reconnect when changed to a no connection status |
56 | 125 | sp->disconnect(Connection::StatusChangedReason::network_error); | ||
57 | 123 | stop_monitoring(); | 126 | stop_monitoring(); |
58 | 124 | } | 127 | } |
59 | 125 | } | 128 | } |
60 | 126 | 129 | ||
61 | === modified file 'src/messaging/qt/tp/connection.cpp' | |||
62 | --- src/messaging/qt/tp/connection.cpp 2016-10-09 16:01:04 +0000 | |||
63 | +++ src/messaging/qt/tp/connection.cpp 2016-10-25 18:17:47 +0000 | |||
64 | @@ -245,11 +245,11 @@ | |||
65 | 245 | 245 | ||
66 | 246 | void mqt::tp::Connection::onDisconnected() | 246 | void mqt::tp::Connection::onDisconnected() |
67 | 247 | { | 247 | { |
68 | 248 | setStatus(Tp::ConnectionStatusDisconnected, Tp::ConnectionStatusReasonRequested); | ||
69 | 249 | |||
70 | 250 | try | 248 | try |
71 | 251 | { | 249 | { |
73 | 252 | connection->disconnect(); | 250 | // request the api a disconnection. The requested reason is because this case comes externally |
74 | 251 | // by a telepathy disconnection of the plugin | ||
75 | 252 | connection->disconnect(messaging::Connection::StatusChangedReason::requested); | ||
76 | 253 | network_monitor_.stop_monitoring(); | 253 | network_monitor_.stop_monitoring(); |
77 | 254 | } | 254 | } |
78 | 255 | catch (...) | 255 | catch (...) |
79 | 256 | 256 | ||
80 | === modified file 'tests/mock_connection.h' | |||
81 | --- tests/mock_connection.h 2016-10-05 11:37:10 +0000 | |||
82 | +++ tests/mock_connection.h 2016-10-25 18:17:47 +0000 | |||
83 | @@ -50,7 +50,7 @@ | |||
84 | 50 | MOCK_METHOD0(messenger, std::shared_ptr<messaging::Messenger>()); | 50 | MOCK_METHOD0(messenger, std::shared_ptr<messaging::Messenger>()); |
85 | 51 | MOCK_METHOD0(group_starter, std::shared_ptr<messaging::GroupStarter>()); | 51 | MOCK_METHOD0(group_starter, std::shared_ptr<messaging::GroupStarter>()); |
86 | 52 | MOCK_METHOD0(connect, void()); | 52 | MOCK_METHOD0(connect, void()); |
88 | 53 | MOCK_METHOD0(disconnect, void()); | 53 | MOCK_METHOD1(disconnect, void(StatusChangedReason)); |
89 | 54 | MOCK_METHOD1(normalize_identifier, std::string(const std::string&)); | 54 | MOCK_METHOD1(normalize_identifier, std::string(const std::string&)); |
90 | 55 | MOCK_METHOD1(is_valid_identifier, bool(const std::string&)); | 55 | MOCK_METHOD1(is_valid_identifier, bool(const std::string&)); |
91 | 56 | 56 | ||
92 | 57 | 57 | ||
93 | === modified file 'tests/unit/messaging/connection_test.cpp' | |||
94 | --- tests/unit/messaging/connection_test.cpp 2016-10-05 11:37:10 +0000 | |||
95 | +++ tests/unit/messaging/connection_test.cpp 2016-10-25 18:17:47 +0000 | |||
96 | @@ -51,7 +51,7 @@ | |||
97 | 51 | } | 51 | } |
98 | 52 | 52 | ||
99 | 53 | void connect() {} | 53 | void connect() {} |
101 | 54 | void disconnect() {} | 54 | void disconnect(StatusChangedReason) {} |
102 | 55 | std::string normalize_identifier(const std::string& id) { return id; } | 55 | std::string normalize_identifier(const std::string& id) { return id; } |
103 | 56 | bool is_valid_identifier(const std::string &id) { return !id.empty(); } | 56 | bool is_valid_identifier(const std::string &id) { return !id.empty(); } |
104 | 57 | 57 |
FAILED: Continuous integration, rev:72 /code.launchpad .net/~phablet- team/messaging- framework/ maintain- connection- state/+ merge/309150/ +edit-commit- message
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
https:/ /jenkins. canonical. com/system- apps/job/ lp-messaging- framework- ci/88/ /jenkins. canonical. com/system- apps/job/ build/1883 /jenkins. canonical. com/system- apps/job/ test-0- autopkgtest/ label=phone- armhf,release= vivid+overlay, testname= default/ 457 /jenkins. canonical. com/system- apps/job/ build-0- fetch/1884 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1725/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1725 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1725/artifact/ output/ *zip*/output. zip
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-messaging- framework- ci/88/rebuild
https:/