Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
b02db6c7
Commit
b02db6c7
authored
Nov 16, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in uniset-mysql-dbserver
parent
231e7966
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
11 deletions
+22
-11
DBServer_MySQL.cc
Utilities/DBServer-MySQL/DBServer_MySQL.cc
+5
-2
DBServer_MySQL.h
Utilities/DBServer-MySQL/DBServer_MySQL.h
+1
-2
create_links.sh
Utilities/DBServer-MySQL/create_links.sh
+4
-0
main.cc
Utilities/DBServer-MySQL/main.cc
+3
-3
start_fg.sh
Utilities/DBServer-MySQL/start_fg.sh
+5
-0
test.xml
conf/test.xml
+1
-1
DBServer.h
include/DBServer.h
+1
-1
DBServer.cc
src/Services/DBServer.cc
+2
-2
No files found.
Utilities/DBServer-MySQL/DBServer_MySQL.cc
View file @
b02db6c7
...
...
@@ -332,8 +332,11 @@ void DBServer_MySQL::parse( UniSetTypes::SensorMessage *si )
}
//--------------------------------------------------------------------------------------------
void
DBServer_MySQL
::
init
()
void
DBServer_MySQL
::
init
_dbserver
()
{
DBServer
::
init_dbserver
();
unideb
[
Debug
::
INFO
]
<<
myname
<<
"(init): ..."
<<
endl
;
if
(
connect_ok
)
{
initDBTableMap
(
tblMap
);
...
...
@@ -454,7 +457,7 @@ void DBServer_MySQL::timerInfo( UniSetTypes::TimerMessage* tm )
unideb
[
Debug
::
WARN
]
<<
myname
<<
"(timerInfo): "
<<
endl
;
}
else
init
();
init
_dbserver
();
}
break
;
...
...
Utilities/DBServer-MySQL/DBServer_MySQL.h
View file @
b02db6c7
...
...
@@ -158,8 +158,7 @@ class DBServer_MySQL:
virtual
void
parse
(
UniSetTypes
::
ConfirmMessage
*
cmsg
);
bool
writeToBase
(
const
string
&
query
);
virtual
void
init
();
virtual
void
init_dbserver
();
void
createTables
(
DBInterface
*
db
);
inline
const
char
*
tblName
(
int
key
)
...
...
Utilities/DBServer-MySQL/create_links.sh
0 → 100755
View file @
b02db6c7
#!/bin/sh
ln
-s
-f
/usr/bin/uniset-stop.sh stop.sh
ln
-s
-f
../../conf/test.xml test.xml
Utilities/DBServer-MySQL/main.cc
View file @
b02db6c7
// $Id: main.cc,v 1.8 2008/02/10 03:21:41 vpashka Exp $
// --------------------------------------------------------------------------
#include "Configuration.h"
#include "DBServer.h"
#include "DBServer
_MySQL
.h"
#include "ObjectsActivator.h"
#include "Debug.h"
// --------------------------------------------------------------------------
...
...
@@ -10,7 +10,7 @@ using namespace std;
// --------------------------------------------------------------------------
static
void
short_usage
()
{
cout
<<
"Usage: uniset-dbserver [--name ObjectId] [--confile configure.xml]
\n
"
;
cout
<<
"Usage: uniset-
mysql-
dbserver [--name ObjectId] [--confile configure.xml]
\n
"
;
}
// --------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
return
1
;
}
DBServer
dbs
(
ID
);
DBServer
_MySQL
dbs
(
ID
);
ObjectsActivator
act
;
act
.
addObject
(
static_cast
<
class
UniSetObject
*>
(
&
dbs
));
act
.
run
(
false
);
...
...
Utilities/DBServer-MySQL/start_fg.sh
0 → 100755
View file @
b02db6c7
#!/bin/sh
ulimit
-Sc
1000000
uniset-start.sh
-f
./uniset-mysql-dbserver
--confile
test.xml
--unideb-add-levels
info,crit,warn,level9,system
conf/test.xml
View file @
b02db6c7
...
...
@@ -103,7 +103,7 @@
textname -
-->
<nodes
port=
"2809"
>
<item
name=
"LocalhostNode"
alias=
""
textname=
" "
ip=
"127.0.0.1"
infserver=
"InfoServer"
dbserver=
""
/>
<item
name=
"LocalhostNode"
alias=
""
textname=
" "
ip=
"127.0.0.1"
infserver=
"InfoServer"
dbserver=
"
DBServer
"
/>
<item
name=
"Node2"
alias=
""
textname=
" "
ip=
"127.0.0.1"
infserver=
"InfoServer"
dbserver=
""
/>
</nodes>
...
...
include/DBServer.h
View file @
b02db6c7
...
...
@@ -69,7 +69,7 @@ class DBServer:
virtual
void
parse
(
UniSetTypes
::
ConfirmMessage
*
cmsg
){};
virtual
bool
activateObject
();
virtual
void
init
(){};
virtual
void
init
_dbserver
(){};
private
:
};
...
...
src/Services/DBServer.cc
View file @
b02db6c7
...
...
@@ -128,8 +128,8 @@ void DBServer::processingMessage( UniSetTypes::VoidMessage *msg )
//--------------------------------------------------------------------------------------------
bool
DBServer
::
activateObject
()
{
UniSetObject
::
activateObject
();
init
();
UniSetObject
_LT
::
activateObject
();
init
_dbserver
();
return
true
;
}
//--------------------------------------------------------------------------------------------
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