Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
nexedi
/
babeld
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit c7b44dac
authored
2016-02-12 21:36:43 +0100
by
Juliusz Chroboczek
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Make flush_interface return a value.
1 parent
c4438c80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
interface.c
interface.h
interface.c
View file @
c7b44da
...
@@ -95,7 +95,7 @@ add_interface(char *ifname, struct interface_conf *if_conf)
...
@@ -95,7 +95,7 @@ add_interface(char *ifname, struct interface_conf *if_conf)
return
ifp
;
return
ifp
;
}
}
void
int
flush_interface
(
char
*
ifname
)
flush_interface
(
char
*
ifname
)
{
{
struct
interface
*
ifp
,
*
prev
;
struct
interface
*
ifp
,
*
prev
;
...
@@ -109,10 +109,9 @@ flush_interface(char *ifname)
...
@@ -109,10 +109,9 @@ flush_interface(char *ifname)
ifp
=
ifp
->
next
;
ifp
=
ifp
->
next
;
}
}
if
(
ifp
==
NULL
)
{
if
(
ifp
==
NULL
)
fprintf
(
stderr
,
"Warning: attempting to flush nonexistent interface.
\n
"
);
return
0
;
return
;
}
interface_up
(
ifp
,
0
);
interface_up
(
ifp
,
0
);
if
(
prev
)
if
(
prev
)
prev
->
next
=
ifp
->
next
;
prev
->
next
=
ifp
->
next
;
...
@@ -127,6 +126,8 @@ flush_interface(char *ifname)
...
@@ -127,6 +126,8 @@ flush_interface(char *ifname)
local_notify_interface
(
ifp
,
LOCAL_FLUSH
);
local_notify_interface
(
ifp
,
LOCAL_FLUSH
);
free
(
ifp
);
free
(
ifp
);
return
1
;
}
}
/* This should be no more than half the hello interval, so that hellos
/* This should be no more than half the hello interval, so that hellos
...
...
interface.h
View file @
c7b44da
...
@@ -123,7 +123,7 @@ if_up(struct interface *ifp)
...
@@ -123,7 +123,7 @@ if_up(struct interface *ifp)
}
}
struct
interface
*
add_interface
(
char
*
ifname
,
struct
interface_conf
*
if_conf
);
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
jitter
(
struct
interface
*
ifp
,
int
urgent
);
unsigned
update_jitter
(
struct
interface
*
ifp
,
int
urgent
);
unsigned
update_jitter
(
struct
interface
*
ifp
,
int
urgent
);
void
set_timeout
(
struct
timeval
*
timeout
,
int
msecs
);
void
set_timeout
(
struct
timeval
*
timeout
,
int
msecs
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment