Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
7ed11a02
Commit
7ed11a02
authored
3 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
c: cleanup dhtcnode
parent
3442e0ac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/dhtcnode.c
+19
-1
19 additions, 1 deletion
tools/dhtcnode.c
with
19 additions
and
1 deletion
tools/dhtcnode.c
+
19
−
1
View file @
7ed11a02
/*
* Copyright (C) 2014-2022 Savoir-faire Linux Inc.
* Author : Adrien Béraud <adrien.beraud@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include
<opendht_c.h>
#include
<getopt.h>
...
...
@@ -114,6 +132,7 @@ static const struct option long_options[] = {
struct
dht_params
parse_args
(
int
argc
,
char
**
argv
)
{
struct
dht_params
params
;
bzero
(
&
params
,
sizeof
params
);
int
opt
;
while
((
opt
=
getopt_long
(
argc
,
argv
,
"hisvDp:n:b:f:l:"
,
long_options
,
NULL
))
!=
-
1
)
{
switch
(
opt
)
{
...
...
@@ -185,7 +204,6 @@ int main(int argc, char **argv)
bzero
(
arg
,
sizeof
arg
);
bzero
(
value
,
sizeof
value
);
sscanf
(
line_read
,
"%64s %64s %256s"
,
cmd
,
arg
,
value
);
//printf("%s -> %s\n", cmd, arg);
if
(
!
strcmp
(
cmd
,
"la"
))
{
struct
sockaddr
**
addrs
=
dht_runner_get_public_address
(
runner
);
...
...
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