Lookup the consumer group in the specified stream and returns its * pointer, otherwise if there is no such group, NULL is returned. */
| 2289 | /* Lookup the consumer group in the specified stream and returns its |
| 2290 | * pointer, otherwise if there is no such group, NULL is returned. */ |
| 2291 | streamCG *streamLookupCG(stream *s, sds groupname) { |
| 2292 | if (s->cgroups == NULL) return NULL; |
| 2293 | streamCG *cg = (streamCG*)raxFind(s->cgroups,(unsigned char*)groupname, |
| 2294 | sdslen(groupname)); |
| 2295 | return (cg == raxNotFound) ? NULL : cg; |
| 2296 | } |
| 2297 | |
| 2298 | /* Lookup the consumer with the specified name in the group 'cg': if the |
| 2299 | * consumer does not exist it is created unless SLC_NOCREAT flag was specified. |
no test coverage detected