Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
JAliEn
JAliEn-ROOT
Commits
fc96abc5
Commit
fc96abc5
authored
Jul 04, 2019
by
Volodymyr Yurchenko
Browse files
Pass credentials to ConnectJBox
parent
58caa378
Pipeline
#957927
passed with stage
in 2 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
inc/TJAlienConnectionManager.h
View file @
fc96abc5
...
...
@@ -38,10 +38,10 @@ private:
const
int
default_WSport
=
8097
;
const
std
::
string
default_server
=
DEFAULT_JCENTRAL_SERVER
;
std
::
string
fWSHost
;
// websocket
por
t
int
fWSPort
;
// websocket port
TString
sUsercert
;
// location of user certificate
TString
sUserkey
;
// location of user private key
std
::
string
fWSHost
;
// websocket
hos
t
int
fWSPort
;
// websocket port
TString
sUsercert
;
// location of user certificate
TString
sUserkey
;
// location of user private key
// Libwebsockets
static
int
destroy_flag
;
// Flags to know connection status
...
...
@@ -69,7 +69,7 @@ public:
TJAlienConnectionManager
();
~
TJAlienConnectionManager
();
int
CreateConnection
();
void
ConnectJBox
();
void
ConnectJBox
(
TJAlienCredentialsObject
c
);
void
ConnectJCentral
(
TJAlienCredentialsObject
c
,
string
host
=
DEFAULT_JCENTRAL_SERVER
);
void
MakeWebsocketConnection
(
TJAlienCredentialsObject
creds
,
string
host
,
int
WSPort
);
void
ForceRestart
();
...
...
src/TJAlienConnectionManager.cxx
View file @
fc96abc5
...
...
@@ -45,7 +45,7 @@ int TJAlienConnectionManager::CreateConnection()
}
if
(
co
.
kind
==
cJBOX_TOKEN
||
co
.
kind
==
cJOB_TOKEN
)
{
ConnectJBox
();
ConnectJBox
(
co
);
}
if
(
connection_flag
)
{
...
...
@@ -99,14 +99,8 @@ void TJAlienConnectionManager::clearFlags()
}
//______________________________________________________________________________
void
TJAlienConnectionManager
::
ConnectJBox
()
void
TJAlienConnectionManager
::
ConnectJBox
(
TJAlienCredentialsObject
c
)
{
if
(
!
creds
.
has
(
cJBOX_TOKEN
))
{
return
;
}
TJAlienCredentialsObject
c
=
creds
.
get
(
cJBOX_TOKEN
);
TJClientFile
jcf
;
if
(
jcf
.
isValid
)
{
MakeWebsocketConnection
(
c
,
(
std
::
string
)
jcf
.
fHost
,
jcf
.
fWSPort
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment