Rename redisError to serverError (#177)

Part of #144

Signed-off-by: 0del <bany.y0599@gmail.com>
This commit is contained in:
0del 2024-04-04 00:12:34 +07:00 committed by GitHub
parent c413834da1
commit 1629e28f86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -4246,11 +4246,11 @@ void incrementErrorCount(const char *fullerr, size_t namelen) {
return; return;
} }
struct redisError *error = zmalloc(sizeof(*error)); struct serverError *error = zmalloc(sizeof(*error));
error->count = 1; error->count = 1;
raxInsert(server.errors,(unsigned char*)fullerr,namelen,error,NULL); raxInsert(server.errors,(unsigned char*)fullerr,namelen,error,NULL);
} else { } else {
struct redisError *error = result; struct serverError *error = result;
error->count++; error->count++;
} }
} }
@ -6071,10 +6071,10 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
raxIterator ri; raxIterator ri;
raxStart(&ri,server.errors); raxStart(&ri,server.errors);
raxSeek(&ri,"^",NULL,0); raxSeek(&ri,"^",NULL,0);
struct redisError *e; struct serverError *e;
while(raxNext(&ri)) { while(raxNext(&ri)) {
char *tmpsafe; char *tmpsafe;
e = (struct redisError *) ri.data; e = (struct serverError *) ri.data;
info = sdscatprintf(info, info = sdscatprintf(info,
"errorstat_%.*s:count=%lld\r\n", "errorstat_%.*s:count=%lld\r\n",
(int)ri.key_len, getSafeInfoString((char *) ri.key, ri.key_len, &tmpsafe), e->count); (int)ri.key_len, getSafeInfoString((char *) ri.key, ri.key_len, &tmpsafe), e->count);

View File

@ -2386,7 +2386,7 @@ struct serverCommand {
struct RedisModuleCommand *module_cmd; /* A pointer to the module command data (NULL if native command) */ struct RedisModuleCommand *module_cmd; /* A pointer to the module command data (NULL if native command) */
}; };
struct redisError { struct serverError {
long long count; long long count;
}; };