--- embedaddon/mpd/src/radsrv.c 2016/11/01 09:56:12 1.1.1.3 +++ embedaddon/mpd/src/radsrv.c 2021/03/17 00:39:23 1.1.1.4 @@ -5,9 +5,12 @@ * Written by Alexander Motin */ +#define RADSRV + #include "ppp.h" #include "radsrv.h" #include "util.h" + #include #include #include @@ -33,7 +36,7 @@ * INTERNAL FUNCTIONS */ - static int RadsrvSetCommand(Context ctx, int ac, char *av[], void *arg); + static int RadsrvSetCommand(Context ctx, int ac, const char *const av[], const void *arg); /* * GLOBAL VARIABLES @@ -52,7 +55,7 @@ RadsrvSetCommand, NULL, 2, (void *) SET_ENABLE }, { "disable [opt ...]", "Disable radsrv option" , RadsrvSetCommand, NULL, 2, (void *) SET_DISABLE }, - { NULL }, + { NULL, NULL, NULL, NULL, 0, NULL }, }; @@ -123,6 +126,7 @@ RadsrvEvent(int type, void *cookie) struct acl *acl_limits[ACL_DIRS]; /* traffic limits based on mpd's filters */ char std_acct[ACL_DIRS][ACL_NAME_LEN]; /* Names of ACL returned in standard accounting */ + (void)type; bzero(acl_filters, sizeof(acl_filters)); bzero(acl_limits, sizeof(acl_limits)); bzero(std_acct, sizeof(std_acct)); @@ -725,12 +729,16 @@ RadsrvClose(Radsrv w) */ int -RadsrvStat(Context ctx, int ac, char *av[], void *arg) +RadsrvStat(Context ctx, int ac, const char *const av[], const void *arg) { Radsrv w = &gRadsrv; char addrstr[64]; struct radiusclient_conf *client; + (void)ac; + (void)av; + (void)arg; + Printf("Radsrv configuration:\r\n"); Printf("\tState : %s\r\n", w->handle ? "OPENED" : "CLOSED"); Printf("\tSelf : %s %d\r\n", @@ -752,7 +760,7 @@ RadsrvStat(Context ctx, int ac, char *av[], void *arg) */ static int -RadsrvSetCommand(Context ctx, int ac, char *av[], void *arg) +RadsrvSetCommand(Context ctx, int ac, const char *const av[], const void *arg) { Radsrv w = &gRadsrv; int port, count;