]> Cypherpunks repositories - gostls13.git/commitdiff
rpc: clean up dregs from June 2010
authorRuss Cox <rsc@golang.org>
Mon, 7 Mar 2011 17:09:00 +0000 (12:09 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 7 Mar 2011 17:09:00 +0000 (12:09 -0500)
In June 2010 I accidentally checked in pending
changes to package rpc in a compiler CL:
https://golang.org/cl/1736041

I backed them out by hand in a followup CL:
https://golang.org/cl/1736042

That followup CL missed the lines being deleted
in this CL, spotted by Petar.

hg diff -r 5678:5683 src/cmd/prof/gopprof \
        src/pkg/image/png/reader.go \
        src/pkg/rpc/client.go \
        src/pkg/rpc/jsonrpc/all_test.go \
        src/pkg/rpc/jsonrpc/server.go \
        src/pkg/rpc/server.go \
        test/arm-pass.txt

confirms that these lines in server.go are the
only ones that were missed by the original followup.

Fixes #1583.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4266046

src/pkg/rpc/server.go

index f185cd16e5a045452c46c1eccab9e300432a9f32..aa51f452f255d263bbbd9862d26493d3a0da93b3 100644 (file)
@@ -166,12 +166,6 @@ type Response struct {
        Error         string // error, if any.
 }
 
-// ClientInfo records information about an RPC client connection.
-type ClientInfo struct {
-       LocalAddr  string
-       RemoteAddr string
-}
-
 // Server represents an RPC Server.
 type Server struct {
        sync.Mutex // protects the serviceMap
@@ -269,13 +263,6 @@ func (server *Server) register(rcvr interface{}, name string, useName bool) os.E
                        log.Println(mname, "reply type not exported:", replyType)
                        continue
                }
-               if mtype.NumIn() == 4 {
-                       t := mtype.In(3)
-                       if t != reflect.Typeof((*ClientInfo)(nil)) {
-                               log.Println(mname, "last argument not *ClientInfo")
-                               continue
-                       }
-               }
                // Method needs one out: os.Error.
                if mtype.NumOut() != 1 {
                        log.Println("method", mname, "has wrong number of outs:", mtype.NumOut())