Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
jami-daemon
Commits
f4e7cf70
Commit
f4e7cf70
authored
10 years ago
by
Adrien Béraud
Committed by
Alexandre Lision
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ringdht: fix bootstrap on OSX
Refs #68794 Change-Id: Id2a087fb09d921c68f378b13f15fbaf0cf1a43ff
parent
7ed42d54
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/contrib/src/opendht/rules.mak
+1
-1
1 addition, 1 deletion
daemon/contrib/src/opendht/rules.mak
daemon/src/ringdht/ringaccount.cpp
+6
-5
6 additions, 5 deletions
daemon/src/ringdht/ringaccount.cpp
with
7 additions
and
6 deletions
daemon/contrib/src/opendht/rules.mak
+
1
−
1
View file @
f4e7cf70
# OPENDHT
# OPENDHT
OPENDHT_VERSION
:=
955b68a4398f10b5e4104066557ff491051bdf7c
OPENDHT_VERSION
:=
441cad2e86c17eb5ebbada74518d479f52f63902
OPENDHT_URL
:=
https://github.com/savoirfairelinux/opendht/archive/
$(
OPENDHT_VERSION
)
.tar.gz
OPENDHT_URL
:=
https://github.com/savoirfairelinux/opendht/archive/
$(
OPENDHT_VERSION
)
.tar.gz
PKGS
+=
opendht
PKGS
+=
opendht
...
...
This diff is collapsed.
Click to expand it.
daemon/src/ringdht/ringaccount.cpp
+
6
−
5
View file @
f4e7cf70
...
@@ -729,7 +729,7 @@ void RingAccount::doRegister_()
...
@@ -729,7 +729,7 @@ void RingAccount::doRegister_()
dht_
.
bootstrap
(
loadNodes
());
dht_
.
bootstrap
(
loadNodes
());
if
(
!
hostname_
.
empty
())
{
if
(
!
hostname_
.
empty
())
{
std
::
stringstream
ss
(
hostname_
);
std
::
stringstream
ss
(
hostname_
);
std
::
vector
<
sockaddr_storage
>
bootstrap
;
std
::
vector
<
std
::
pair
<
sockaddr_storage
,
socklen_t
>
>
bootstrap
;
std
::
string
node_addr
;
std
::
string
node_addr
;
while
(
std
::
getline
(
ss
,
node_addr
,
';'
))
{
while
(
std
::
getline
(
ss
,
node_addr
,
';'
))
{
auto
ips
=
ip_utils
::
getAddrList
(
node_addr
);
auto
ips
=
ip_utils
::
getAddrList
(
node_addr
);
...
@@ -738,17 +738,18 @@ void RingAccount::doRegister_()
...
@@ -738,17 +738,18 @@ void RingAccount::doRegister_()
if
(
resolved
)
{
if
(
resolved
)
{
if
(
resolved
.
getPort
()
==
0
)
if
(
resolved
.
getPort
()
==
0
)
resolved
.
setPort
(
DHT_DEFAULT_PORT
);
resolved
.
setPort
(
DHT_DEFAULT_PORT
);
bootstrap
.
push
_back
(
resolved
);
bootstrap
.
emplace
_back
(
resolved
,
resolved
.
getLength
()
);
}
}
}
else
{
}
else
{
for
(
auto
&
ip
:
ips
)
for
(
auto
&
ip
:
ips
)
{
if
(
ip
.
getPort
()
==
0
)
if
(
ip
.
getPort
()
==
0
)
ip
.
setPort
(
DHT_DEFAULT_PORT
);
ip
.
setPort
(
DHT_DEFAULT_PORT
);
bootstrap
.
insert
(
bootstrap
.
end
(),
ips
.
begin
(),
ips
.
end
());
bootstrap
.
emplace_back
(
ip
,
ip
.
getLength
());
}
}
}
}
}
for
(
auto
ip
:
bootstrap
)
for
(
auto
ip
:
bootstrap
)
RING_DBG
(
"Bootstrap node: %s"
,
IpAddr
(
ip
).
toString
(
true
).
c_str
());
RING_DBG
(
"Bootstrap node: %s"
,
IpAddr
(
ip
.
first
).
toString
(
true
).
c_str
());
dht_
.
bootstrap
(
bootstrap
);
dht_
.
bootstrap
(
bootstrap
);
}
}
...
...
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