Return a client by ID, or NULL if the client ID is not in the set * of registered clients. Note that "fake clients", created with -1 as FD, * are not registered clients. */
| 1803 | * of registered clients. Note that "fake clients", created with -1 as FD, |
| 1804 | * are not registered clients. */ |
| 1805 | client *lookupClientByID(uint64_t id) { |
| 1806 | id = htonu64(id); |
| 1807 | client *c = (client*)raxFind(g_pserver->clients_index,(unsigned char*)&id,sizeof(id)); |
| 1808 | return (c == raxNotFound) ? NULL : c; |
| 1809 | } |
| 1810 | |
| 1811 | long long getReplIndexFromOffset(long long offset); |
| 1812 |
no test coverage detected