MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / clear_responses

Function clear_responses

cdb2api/cdb2api.c:2922–2940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2920}
2921
2922static void clear_responses(cdb2_hndl_tp *hndl)
2923{
2924 if (hndl->lastresponse) {
2925 if (hndl->protobuf_used_sysmalloc)
2926 cdb2__sqlresponse__free_unpacked(hndl->lastresponse,
2927 &hndl->allocator);
2928 hndl->protobuf_offset = 0;
2929 free((void *)hndl->last_buf);
2930 hndl->last_buf = NULL;
2931 hndl->lastresponse = NULL;
2932 }
2933
2934 if (hndl->firstresponse) {
2935 cdb2__sqlresponse__free_unpacked(hndl->firstresponse, NULL);
2936 free((void *)hndl->first_buf);
2937 hndl->first_buf = NULL;
2938 hndl->firstresponse = NULL;
2939 }
2940}
2941
2942static int cdb2_effects_request(cdb2_hndl_tp *hndl)
2943{

Callers 4

cdb2_effects_requestFunction · 0.85
retry_query_listFunction · 0.85
consume_previous_queryFunction · 0.85

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected