Get the last valid (non-tombstone) streamID of 's'. */
| 1333 | |
| 1334 | /* Get the last valid (non-tombstone) streamID of 's'. */ |
| 1335 | void streamLastValidID(stream *s, streamID *maxid) |
| 1336 | { |
| 1337 | streamIterator si; |
| 1338 | streamIteratorStart(&si,s,NULL,NULL,1); |
| 1339 | int64_t numfields; |
| 1340 | if (!streamIteratorGetID(&si,maxid,&numfields) && s->length) |
| 1341 | serverPanic("Corrupt stream, length is %llu, but no max id", (unsigned long long)s->length); |
| 1342 | streamIteratorStop(&si); |
| 1343 | } |
| 1344 | |
| 1345 | /* Emit a reply in the client output buffer by formatting a Stream ID |
| 1346 | * in the standard <ms>-<seq> format, using the simple string protocol |
no test coverage detected