1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

sd-pppoe: fix namespacing

Prefix all exported constants by SD_PPPOE_* to avoid namespacing
conflicts.
This commit is contained in:
David Herrmann 2015-09-22 15:09:58 +02:00
parent be19c5b5e0
commit e4c3b8e856
3 changed files with 7 additions and 7 deletions

View File

@ -670,7 +670,7 @@ static int pppoe_handle_message(sd_pppoe *ppp, struct pppoe_hdr *packet, struct
ppp->timeout = sd_event_source_unref(ppp->timeout);
assert(ppp->cb);
ppp->cb(ppp, PPPOE_EVENT_RUNNING, ppp->userdata);
ppp->cb(ppp, SD_PPPOE_EVENT_RUNNING, ppp->userdata);
break;
case PPPOE_STATE_RUNNING:
@ -688,7 +688,7 @@ static int pppoe_handle_message(sd_pppoe *ppp, struct pppoe_hdr *packet, struct
ppp->state = PPPOE_STATE_STOPPED;
assert(ppp->cb);
ppp->cb(ppp, PPPOE_EVENT_STOPPED, ppp->userdata);
ppp->cb(ppp, SD_PPPOE_EVENT_STOPPED, ppp->userdata);
break;
case PPPOE_STATE_STOPPED:

View File

@ -41,12 +41,12 @@ static void pppoe_handler(sd_pppoe *ppp, int event, void *userdata) {
assert_se(e);
switch (event) {
case PPPOE_EVENT_RUNNING:
case SD_PPPOE_EVENT_RUNNING:
assert_se(pppoe_state == -1);
log_info("running");
break;
case PPPOE_EVENT_STOPPED:
assert_se(pppoe_state == PPPOE_EVENT_RUNNING);
case SD_PPPOE_EVENT_STOPPED:
assert_se(pppoe_state == SD_PPPOE_EVENT_RUNNING);
log_info("stopped");
assert_se(sd_event_exit(e, 0) >= 0);
break;

View File

@ -30,8 +30,8 @@
#include "sparse-endian.h"
enum {
PPPOE_EVENT_RUNNING = 0,
PPPOE_EVENT_STOPPED = 1,
SD_PPPOE_EVENT_RUNNING = 0,
SD_PPPOE_EVENT_STOPPED = 1,
};
typedef struct sd_pppoe sd_pppoe;