Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(581)

Delta Between Two Patch Sets: ssh/session_test.go

Issue 10113043: code review 10113043: go.crypto: remove unreachable code. (Closed)
Left Patch Set: Created 11 years, 9 months ago
Right Patch Set: diff -r 627fbe8ff755 https://code.google.com/p/go.crypto/ Created 11 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « ssh/server_terminal.go ('k') | ssh/transport.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package ssh 5 package ssh
6 6
7 // Session tests. 7 // Session tests.
8 8
9 import ( 9 import (
10 "bytes" 10 "bytes"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if ch.ChannelType() != "session" { 55 if ch.ChannelType() != "session" {
56 ch.Reject(UnknownChannelType, "unknown channel t ype") 56 ch.Reject(UnknownChannelType, "unknown channel t ype")
57 continue 57 continue
58 } 58 }
59 ch.Accept() 59 ch.Accept()
60 go func() { 60 go func() {
61 defer close(done) 61 defer close(done)
62 handler(ch.(*serverChan), t) 62 handler(ch.(*serverChan), t)
63 }() 63 }()
64 } 64 }
65 <-done
66 }() 65 }()
67 66
68 config := &ClientConfig{ 67 config := &ClientConfig{
69 User: "testuser", 68 User: "testuser",
70 Auth: []ClientAuth{ 69 Auth: []ClientAuth{
71 ClientAuthPassword(clientPassword), 70 ClientAuthPassword(clientPassword),
72 }, 71 },
73 } 72 }
74 73
75 c, err := Dial("tcp", l.Addr().String(), config) 74 c, err := Dial("tcp", l.Addr().String(), config)
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 msg := channelRequestMsg{ 779 msg := channelRequestMsg{
781 PeersId: ch.remoteId, 780 PeersId: ch.remoteId,
782 Request: "keepalive@openssh.com", 781 Request: "keepalive@openssh.com",
783 WantReply: true, 782 WantReply: true,
784 } 783 }
785 if err := ch.writePacket(marshal(msgChannelRequest, msg)); err != nil { 784 if err := ch.writePacket(marshal(msgChannelRequest, msg)); err != nil {
786 t.Errorf("unable to send channel keepalive request: %v", err) 785 t.Errorf("unable to send channel keepalive request: %v", err)
787 } 786 }
788 sendStatus(0, ch, t) 787 sendStatus(0, ch, t)
789 } 788 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b