Lookup the named master into sentinel.masters. * If the master is not found reply to the client with an error and returns * NULL. */
| 3496 | * If the master is not found reply to the client with an error and returns |
| 3497 | * NULL. */ |
| 3498 | sentinelRedisInstance *sentinelGetMasterByNameOrReplyError(client *c, |
| 3499 | robj *name) |
| 3500 | { |
| 3501 | sentinelRedisInstance *ri; |
| 3502 | |
| 3503 | ri = (sentinelRedisInstance*)dictFetchValue(sentinel.masters,ptrFromObj(name)); |
| 3504 | if (!ri) { |
| 3505 | addReplyError(c,"No such master with that name"); |
| 3506 | return NULL; |
| 3507 | } |
| 3508 | return ri; |
| 3509 | } |
| 3510 | |
| 3511 | #define SENTINEL_ISQR_OK 0 |
| 3512 | #define SENTINEL_ISQR_NOQUORUM (1<<0) |
no test coverage detected