Changeset 754
- Timestamp:
- 03/18/08 17:21:05 (6 months ago)
- Files:
-
- branches/binary/server/memcached.c (modified) (5 diffs)
- branches/binary/server/memcached.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/binary/server/memcached.c
r753 r754 70 70 static int try_read_network(conn *c); 71 71 static int try_read_udp(conn *c); 72 static void conn_set_state(conn * , int);72 static void conn_set_state(conn *c, enum conn_states state); 73 73 74 74 /* stats */ … … 314 314 } 315 315 316 conn *conn_new(const int sfd, const int init_state, const int event_flags, 316 conn *conn_new(const int sfd, enum conn_states init_state, 317 const int event_flags, 317 318 const int read_buffer_size, enum protocol prot, 318 319 struct event_base *base) { … … 513 514 } 514 515 515 static intget_init_state(conn *c) {516 static enum conn_states get_init_state(conn *c) { 516 517 int rv=0; 517 518 assert(c != NULL); … … 601 602 * happen here. 602 603 */ 603 static void conn_set_state(conn *c, intstate) {604 static void conn_set_state(conn *c, enum conn_states state) { 604 605 assert(c != NULL); 605 606 … … 2726 2727 bool stop = false; 2727 2728 int sfd, flags = 1; 2728 intinit_state; /* initial state for a new connection */2729 enum conn_states init_state; /* initial state for a new connection */ 2729 2730 socklen_t addrlen; 2730 2731 struct sockaddr_storage addr; branches/binary/server/memcached.h
r752 r754 217 217 struct conn { 218 218 int sfd; 219 intstate;219 enum conn_states state; 220 220 int substate; 221 221 struct event event; … … 315 315 char *do_add_delta(item *item, const bool incr, const int64_t delta, char *buf); 316 316 int do_store_item(item *item, int comm); 317 conn *conn_new(const int sfd, const intinit_state, const int event_flags, const int read_buffer_size, enum protocol prot, struct event_base *base);317 conn *conn_new(const int sfd, const enum conn_states init_state, const int event_flags, const int read_buffer_size, enum protocol prot, struct event_base *base); 318 318 319 319 … … 341 341 void thread_init(int nthreads, struct event_base *main_base); 342 342 int dispatch_event_add(int thread, conn *c); 343 void dispatch_conn_new(int sfd, intinit_state, int event_flags, int read_buffer_size, enum protocol prot);343 void dispatch_conn_new(int sfd, enum conn_states init_state, int event_flags, int read_buffer_size, enum protocol prot); 344 344 345 345 /* Lock wrappers for cache functions that are called from main loop. */
