diff options
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) |