[Pkg-privacy-commits] [obfs4proxy] 77/151: Use goptlib's MakeStateDir instead of the one in pt_extras.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:59:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfs4proxy.
commit d9c6ecbf8f293562093535424fb87189b2812351
Author: Yawning Angel <yawning at schwanenlied.me>
Date: Mon Jun 2 18:15:02 2014 +0000
Use goptlib's MakeStateDir instead of the one in pt_extras.
This requires changes in goptlib from last night, people may need to
run "go get -u" to update dependencies before building.
---
obfs4proxy/obfs4proxy.go | 16 +---------------
obfs4proxy/pt_extras.go | 9 ---------
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/obfs4proxy/obfs4proxy.go b/obfs4proxy/obfs4proxy.go
index 46e562e..e19841e 100644
--- a/obfs4proxy/obfs4proxy.go
+++ b/obfs4proxy/obfs4proxy.go
@@ -334,24 +334,10 @@ func clientSetup() (launched bool) {
return
}
-func ptGetStateDir() (dir string, err error) {
- dir = os.Getenv("TOR_PT_STATE_LOCATION")
- if dir == "" {
- return
- }
-
- err = os.MkdirAll(dir, 0755)
- if err != nil {
- log.Fatalf("[ERROR] Failed to create path: %s", err)
- }
-
- return
-}
-
func ptInitializeLogging(enable bool) error {
if enable {
// pt.MakeStateDir will ENV-ERROR for us.
- dir, err := ptMakeStateDir()
+ dir, err := pt.MakeStateDir()
if err != nil {
return err
}
diff --git a/obfs4proxy/pt_extras.go b/obfs4proxy/pt_extras.go
index 124f076..2d09cc3 100644
--- a/obfs4proxy/pt_extras.go
+++ b/obfs4proxy/pt_extras.go
@@ -58,15 +58,6 @@ func ptProxyDone() {
pt.Stdout.Write(line)
}
-func ptMakeStateDir() (string, error) {
- dir := os.Getenv("TOR_PT_STATE_LOCATION")
- if dir == "" {
- return "", ptEnvError("no TOR_PT_STATE_LOCATION enviornment variable")
- }
- err := os.MkdirAll(dir, 0700)
- return dir, err
-}
-
func ptIsClient() (bool, error) {
clientEnv := os.Getenv("TOR_PT_CLIENT_TRANSPORTS")
serverEnv := os.Getenv("TOR_PT_SERVER_TRANSPORTS")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git
More information about the Pkg-privacy-commits
mailing list