• src/smblib/smblib.c smbli

    From rswindell@VERT to CVS commit on Sat Jul 7 16:50:00 2018
    src/smblib smblib.c 1.176 1.177 smblib.h 1.85 1.86
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/home/rswindell/sbbs/src/smblib

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Re-write of smb_getmsgidx_by_time() - using a proper binary search
    algorithm now. Also, now returns the index offset of the matched index
    (if found), negative error value otherwise.

    I was testing something and noticed that the old smb_getmsgidx_by_time() implementation could sometimes return the index of a message posted before
    the requested time. That was fixed by re-writing the binary search logic.

    Also, I found it useful in my testing to have this function return the
    offset of the matching index (in addition to the index record itself), so checks of the return value need to compare >= SMB_SUCCESS, not just ==
    or != SMB_SUCCESS.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Mon Jul 23 18:15:00 2018
    src/smblib smblib.c 1.179 1.180 smblib.h 1.86 1.87
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv5685/smblib

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Singificantlly improve message scan pointer initialization (e.g. for new
    users) and adjusting scan ptrs by date or set to "Last msg" while online:
    - speed (on my system, reduced from 12 to < 2 seconds)
    This involved 2 enhancements: check msgbase index file timestamp (fast)
    before opening any files. When opening the msgbase, just open the index
    file (no other msgbase files) - required new smblib function: smb_open_index. - fixed off-by-one when setting by date (when setting the new-scan ptr to
    Jan-1-2018, you want that first message posted on/after Jan-1-2018 to be
    found as "new", not the first message posted *after* that date.
    - re-added the fixmsgptrs() call in putmsgptrs(), inadvertently removed
    in the .ixb -> .ini ptr storage update in rev 1.192 of userdat.c.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tue Apr 9 09:25:00 2019
    src/smblib smblib.c 1.188 1.189 smblib.h 1.88 1.89
    Update of /cvsroot/sbbs/src/smblib
    In directory cvs:/tmp/cvs-serv28365

    Modified Files:
    smblib.c smblib.h
    Log Message:
    Eliminate smb_stack(), SMB_STACK_* as this implementation is non-thread-safe and frankly could cause all kinds of havok with multiple thread (e.g. nodes) pushing and popping SMB's concurrently. eek.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net