Show
Ignore:
Timestamp:
09/30/08 05:27:40 (5 years ago)
Author:
wichert
Message:

Clean up compiler warnings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog/src/fw_iptables.c

    r1305 r1373  
    4949#include "client_list.h" 
    5050 
    51 static int iptables_do_command(char *format, ...); 
    52 static char *iptables_compile(char *, char *, t_firewall_rule *); 
    53 static void iptables_load_ruleset(char *, char *, char *); 
     51static int iptables_do_command(const char *format, ...); 
     52static char *iptables_compile(const char *, const char *, const t_firewall_rule *); 
     53static void iptables_load_ruleset(const char *, const char *, const char *); 
    5454 
    5555extern pthread_mutex_t  client_list_mutex; 
     
    6363 * */ 
    6464static int 
    65 iptables_do_command(char *format, ...) 
     65iptables_do_command(const char *format, ...) 
    6666{ 
    6767    va_list vlist; 
     
    8181         
    8282    rc = execute(cmd, fw_quiet); 
     83 
     84    if (rc!=0) 
     85        debug(LOG_ERR, "iptables comand tailed: %s", cmd); 
    8386 
    8487    free(cmd); 
     
    9699 */ 
    97100static char * 
    98 iptables_compile(char * table, char *chain, t_firewall_rule *rule) 
     101iptables_compile(const char * table, const char *chain, const t_firewall_rule *rule) 
    99102{ 
    100103    char        command[MAX_BUF], 
     
    140143 */ 
    141144static void 
    142 iptables_load_ruleset(char * table, char *ruleset, char *chain) 
     145iptables_load_ruleset(const char * table, const char *ruleset, const char *chain) 
    143146{ 
    144147        t_firewall_rule         *rule; 
     
    167170iptables_fw_set_authservers(void) 
    168171{ 
    169     s_config *config; 
     172    const s_config *config; 
    170173    t_auth_serv *auth_server; 
    171174    
     
    186189iptables_fw_init(void) 
    187190{ 
    188     s_config *config; 
    189          char * gw_interface = NULL; 
    190          char * gw_address = NULL; 
    191          char * ext_interface = NULL; 
    192          int gw_port = 0; 
    193      t_trusted_mac *p; 
     191        const s_config *config; 
     192        char * gw_interface = NULL; 
     193        char * gw_address = NULL; 
     194        char * ext_interface = NULL; 
     195        int gw_port = 0; 
     196        t_trusted_mac *p; 
    194197    
    195     fw_quiet = 0; 
     198        fw_quiet = 0; 
    196199 
    197200         LOCK_CONFIG(); 
     
    400403int 
    401404iptables_fw_destroy_mention( 
    402                 char * table, 
    403                 char * chain, 
    404                 char * mention 
     405                const char * table, 
     406                const char * chain, 
     407                const char * mention 
    405408) { 
    406409        FILE *p = NULL; 
     
    451454/** Set if a specific client has access through the firewall */ 
    452455int 
    453 iptables_fw_access(fw_access_t type, char *ip, char *mac, int tag) 
     456iptables_fw_access(fw_access_t type, const char *ip, const char *mac, int tag) 
    454457{ 
    455458    int rc;