• scan_ptr and 0xffffffff

    From Nightfox@VERT/DIGDIST to Digital Man on Sun Aug 11 13:10:22 2024
    Hi DM,

    Quite a while ago, I noticed that the value of scan_ptr in a sub-board can be 0xffffffff - most often, it seemed that was the case for a new user. I have in one of my comments that that value indicates that scan_ptr should point to the latest message in the messagebase - is that correct?

    Also, related to my question: I tried a test where I removed my DDMsgReader from the Load Modules configuration, then created a new user account and did a newscan in the messagebases, and it said there were no new messages. I think this seems to line up with that scan_ptr value saying to point to the latest message. Is it expected that a new user should see no new messages if they do a newscan right after creating their account? And I'm wondering if the behavior for a message reader should be that if it sees scan_ptr is that value, then set it to the latest message number in the messagebase?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Sun Aug 11 14:35:59 2024
    Re: scan_ptr and 0xffffffff
    By: Nightfox to Digital Man on Sun Aug 11 2024 01:10 pm

    Quite a while ago, I noticed that the value of scan_ptr in a sub-board can be 0xffffffff - most often, it seemed that was the case for a new user. I have in one of my comments that that value indicates that scan_ptr should point to the latest message in the messagebase - is that correct?

    Correct, but only temporarily (for that first logon).

    Also, related to my question: I tried a test where I removed my DDMsgReader from the Load Modules configuration, then created a new user account and did a newscan in the messagebases, and it said there were no new messages. I think this seems to line up with that scan_ptr value saying to point to the latest message. Is it expected that a new user should see no new messages if they do a newscan right after creating their account?

    That depends on the sysop's setting of SCFG->System->New User Values->Days of New Messages. When set to 0 (days), the scan pointer would be initialized to 0xffffffff during the logon and correctly set to the last message number in each base upon log-off.

    And I'm wondering
    if the behavior for a message reader should be that if it sees scan_ptr is that value, then set it to the latest message number in the messagebase?

    A message reader should just treat the base as "already read" in that case (no new messages).

    The scan pointers should never be *stored* with that value. i.e. the "ptr" keys in data/user/*.subs. SBBS automatically stores the correct pointer value upon log-off: if the pointer value is higher than the last message in the base, then it'll be set to (stored as) the number of the last message in the base.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #4:
    ASCIIZ = NUL ('\0') terminated string/array of ASCII characters
    Norco, CA WX: 93.3øF, 42.0% humidity, 7 mph WSW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Mon Aug 12 10:35:45 2024
    Re: scan_ptr and 0xffffffff
    By: Digital Man to Nightfox on Sun Aug 11 2024 02:35 pm

    Quite a while ago, I noticed that the value of scan_ptr in a sub-board can
    be 0xffffffff - most often, it seemed that was the case for a new user. I
    have in one of my comments that that value indicates that scan_ptr should
    point to the latest message in the messagebase - is that correct?

    Correct, but only temporarily (for that first logon).

    the latest message. Is it expected that a new user should see no new
    messages if they do a newscan right after creating their account?

    That depends on the sysop's setting of SCFG->System->New User Values->Days of New Messages. When set to 0 (days), the scan pointer would be initialized to 0xffffffff during the logon and correctly set to the last message number in each base upon log-off.

    And I'm wondering
    if the behavior for a message reader should be that if it sees scan_ptr is
    that value, then set it to the latest message number in the messagebase?

    A message reader should just treat the base as "already read" in that case (no new messages).

    Thanks for your reply. I'll need to update DDMsgReader so that it behaves accordingly.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com