MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / ValidateVersion

Function ValidateVersion

src/effects/effects_apply.c:486–505  ·  view source on GitHub ↗

returns false in case of effect encode/decode version mismatch

Source from the content-addressed store, hash-verified

484
485// returns false in case of effect encode/decode version mismatch
486static bool ValidateVersion
487(
488 FILE *stream // effects stream
489) {
490 ASSERT(stream != NULL);
491
492 // read version
493 uint8_t v;
494 fread_assert(&v, sizeof(uint8_t), stream);
495
496 if(v != EFFECTS_VERSION) {
497 // unexpected effects version
498 RedisModule_Log(NULL, "warning",
499 "GRAPH.EFFECT version mismatch expected: %d got: %d",
500 EFFECTS_VERSION, v);
501 return false;
502 }
503
504 return true;
505}
506
507// applys effects encoded in buffer
508void Effects_Apply

Callers 1

Effects_ApplyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected