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