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