Given a key encoded with encodeTimeoutKey(), resolve the fields and write * the timeout into *toptr and the client pointer into *cptr. */
| 103 | /* Given a key encoded with encodeTimeoutKey(), resolve the fields and write |
| 104 | * the timeout into *toptr and the client pointer into *cptr. */ |
| 105 | void decodeTimeoutKey(unsigned char *buf, uint64_t *toptr, client **cptr) { |
| 106 | memcpy(toptr,buf,sizeof(*toptr)); |
| 107 | *toptr = ntohu64(*toptr); |
| 108 | memcpy(cptr,buf+8,sizeof(*cptr)); |
| 109 | } |
| 110 | |
| 111 | /* Add the specified client id / timeout as a key in the radix tree we use |
| 112 | * to handle blocked clients timeouts. The client is not added to the list |
no test coverage detected