Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
2fc03dc7
Commit
2fc03dc7
authored
Feb 24, 2014
by
Axel Auweter
Browse files
Follow-up to
#19
: Check args before connecting
to the cassandra data store.
parent
4603b723
Changes
1
Hide whitespace changes
Inline
Side-by-side
CollectAgent/collectagent.cpp
View file @
2fc03dc7
...
...
@@ -99,26 +99,26 @@ int main(int argc, char* const argv[]) {
*/
signal
(
SIGINT
,
sigHandler
);
/*
* Allocate and initialize sensor data store.
*/
mySensorDataStore
=
new
SensorDataStore
();
/* Parse command line */
char
ret
;
host
=
"localhost"
;
while
((
ret
=
getopt
(
argc
,
argv
,
"h:"
))
!=
EOF
)
{
host
=
"localhost"
;
while
((
ret
=
getopt
(
argc
,
argv
,
"h:
?
"
))
!=
EOF
)
{
switch
(
ret
)
{
case
'h'
:
host
=
optarg
;
break
;
case
'?'
:
default:
usage
();
exit
(
EXIT_FAILURE
);
case
'h'
:
host
=
optarg
;
break
;
case
'?'
:
default:
usage
();
exit
(
EXIT_FAILURE
);
}
}
/*
* Allocate and initialize sensor data store.
*/
mySensorDataStore
=
new
SensorDataStore
();
/*
* Start the MQTT Message Server.
*/
...
...
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