MCPcopy Create free account
hub / github.com/antirez/ds4 / enqueue

Function enqueue

ds4_server.c:11039–11050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11037 tool_memory_block *b =
11038 tool_memory_find_block_locked(&s->tool_mem, start, (size_t)(end - start));
11039 if (b && b->seen != scan) {
11040 b->seen = scan;
11041 for (tool_memory_entry *e = b->entries; ok && e; e = e->block_next) {
11042 size_t id_len = strlen(e->id);
11043 size_t dsml_len = b->len;
11044 if (id_len > UINT32_MAX || dsml_len > UINT32_MAX) continue;
11045 uint8_t lens[8];
11046 le_put32(lens, (uint32_t)id_len);
11047 le_put32(lens + 4, (uint32_t)dsml_len);
11048 ok = fwrite(lens, 1, sizeof(lens), fp) == sizeof(lens) &&
11049 fwrite(e->id, 1, id_len, fp) == id_len &&
11050 fwrite(b->dsml, 1, dsml_len, fp) == dsml_len;
11051 }
11052 }
11053 p = end;

Callers 1

client_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected