Ticket #2453 defect closed fixed

Opened 6 years ago

Last modified 2 years ago

SSHSessionProcessProtocol does not implement getHost/getPeer.

Reported by: jrydberg Owned by: exarkun
Priority: normal Milestone:
Component: conch Keywords: soc2007 easy
Cc: Branch: branches/session-transport-addresses-2453
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

Description

session.SSHSessionProcessProtocol does not implement getHost/getPeer methods of the transport interface.

Attachments

twisted-2453.diff Download (4.1 KB) - added by salgado 2 years ago.

Change History

1

Changed 6 years ago by z3p

  • keywords soc2007 added

Tagging soc2007

2

Changed 2 years ago by <automation>

  • owner z3p deleted

3

Changed 2 years ago by exarkun

  • keywords easy added

These should return some sort of IAddress. An easy solution would be to just return the host/peer that the corresponding getHost or getPeer method on the wrapped session.conn.transport would return (of course it's somewhat gross to reach that far out of the SSHSessionProcessProtocol... but it's not exactly surprising in Conch).

4

Changed 2 years ago by salgado

I'm probably missing something, but it confuses me that SSHSessionProcessProtocol should implement methods of the transport interface when it doesn't seem to provide ITransport?

5

Changed 2 years ago by salgado

  • status changed from new to assigned
  • owner set to salgado

I discussed this with exarkun and it seems that SSHSessionProcessProtocol should be marked as implementing ITransport, so I may do that as well.

Changed 2 years ago by salgado

6

Changed 2 years ago by salgado

This is my first attempt at adding getHost/getPeer to SSHSessionProcessProtocol. I couldn't resist adding/removing some blank lines to make the surroundings of what I changed follow the current policy (2 lines between methods and 3 between top-level classes is what I was told).

7

Changed 2 years ago by salgado

  • owner salgado deleted
  • status changed from assigned to new
  • keywords review added

8

Changed 2 years ago by exarkun

  • branch set to branches/session-transport-addresses-2453
  • branch_author set to exarkun

(In [31141]) Branching to 'session-transport-addresses-2453'

9

Changed 2 years ago by exarkun

(In [31142]) Apply patch from the ticket

refs #2453

10

Changed 2 years ago by exarkun

  • owner set to exarkun
  • keywords review removed
  • status changed from new to assigned

Great, thanks! The tests and implementation look good, except for assertEqual which I'll change to assertEquals before merging.  Build results also look good (at least, as good as I expect them to look at the moment). So I'll go ahead and apply this. Thanks again!

11

Changed 2 years ago by exarkun

  • status changed from assigned to closed
  • resolution set to fixed

(In [31146]) Merge session-transport-addresses-2453

Author: salgado Reviewer: exarkun Fixes: #2453

Add getHost and getPeer methods to SSHSessionProcessProtocol, used as the transport for subsystem protocols.

Note: See TracTickets for help on using tickets.