diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-28 21:11:57 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-28 21:11:57 (GMT) |
commit | 87f14cff0a86eff014ba52c3cfbbb70ff7cec0b4 (patch) | |
tree | f77ea1eacf2b9635f75441059e6f611059f78b7a /src/rhimportd/ctrlWebSocket.go | |
parent | 99b4f31e7d952664e39c5c76f03e08da00097053 (diff) |
incoporate latest rhrd-go changes
Diffstat (limited to 'src/rhimportd/ctrlWebSocket.go')
-rw-r--r-- | src/rhimportd/ctrlWebSocket.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rhimportd/ctrlWebSocket.go b/src/rhimportd/ctrlWebSocket.go index 74b88e3..f6b84da 100644 --- a/src/rhimportd/ctrlWebSocket.go +++ b/src/rhimportd/ctrlWebSocket.go @@ -192,7 +192,7 @@ func sendWebSocketDoneResponse(ws *websocket.Conn, code int, errStr, id, refid s type webSocketSession struct { id string refId string - session *rhimport.SessionChan + session *rhimport.Session progresschan chan rhimport.ProgressData donechan chan rhimport.Result } @@ -225,7 +225,7 @@ func webSocketDone(res rhimport.Result, userdata interface{}) bool { return true } -func (self *webSocketSession) startNewSession(reqdata *webSocketRequestData, conf *rhimport.Config, sessions *rhimport.SessionStoreChan) (int, string) { +func (self *webSocketSession) startNewSession(reqdata *webSocketRequestData, conf *rhimport.Config, sessions *rhimport.SessionStore) (int, string) { ctx := rhimport.NewContext(conf, nil, getStdLog("sess-%s-std"), getDbgLog("sess-%s-dbg")) // session store will take of db, stdlog and dbglog ctx.UserName = reqdata.UserName ctx.Password = reqdata.Password @@ -259,7 +259,7 @@ func (self *webSocketSession) startNewSession(reqdata *webSocketRequestData, con return http.StatusOK, "SUCCESS" } -func (self *webSocketSession) reconnectSession(reqdata *webSocketRequestData, sessions *rhimport.SessionStoreChan) (int, string) { +func (self *webSocketSession) reconnectSession(reqdata *webSocketRequestData, sessions *rhimport.SessionStore) (int, string) { s, refId, code, errstring := sessions.Get(reqdata.UserName, reqdata.Id) if code != http.StatusOK { return code, errstring @@ -302,7 +302,7 @@ func webSocketListUpdate(added, removed map[string]string, userdata interface{}) return true } -func webSocketSessionHandler(reqchan <-chan webSocketRequestData, ws *websocket.Conn, conf *rhimport.Config, sessions *rhimport.SessionStoreChan) { +func webSocketSessionHandler(reqchan <-chan webSocketRequestData, ws *websocket.Conn, conf *rhimport.Config, sessions *rhimport.SessionStore) { defer ws.Close() closed := make(chan bool, 1) @@ -376,7 +376,7 @@ func webSocketSessionHandler(reqchan <-chan webSocketRequestData, ws *websocket. } } -func webSocketHandler(conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport.SessionStoreChan, trusted bool, w http.ResponseWriter, r *http.Request) { +func webSocketHandler(conf *rhimport.Config, db *rddb.DB, sessions *rhimport.SessionStore, trusted bool, w http.ResponseWriter, r *http.Request) { rhdl.Printf("WebSocketHandler: %s requests '%s'", r.RemoteAddr, html.EscapeString(r.URL.Path)) ws, err := websocket.Upgrade(w, r, nil, 64*1024, 64*1024) |