MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cpp_recv_calls

Function cpp_recv_calls

tests/test_pipeline.c:23256–23283  ·  view source on GitHub ↗

Properties of the CALLS edge caller -> target (QNs below the project), or * NULL when there is no such edge. The caller frees the result. */

Source from the content-addressed store, hash-verified

23254/* Properties of the CALLS edge caller -> target (QNs below the project), or
23255 * NULL when there is no such edge. The caller frees the result. */
23256static char *cpp_recv_calls(const CppRecvRun *r, const char *caller, const char *target) {
23257 char src_qn[512];
23258 char tgt_qn[512];
23259 snprintf(src_qn, sizeof(src_qn), "%s.%s", r->project, caller);
23260 snprintf(tgt_qn, sizeof(tgt_qn), "%s.%s", r->project, target);
23261 cbm_node_t src;
23262 cbm_node_t tgt;
23263 memset(&src, 0, sizeof(src));
23264 memset(&tgt, 0, sizeof(tgt));
23265 char *props = NULL;
23266 if (cbm_store_find_node_by_qn(r->s, r->project, src_qn, &src) == CBM_STORE_OK &&
23267 cbm_store_find_node_by_qn(r->s, r->project, tgt_qn, &tgt) == CBM_STORE_OK) {
23268 cbm_edge_t *edges = NULL;
23269 int ec = 0;
23270 cbm_store_find_edges_by_source_type(r->s, src.id, "CALLS", &edges, &ec);
23271 for (int i = 0; i < ec && !props; i++) {
23272 if (edges[i].target_id == tgt.id) {
23273 props = strdup(edges[i].properties_json ? edges[i].properties_json : "{}");
23274 }
23275 }
23276 if (edges) {
23277 cbm_store_free_edges(edges, ec);
23278 }
23279 }
23280 cbm_node_free_fields(&src);
23281 cbm_node_free_fields(&tgt);
23282 return props;
23283}
23284
23285#define CPP_RECV_CALLER "pil.src.SecdCfgHandlerThread."
23286#define CPP_RECV_CLASS "app.src.SecdManager."

Callers 2

cpp_recv_edge_kindFunction · 0.85
test_pipeline.cFile · 0.85

Calls 4

cbm_store_free_edgesFunction · 0.85
cbm_node_free_fieldsFunction · 0.85

Tested by

no test coverage detected