Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
9853f9c4
Commit
9853f9c4
authored
Nov 02, 2015
by
Marcus Nordenberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 62.20.65.89:/data1/git/pwr
parents
98cc6416
203ff8a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
xtt/lib/xtt/src/xtt_log.cpp
xtt/lib/xtt/src/xtt_log.cpp
+5
-0
xtt/lib/xtt/src/xtt_log.h
xtt/lib/xtt/src/xtt_log.h
+1
-0
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+10
-1
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+8
-3
No files found.
xtt/lib/xtt/src/xtt_log.cpp
View file @
9853f9c4
...
...
@@ -165,6 +165,9 @@ void XttLog::category_to_string( xttlog_eCategory category, char *str)
case
xttlog_eCategory_GeConfirmCancel
:
strcpy
(
str
,
"GeConfirmCancel"
);
break
;
case
xttlog_eCategory_User
:
strcpy
(
str
,
"User"
);
break
;
default:
strcpy
(
str
,
""
);
}
...
...
@@ -192,6 +195,8 @@ void XttLog::string_to_category( char *str, xttlog_eCategory *category)
*
category
=
xttlog_eCategory_GeConfirmOk
;
else
if
(
strcmp
(
str
,
"GeConfirmCancel"
)
==
0
)
*
category
=
xttlog_eCategory_GeConfirmCancel
;
else
if
(
strcmp
(
str
,
"User"
)
==
0
)
*
category
=
xttlog_eCategory_User
;
else
*
category
=
xttlog_eCategory_
;
}
...
...
xtt/lib/xtt/src/xtt_log.h
View file @
9853f9c4
...
...
@@ -54,6 +54,7 @@ typedef enum {
xttlog_eCategory_Event
,
xttlog_eCategory_GeConfirmOk
,
xttlog_eCategory_GeConfirmCancel
,
xttlog_eCategory_User
,
xttlog_eCategory__
}
xttlog_eCategory
;
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
9853f9c4
...
...
@@ -3721,7 +3721,8 @@ int XNav::init_brow_base_cb( FlowCtx *fctx, void *client_data)
XNav
*
xnav
=
(
XNav
*
)
client_data
;
BrowCtx
*
ctx
=
(
BrowCtx
*
)
fctx
;
BrowCtx
*
secondary_ctx
;
int
sts
;
int
sts
;
char
msg
[
120
];
if
(
Lng
::
translatefile_coding
()
==
lng_eCoding_UTF_8
)
brow_SetTextCoding
(
ctx
,
flow_eTextCoding_UTF_8
);
...
...
@@ -3788,6 +3789,9 @@ int XNav::init_brow_base_cb( FlowCtx *fctx, void *client_data)
xnav
->
command
(
cmd
);
}
sprintf
(
msg
,
"User %s logged in"
,
xnav
->
user
);
XttLog
::
dlog
(
xttlog_eCategory_User
,
msg
,
0
,
0
);
// Execute the setup script
xnav
->
gbl
.
setupscript_exec
(
xnav
);
...
...
@@ -3846,6 +3850,7 @@ int XNav::login()
char
systemgroup
[
80
];
pwr_sSecurity
sec
;
char
username
[
80
];
char
msg
[
120
];
priv
=
base_priv
=
0
;
...
...
@@ -3865,9 +3870,13 @@ int XNav::login()
strcpy
(
user
,
username
);
strcpy
(
base_user
,
username
);
priv
=
base_priv
=
privilege
;
sprintf
(
msg
,
"User %s logged in"
,
username
);
XttLog
::
dlog
(
xttlog_eCategory_User
,
msg
,
0
,
0
);
return
XNAV__SUCCESS
;
}
priv
=
base_priv
=
sec
.
DefaultXttPriv
;
XttLog
::
dlog
(
xttlog_eCategory_User
,
"No user logged in"
,
0
,
0
);
return
XNAV__SUCCESS
;
}
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
9853f9c4
...
...
@@ -629,10 +629,11 @@ static int xnav_define_func( void *client_data,
static
void
xnav_login_success_bc
(
void
*
ctx
)
{
XNav
*
xnav
=
(
XNav
*
)
ctx
;
char
msg
[
8
0
];
char
msg
[
12
0
];
CoLogin
::
get_login_info
(
0
,
0
,
xnav
->
user
,
(
unsigned
long
*
)
&
xnav
->
priv
,
0
);
sprintf
(
msg
,
"User %s logged in"
,
xnav
->
user
);
XttLog
::
dlog
(
xttlog_eCategory_User
,
msg
,
0
,
0
);
xnav
->
cologin
=
0
;
xnav
->
message
(
'I'
,
msg
);
if
(
xnav
->
op
)
...
...
@@ -653,7 +654,7 @@ static int xnav_login_func( void *client_data,
char
arg2_str
[
80
];
char
systemgroup
[
80
];
unsigned
int
priv
;
char
msg
[
8
0
];
char
msg
[
12
0
];
sts
=
gdh_GetObjectInfo
(
"pwrNode-System.SystemGroup"
,
&
systemgroup
,
sizeof
(
systemgroup
));
...
...
@@ -682,6 +683,7 @@ static int xnav_login_func( void *client_data,
strcpy
(
xnav
->
user
,
arg1_str
);
xnav
->
priv
=
priv
;
sprintf
(
msg
,
"User %s logged in"
,
arg1_str
);
XttLog
::
dlog
(
xttlog_eCategory_User
,
msg
,
0
,
0
);
xnav
->
message
(
'I'
,
msg
);
if
(
xnav
->
op
)
xnav
->
op
->
set_title
(
xnav
->
user
);
...
...
@@ -693,17 +695,20 @@ static int xnav_logout_func( void *client_data,
void
*
client_flag
)
{
XNav
*
xnav
=
(
XNav
*
)
client_data
;
char
msg
[
8
0
];
char
msg
[
12
0
];
int
window
=
ODD
(
dcli_get_qualifier
(
"/MESSAGEWINDOW"
,
0
,
0
));
if
(
strcmp
(
xnav
->
base_user
,
""
)
==
0
)
{
sprintf
(
msg
,
"User %s logged out"
,
xnav
->
user
);
XttLog
::
dlog
(
xttlog_eCategory_User
,
msg
,
0
,
0
);
xnav
->
message
(
'I'
,
msg
);
if
(
window
)
xnav
->
wow
->
DisplayText
(
"Logout"
,
msg
);
}
else
{
sprintf
(
msg
,
"User %s logged out, returned to user %s"
,
xnav
->
user
,
xnav
->
base_user
);
XttLog
::
dlog
(
xttlog_eCategory_User
,
msg
,
0
,
0
);
sprintf
(
msg
,
"Returned to user %s"
,
xnav
->
base_user
);
xnav
->
message
(
'I'
,
msg
);
if
(
window
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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