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
206fbf3a
Commit
206fbf3a
authored
Sep 23, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wb database lockfile, nodename added to file content
parent
d6917344
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
wb/lib/wb/src/wb_dblock.cpp
wb/lib/wb/src/wb_dblock.cpp
+13
-2
No files found.
wb/lib/wb/src/wb_dblock.cpp
View file @
206fbf3a
...
...
@@ -42,6 +42,7 @@
#include "pwr.h"
#include "wb_dblock.h"
#include "co_dcli.h"
#include "co_syi.h"
vector
<
wb_lockfile
>
wb_dblock
::
m_lockfiles
;
...
...
@@ -82,14 +83,24 @@ bool wb_dblock::is_locked( char *name, char *user)
void
wb_dblock
::
dblock
(
char
*
name
)
{
pwr_tStatus
sts
;
char
*
value
;
char
nodename
[
80
];
char
username
[
80
];
ofstream
fp
(
lockname
(
name
));
syi_NodeName
(
&
sts
,
nodename
,
sizeof
(
nodename
));
if
(
EVEN
(
sts
))
strcpy
(
nodename
,
"Unknown"
);
value
=
getenv
(
"USER"
);
if
(
value
)
fp
<<
value
<<
endl
;
strncpy
(
username
,
value
,
sizeof
(
username
))
;
else
fp
<<
"Unknown"
<<
endl
;
strcpy
(
username
,
"Unknown"
);
fp
<<
username
<<
" on "
<<
nodename
<<
endl
;
fp
.
close
();
wb_lockfile
lf
(
lockname
(
name
));
...
...
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