MCPcopy Create free account
hub / github.com/F-Stack/f-stack / retainOriginalCommandVector

Function retainOriginalCommandVector

app/redis-6.2.6/src/networking.c:3073–3082  ·  view source on GitHub ↗

Keep track of the original command arguments so that we can generate * an accurate slowlog entry after the command has been executed. */

Source from the content-addressed store, hash-verified

3071/* Keep track of the original command arguments so that we can generate
3072 * an accurate slowlog entry after the command has been executed. */
3073static void retainOriginalCommandVector(client *c) {
3074 /* We already rewrote this command, so don't rewrite it again */
3075 if (c->original_argv) return;
3076 c->original_argc = c->argc;
3077 c->original_argv = zmalloc(sizeof(robj*)*(c->argc));
3078 for (int j = 0; j < c->argc; j++) {
3079 c->original_argv[j] = c->argv[j];
3080 incrRefCount(c->argv[j]);
3081 }
3082}
3083
3084/* Redact a given argument to prevent it from being shown
3085 * in the slowlog. This information is stored in the

Callers 3

Calls 2

zmallocFunction · 0.85
incrRefCountFunction · 0.85

Tested by

no test coverage detected