Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, for more info) to build successfully.

Commit 73225f60 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix bug that caused really-long sub-board load times.

I'm not sure how long this has been like this, but the last_msg
of a sub-board can be a super high number (e.g. in the billions), so using
that value as the highest message offset would cause tons of message index
read failures and just cause this loop to interate unneccessarily through
tons of non-existent messages. Also, this code is utter crap.
parent 62882a72
......@@ -52,7 +52,8 @@ function get_message_offsets(type)
// var hdr;
// for(last_offset=0; (idx=msgbase.get_msg_index(true,last_offset)) != null;last_offset++) {
for (var last_offset = 0; last_offset <= msgbase.last_msg; last_offset++) {
var total_msgs = msgbase.total_msgs;
for (var last_offset = 0; last_offset < msgbase.total_msgs; last_offset++) {
var idx = msgbase.get_msg_index(true, last_offset);
if (typeof idx === 'undefined' || idx === null) continue;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment