]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: fix tests compilation
authorVincent Bernat <bernat@luffy.cx>
Fri, 31 Aug 2012 21:06:24 +0000 (23:06 +0200)
committerVincent Bernat <bernat@luffy.cx>
Fri, 31 Aug 2012 21:06:24 +0000 (23:06 +0200)
Some tests were not compilable any more due to previous changes in
`struct lldpd`.

src/daemon/event.c
tests/check_edp.c
tests/check_snmp.c

index 76d3c9d79cd0d16f8003380b16526b00fa2a6293..5a7c40d5b80bf8236bfb9e14901c4e080e09271e 100644 (file)
@@ -236,7 +236,7 @@ levent_ctl_notify(char *ifname, int state, struct lldpd_port *neighbor)
                .neighbor = neighbor
        };
        void *output = NULL;
-       ssize_t output_len;
+       ssize_t output_len = 0;
 
        /* Don't use TAILQ_FOREACH, the client may be deleted in case of errors. */
        for (client = TAILQ_FIRST(&lldpd_clients);
index 9dd7c7d2e87f422baac20fc325d7d6938d813b96..e30c27326a47393b43379d097d0bd7e86f5619fe 100644 (file)
@@ -499,7 +499,7 @@ Extreme Discovery Protocol
        struct lldpd cfg;
        char mac1[] = { 0x00, 0x04, 0x96, 0x05, 0x44, 0x6f };
 
-       cfg.g_mgmt_pattern = NULL;
+       cfg.g_config.c_mgmt_pattern = NULL;
        fail_unless(edp_decode(&cfg, pkt1, sizeof(pkt1), &hardware,
                &nchassis, &nport) != -1);
        if (!nchassis || !nport) {
index db145a46abf4bacaec20a4b17d3f8f57460457c8..dbe0c6689e10991a9efb1c54e43c646c3905b6dd 100644 (file)
@@ -15,8 +15,10 @@ extern int asprintf (char **, char *, ...);
 
 /* Our test config */
 struct lldpd test_cfg = {
-       .g_delay = 30,
-       .g_smart = 0,
+       .g_config = {
+               .c_delay = 30,
+               .c_smart = 0
+       }
 };
 struct timeval test_starttime = { .tv_sec = 100, .tv_usec = 0 };