Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
e2a118f7
Commit
e2a118f7
authored
Jun 27, 2010
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: With IPV6, we can have more than one loopback address
parent
588a0191
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
agent/interfaces.c
agent/interfaces.c
+4
-4
No files found.
agent/interfaces.c
View file @
e2a118f7
...
...
@@ -171,7 +171,7 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
{
GList
*
ips
=
NULL
;
struct
ifaddrs
*
ifa
,
*
results
;
gchar
*
loopback
=
NULL
;
GList
*
loopbacks
=
NULL
;
if
(
getifaddrs
(
&
results
)
<
0
)
...
...
@@ -212,7 +212,7 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
nice_debug
(
"IP Address: %s"
,
addr_as_string
);
if
((
ifa
->
ifa_flags
&
IFF_LOOPBACK
)
==
IFF_LOOPBACK
)
{
if
(
include_loopback
)
loopback
=
g_strdup
(
addr_as_string
);
loopback
s
=
g_list_append
(
loopbacks
,
g_strdup
(
addr_as_string
)
);
else
nice_debug
(
"Ignoring loopback interface"
);
}
else
{
...
...
@@ -225,8 +225,8 @@ nice_interfaces_get_local_ips (gboolean include_loopback)
freeifaddrs
(
results
);
if
(
loopback
)
ips
=
g_list_
append
(
ips
,
loopback
);
if
(
loopback
s
)
ips
=
g_list_
concat
(
ips
,
loopbacks
);
return
ips
;
}
...
...
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