Merge lp:~michihenning/storage-framework/no-half-close into lp:storage-framework/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 57
Merged at revision: 59
Proposed branch: lp:~michihenning/storage-framework/no-half-close
Merge into: lp:storage-framework/devel
Diff against target: 47 lines (+12/-0)
2 files modified
src/provider/internal/DownloadJobImpl.cpp (+6/-0)
src/provider/internal/UploadJobImpl.cpp (+6/-0)
To merge this branch: bzr merge lp:~michihenning/storage-framework/no-half-close
Reviewer Review Type Date Requested Status
James Henstridge Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+303754@code.launchpad.net

Commit message

Removed half-close on the provider side because this messes with QLocalSocket on the client side.

Description of the change

Removed half-close on the provider side because this messes with QLocalSocket on the client side: Qt thinks that both channels were closed, so the client can never successfully write data to the socket.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:57
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/90/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/461
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/467
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/372
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/372
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/372
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/302/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/302
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/302/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/90/rebuild

review: Approve (continuous-integration)
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provider/internal/DownloadJobImpl.cpp'
2--- src/provider/internal/DownloadJobImpl.cpp 2016-08-12 01:34:34 +0000
3+++ src/provider/internal/DownloadJobImpl.cpp 2016-08-24 01:19:07 +0000
4@@ -51,6 +51,11 @@
5 }
6 read_socket_ = socks[0];
7 write_socket_ = socks[1];
8+
9+#if 0
10+ // TODO: We should be able to half-close the write channel of the read socket and the read channel of
11+ // the write socket. But, if we do, QLocalSocket indicates that everything was closed, which causes
12+ // failures on the client side. We suspect a QLocalSocket bug -- need to investigate.
13 if (shutdown(read_socket_, SHUT_WR) < 0)
14 {
15 int error_code = errno;
16@@ -63,6 +68,7 @@
17 string msg = "Could not shut down read channel on write socket: " + safe_strerror(error_code);
18 throw ResourceException(msg, error_code);
19 }
20+#endif
21 }
22
23 DownloadJobImpl::~DownloadJobImpl()
24
25=== modified file 'src/provider/internal/UploadJobImpl.cpp'
26--- src/provider/internal/UploadJobImpl.cpp 2016-08-12 01:34:34 +0000
27+++ src/provider/internal/UploadJobImpl.cpp 2016-08-24 01:19:07 +0000
28@@ -51,6 +51,11 @@
29 }
30 read_socket_ = socks[0];
31 write_socket_ = socks[1];
32+
33+#if 0
34+ // TODO: We should be able to half-close the write channel of the read socket, and the read channel of
35+ // the write socket. But, if we do, QLocalSocket indicates that everything was closed, which causes
36+ // failures on the client side. We suspect a QLocalSocket bug -- need to investigate.
37 if (shutdown(read_socket_, SHUT_WR) < 0)
38 {
39 int error_code = errno;
40@@ -63,6 +68,7 @@
41 string msg = "Could not shut down read channel on write socket" + safe_strerror(error_code);
42 throw ResourceException(msg, error_code);
43 }
44+#endif
45 }
46
47 UploadJobImpl::~UploadJobImpl()

Subscribers

People subscribed via source and target branches

to all changes: