Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
f53cc8e6
Commit
f53cc8e6
authored
Jan 16, 2012
by
Christopher Wedgwood
Committed by
Adam Langley
Jan 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exp/ssh: rename (some) fields
R=dave, agl, agl CC=golang-dev
https://golang.org/cl/5494057
parent
0aaf2c2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
client.go
src/pkg/exp/ssh/client.go
+2
-3
session.go
src/pkg/exp/ssh/session.go
+4
-4
No files found.
src/pkg/exp/ssh/client.go
View file @
f53cc8e6
...
...
@@ -306,9 +306,8 @@ type clientChan struct {
stdout
*
chanReader
// receives the payload of channelData messages
stderr
*
chanReader
// receives the payload of channelExtendedData messages
msg
chan
interface
{}
// incoming messages
theyClosed
bool
// indicates the close msg has been received from the remote side
weClosed
bool
// incidates the close msg has been sent from our side
theyClosed
bool
// indicates the close msg has been received from the remote side
weClosed
bool
// incidates the close msg has been sent from our side
}
// newClientChan returns a partially constructed *clientChan
...
...
src/pkg/exp/ssh/session.go
View file @
f53cc8e6
...
...
@@ -70,7 +70,7 @@ type Session struct {
started
bool
// true once Start, Run or Shell is invoked.
copyFuncs
[]
func
()
error
err
ch
chan
error
// one send per copyFunc
err
ors
chan
error
// one send per copyFunc
// true if pipe method is active
stdinpipe
,
stdoutpipe
,
stderrpipe
bool
...
...
@@ -244,10 +244,10 @@ func (s *Session) start() error {
setupFd
(
s
)
}
s
.
err
ch
=
make
(
chan
error
,
len
(
s
.
copyFuncs
))
s
.
err
ors
=
make
(
chan
error
,
len
(
s
.
copyFuncs
))
for
_
,
fn
:=
range
s
.
copyFuncs
{
go
func
(
fn
func
()
error
)
{
s
.
err
ch
<-
fn
()
s
.
err
ors
<-
fn
()
}(
fn
)
}
return
nil
...
...
@@ -270,7 +270,7 @@ func (s *Session) Wait() error {
var
copyError
error
for
_
=
range
s
.
copyFuncs
{
if
err
:=
<-
s
.
err
ch
;
err
!=
nil
&&
copyError
==
nil
{
if
err
:=
<-
s
.
err
ors
;
err
!=
nil
&&
copyError
==
nil
{
copyError
=
err
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment