Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
c7b44dac
Commit
c7b44dac
authored
Feb 12, 2016
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make flush_interface return a value.
parent
c4438c80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
interface.c
interface.c
+6
-5
interface.h
interface.h
+1
-1
No files found.
interface.c
View file @
c7b44dac
...
...
@@ -95,7 +95,7 @@ add_interface(char *ifname, struct interface_conf *if_conf)
return
ifp
;
}
void
int
flush_interface
(
char
*
ifname
)
{
struct
interface
*
ifp
,
*
prev
;
...
...
@@ -109,10 +109,9 @@ flush_interface(char *ifname)
ifp
=
ifp
->
next
;
}
if
(
ifp
==
NULL
)
{
fprintf
(
stderr
,
"Warning: attempting to flush nonexistent interface.
\n
"
);
return
;
}
if
(
ifp
==
NULL
)
return
0
;
interface_up
(
ifp
,
0
);
if
(
prev
)
prev
->
next
=
ifp
->
next
;
...
...
@@ -127,6 +126,8 @@ flush_interface(char *ifname)
local_notify_interface
(
ifp
,
LOCAL_FLUSH
);
free
(
ifp
);
return
1
;
}
/* This should be no more than half the hello interval, so that hellos
...
...
interface.h
View file @
c7b44dac
...
...
@@ -123,7 +123,7 @@ if_up(struct interface *ifp)
}
struct
interface
*
add_interface
(
char
*
ifname
,
struct
interface_conf
*
if_conf
);
void
flush_interface
(
char
*
ifname
);
int
flush_interface
(
char
*
ifname
);
unsigned
jitter
(
struct
interface
*
ifp
,
int
urgent
);
unsigned
update_jitter
(
struct
interface
*
ifp
,
int
urgent
);
void
set_timeout
(
struct
timeval
*
timeout
,
int
msecs
);
...
...
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