[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [goptlib/master] Rearrange some assignments.



commit 8d092aa5bb26b6d5db39fb8b94029726f580371f
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Tue Dec 10 23:15:24 2013 -0800

    Rearrange some assignments.
---
 pt.go |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/pt.go b/pt.go
index 50a2e1f..d0ce0b8 100644
--- a/pt.go
+++ b/pt.go
@@ -527,18 +527,18 @@ func ServerSetup(methodNames []string) (info ServerInfo, err error) {
 	}
 	line("VERSION", ver)
 
-	orPort, err := getenvRequired("TOR_PT_ORPORT")
+	info.Bindaddrs, err = getServerBindaddrs(methodNames)
 	if err != nil {
 		return
 	}
-	info.OrAddr, err = resolveAddr(orPort)
+
+	orPort, err := getenvRequired("TOR_PT_ORPORT")
 	if err != nil {
-		err = envError(fmt.Sprintf("cannot resolve TOR_PT_ORPORT %q: %s", orPort, err.Error()))
 		return
 	}
-
-	info.Bindaddrs, err = getServerBindaddrs(methodNames)
+	info.OrAddr, err = resolveAddr(orPort)
 	if err != nil {
+		err = envError(fmt.Sprintf("cannot resolve TOR_PT_ORPORT %q: %s", orPort, err.Error()))
 		return
 	}
 
@@ -550,7 +550,6 @@ func ServerSetup(methodNames []string) (info ServerInfo, err error) {
 			return
 		}
 	}
-
 	var authCookieFilename = getenv("TOR_PT_AUTH_COOKIE_FILE")
 	if authCookieFilename != "" {
 		info.AuthCookie, err = readAuthCookieFile(authCookieFilename)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits