Changeset 757
- Timestamp:
- 03/18/08 17:21:24 (5 months ago)
- Files:
-
- branches/binary/server/memcached.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/binary/server/memcached.c
r756 r757 866 866 static void add_bin_header(conn *c, int err, int hdr_len, int body_len) { 867 867 int i=0; 868 uint32_t res_header[BIN_PKT_HDR_WORDS];868 uint32_t *res_header; 869 869 870 870 assert(c); … … 880 880 } 881 881 882 res_header = (uint32_t *)c->wbuf; 883 882 884 res_header[0] = BIN_RES_MAGIC << 24; 883 885 res_header[0] |= ((0xff & c->cmd) << 16); … … 899 901 900 902 assert(c->wsize >= MIN_BIN_PKT_LENGTH); 901 memcpy(c->wbuf, &res_header, MIN_BIN_PKT_LENGTH);902 903 add_iov(c, c->wbuf, MIN_BIN_PKT_LENGTH); 903 904 }
