MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / lookupClientByID

Function lookupClientByID

src/networking.cpp:1805–1809  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

1803 * of registered clients. Note that "fake clients", created with -1 as FD,
1804 * are not registered clients. */
1805client *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
1811long long getReplIndexFromOffset(long long offset);
1812

Callers 7

sendTrackingMessageFunction · 0.85
trackingInvalidateKeyRawFunction · 0.85
RM_GetClientUserNameByIdFunction · 0.85
RM_GetClientInfoByIdFunction · 0.85
RM_GetClientCertificateFunction · 0.85
clientCommandFunction · 0.85

Calls 1

raxFindFunction · 0.85

Tested by

no test coverage detected