MCPcopy Create free account
hub / github.com/F-Stack/f-stack / decodeTimeoutKey

Function decodeTimeoutKey

app/redis-6.2.6/src/timeout.c:105–109  ·  view source on GitHub ↗

Given a key encoded with encodeTimeoutKey(), resolve the fields and write * the timeout into *toptr and the client pointer into *cptr. */

Source from the content-addressed store, hash-verified

103/* Given a key encoded with encodeTimeoutKey(), resolve the fields and write
104 * the timeout into *toptr and the client pointer into *cptr. */
105void 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

Callers 1

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected