diff --git a/app/appClient.go b/app/appClient.go index 04ba9cc..bd2e488 100644 --- a/app/appClient.go +++ b/app/appClient.go @@ -6,7 +6,6 @@ import ( "cwtch.im/cwtch/storage" "fmt" "git.openprivacy.ca/openprivacy/libricochet-go/log" - "path" ) diff --git a/event/bridge/pipeBridge-windows.go b/event/bridge/pipeBridge-windows.go new file mode 100644 index 0000000..1671ad9 --- /dev/null +++ b/event/bridge/pipeBridge-windows.go @@ -0,0 +1,19 @@ +// +build windows + +package bridge + +import ( + "cwtch.im/cwtch/event" + "log" +) + +func NewPipeBridgeClient(inFilename, outFilename string) event.IPCBridge { + log.Fatal("Not supported on windows") + return nil +} + +// NewPipeBridgeService returns a pipe backed IPCBridge for a service +func NewPipeBridgeService(inFilename, outFilename string) event.IPCBridge { + log.Fatal("Not supported on windows") + return nil +} diff --git a/event/bridge/pipeBridge.go b/event/bridge/pipeBridge.go index bd97c42..03c5bb9 100644 --- a/event/bridge/pipeBridge.go +++ b/event/bridge/pipeBridge.go @@ -1,3 +1,5 @@ +// +build !windows + package bridge import ( @@ -5,12 +7,12 @@ import ( "encoding/base64" "encoding/binary" "git.openprivacy.ca/openprivacy/libricochet-go/log" + "syscall" "cwtch.im/cwtch/event" "encoding/json" "os" "sync" - "syscall" ) /* pipeBridge creates a pair of named pipes diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 8dcd33a..ba23923 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -189,11 +189,11 @@ func (cp *cwtchPeer) GetProfile() *model.Profile { } func (cp *cwtchPeer) GetPeerState(onion string) connections.ConnectionState { - return connections.ConnectionStateType[cp.Profile.Contacts[onion].State] + return connections.ConnectionStateToType[cp.Profile.Contacts[onion].State] } func (cp *cwtchPeer) GetGroupState(groupid string) connections.ConnectionState { - return connections.ConnectionStateType[cp.Profile.Groups[groupid].State] + return connections.ConnectionStateToType[cp.Profile.Groups[groupid].State] } // PeerWithOnion is the entry point for cwtchPeer relationships diff --git a/protocol/connections/state.go b/protocol/connections/state.go index 7b5037f..5e7f527 100644 --- a/protocol/connections/state.go +++ b/protocol/connections/state.go @@ -23,7 +23,7 @@ var ( // ConnectionStateName allows conversion of states to their string representations ConnectionStateName = []string{"Disconnected", "Connecting", "Connected", "Authenticated", "Synced", "Failed", "Killed"} - // ConnectionStateType allows conversion of strings to their state type - ConnectionStateType = map[string]ConnectionState{"Disconnected": DISCONNECTED, "Connecting": CONNECTING, + // ConnectionStateToType allows conversion of strings to their state type + ConnectionStateToType = map[string]ConnectionState{"Disconnected": DISCONNECTED, "Connecting": CONNECTING, "Connected": CONNECTED, "Authenticated": AUTHENTICATED, "Synced": SYNCED, "Failed": FAILED, "Killed": KILLED} )