Show
Ignore:
Timestamp:
03/18/08 17:21:05 (2 years ago)
Author:
dsallings
Message:

Ensure all connection states are expressed as enums.

Function declarations should have parameter names.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/binary/server/memcached.c

    r753 r754  
    7070static int try_read_network(conn *c); 
    7171static int try_read_udp(conn *c); 
    72 static void conn_set_state(conn *, int); 
     72static void conn_set_state(conn *c, enum conn_states state); 
    7373 
    7474/* stats */ 
     
    314314} 
    315315 
    316 conn *conn_new(const int sfd, const int init_state, const int event_flags, 
     316conn *conn_new(const int sfd, enum conn_states init_state, 
     317                const int event_flags, 
    317318                const int read_buffer_size, enum protocol prot, 
    318319                struct event_base *base) { 
     
    513514} 
    514515 
    515 static int get_init_state(conn *c) { 
     516static enum conn_states get_init_state(conn *c) { 
    516517    int rv=0; 
    517518    assert(c != NULL); 
     
    601602 * happen here. 
    602603 */ 
    603 static void conn_set_state(conn *c, int state) { 
     604static void conn_set_state(conn *c, enum conn_states state) { 
    604605    assert(c != NULL); 
    605606 
     
    27262727    bool stop = false; 
    27272728    int sfd, flags = 1; 
    2728     int init_state; /* initial state for a new connection */ 
     2729    enum conn_states init_state; /* initial state for a new connection */ 
    27292730    socklen_t addrlen; 
    27302731    struct sockaddr_storage addr;