D6730: Determine which IP address to use for sshfs
Jean Vincent
noreply at phabricator.kde.org
Thu Jul 20 08:34:51 UTC 2017
jeanv updated this revision to Diff 16937.
jeanv edited the summary of this revision.
jeanv edited the test plan for this revision.
jeanv set the repository for this revision to R224 KDE Connect.
jeanv added a comment.
This seems to work for me. The correct IP address is stored and reused.
When a connection is started with a device, `LanDeviceLink::reset` is called. In it we can get the IP address from the SslSocket and store it as a member in the parent class `DeviceLink`. From there, the sftp plugin can get the device link from its `deviceId` member then the address from this link.
Two things to note, and can perhaps be improved:
- mHostAddress is stored in `DeviceLink` even though it should be a member of `LanDeviceLink`. Unfortunately, the sftp plugin only has access to `DeviceLink`, not its children.
- I had to create a public accessor to get a `DeviceLink` from its id.
REPOSITORY
R224 KDE Connect
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D6730?vs=16903&id=16937
REVISION DETAIL
https://phabricator.kde.org/D6730
AFFECTED FILES
core/backends/devicelink.h
core/backends/lan/landevicelink.cpp
core/device.cpp
core/device.h
plugins/sftp/mounter.cpp
To: jeanv, #kde_connect
Cc: apol, nicolasfella, sredman, tfella, aboudhar, seebauer, progwolff, MayeulC, menasshock, ach, hkaelberer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20170720/475e02dd/attachment.html>
More information about the KDEConnect
mailing list