iterates over the watched_keys list and * look for an expired key . */
| 354 | /* iterates over the watched_keys list and |
| 355 | * look for an expired key . */ |
| 356 | int isWatchedKeyExpired(client *c) { |
| 357 | listIter li; |
| 358 | listNode *ln; |
| 359 | watchedKey *wk; |
| 360 | if (listLength(c->watched_keys) == 0) return 0; |
| 361 | listRewind(c->watched_keys,&li); |
| 362 | while ((ln = listNext(&li))) { |
| 363 | wk = listNodeValue(ln); |
| 364 | if (keyIsExpired(wk->db, wk->key)) return 1; |
| 365 | } |
| 366 | |
| 367 | return 0; |
| 368 | } |
| 369 | |
| 370 | /* "Touch" a key, so that if this key is being WATCHed by some client the |
| 371 | * next EXEC will fail. */ |
no test coverage detected