Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Linux programozás nagyházi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eckl, Máté
Linux programozás nagyházi
Commits
53fbe76c
Commit
53fbe76c
authored
May 27, 2016
by
dnsadmin
Browse files
Options
Downloads
Patches
Plain Diff
Statisztikai lehetőség eltávolítása (
#14
)
parent
320f69a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/command.h
+2
-3
2 additions, 3 deletions
include/command.h
main.cpp
+1
-5
1 addition, 5 deletions
main.cpp
with
3 additions
and
8 deletions
include/command.h
+
2
−
3
View file @
53fbe76c
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
#define COMMAND_H
#define COMMAND_H
/**
/**
* Enum of possible command which may be sended to a server.
* Enum of possible command
s
which may be sended to a server.
*/
*/
enum
command
enum
command
{
{
STATISTICS
,
KILL
KILL
};
};
/**
/**
...
@@ -24,7 +24,6 @@ enum command
...
@@ -24,7 +24,6 @@ enum command
const
char
*
get_readable_command
(
command
c
)
{
const
char
*
get_readable_command
(
command
c
)
{
switch
(
c
)
switch
(
c
)
{
{
case
STATISTICS
:
return
"statistics"
;
case
KILL
:
return
"kill"
;
case
KILL
:
return
"kill"
;
default:
return
""
;
default:
return
""
;
}
}
...
...
This diff is collapsed.
Click to expand it.
main.cpp
+
1
−
5
View file @
53fbe76c
...
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
...
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
getcwd
(
working_dir
,
PATH_MAX
-
1
);
getcwd
(
working_dir
,
PATH_MAX
-
1
);
bool
run_as_daemon
=
false
;
bool
run_as_daemon
=
false
;
std
::
vector
<
command
>
command_list
;
std
::
vector
<
command
>
command_list
;
while
((
cli_option
=
getopt
(
argc
,
argv
,
"d
s
kv
h
t:w:"
))
!=
-
1
)
while
((
cli_option
=
getopt
(
argc
,
argv
,
"dkvt:w:
h
"
))
!=
-
1
)
{
{
int
ti
=
0
;
int
ti
=
0
;
switch
(
cli_option
)
switch
(
cli_option
)
...
@@ -45,9 +45,6 @@ int main(int argc, char *argv[])
...
@@ -45,9 +45,6 @@ int main(int argc, char *argv[])
case
'd'
:
case
'd'
:
run_as_daemon
=
true
;
run_as_daemon
=
true
;
break
;
break
;
case
's'
:
command_list
.
push_back
(
STATISTICS
);
break
;
case
'k'
:
case
'k'
:
command_list
.
push_back
(
KILL
);
command_list
.
push_back
(
KILL
);
break
;
break
;
...
@@ -198,7 +195,6 @@ In daemon mode, the working directory must contain the dns.db file.
...
@@ -198,7 +195,6 @@ In daemon mode, the working directory must contain the dns.db file.
Options:
Options:
-d Run as daemon
-d Run as daemon
-t threads Number of threads to start. Only makes sense with -d.
-t threads Number of threads to start. Only makes sense with -d.
-s Statistics from daemon
-k Kill daemon
-k Kill daemon
-w workind_dir Set working directory. Absolute path needed.
-w workind_dir Set working directory. Absolute path needed.
If not set, the actual PWD will be used.
If not set, the actual PWD will be used.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment