summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-22 15:31:55 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-22 15:31:55 +0200
commit9c90e27767697e01b0cfb9f345b928763942b731 (patch)
treeb9a73972a13c83ceaab9a65ce31f515df90ac8f3 /src/network/networkd-link.c
parent85fade1edbc3d6ccf7e0685bbf4790f30d35009e (diff)
parent9ef61f2e4802abdb4a2853a82126420b1e77b419 (diff)
Merge pull request #1333 from dvdhrm/sd-network-cleanup
sd-network: random API cleanups
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 215c47b8af..86f1c3bb1a 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1112,13 +1112,16 @@ static void lldp_handler(sd_lldp *lldp, int event, void *userdata) {
assert(link->network);
assert(link->manager);
- if (event != UPDATE_INFO)
- return;
-
- r = sd_lldp_save(link->lldp, link->lldp_file);
- if (r < 0)
- log_link_warning_errno(link, r, "Could not save LLDP: %m");
+ switch (event) {
+ case SD_LLDP_EVENT_UPDATE_INFO:
+ r = sd_lldp_save(link->lldp, link->lldp_file);
+ if (r < 0)
+ log_link_warning_errno(link, r, "Could not save LLDP: %m");
+ break;
+ default:
+ break;
+ }
}
static int link_acquire_conf(Link *link) {