serv_gets(buf);
if (buf[0] == '4') {
- bigness = random() % 500;
+ bigness = random() % 10;
strcpy(buf, "");
for (i=0; i<bigness; ++i) {
strcat(buf, words[random() % nwords]);
snprintf(buf, sizeof buf, "DELE %ld", selected_msg);
serv_puts(buf);
serv_gets(buf);
- } while(buf[0] != '2'); // make sure we always delete exactly one message
+ } while ( (buf[0] != '2') && (total_msgs > 0));
}
}