Subj : MsgBase first_msg property. To : deon From : Digital Man Date : Fri May 06 2022 23:23:31 Re: MsgBase first_msg property. By: deon to Digital Man on Sat May 07 2022 09:08 am > Re: MsgBase first_msg property. > By: Digital Man to deon on Fri May 06 2022 12:48 pm > > > > Looking at one of my msgbases, fsx_gen: > > > > Opening [1002101] - (fsx_gen) > > > - First:0 <-- first_msg property > > > Seems to work for me. I wrote this simple test script and it displays > > non-zero first message values for my mail base and sub-boards: > > OK, your little script works as well for me. > > I've triggered my issue, appreciate your thoughts on it. > > I'm using objects - (not sure if you still have my msgbase.js) - in that I > create an object representing the message base (with headers). > > So I: > > x=new MsgArea() > x.code = 'fsx_gen'; > > Setting the code triggers: > * this.msgbase = new MsgBase(code); > * open the msgbase > * this.headers = this.msgbase.get_all_msg_headers(false,false) || []; > * this.msgbase.close(); > > If I dump this.msgbase, before the open(BO:), after the open (AO:) and after > the close (AC:), I get this: > > BO:{"cfg":{"number":40,"grp_number":3,"grp_name":"0021:FSX","code":"fsx_gen" > ,"n ame":"01:GEN","description":"General > Chat","qwk_name":"FSX_GEN","area_tag":"FSX _GEN","newsgroup":"0021_FSX.01_GE > N","ars":"","read_ars":"","post_ars":"","opera tor_ars":"","moderated_ars":" > ","data_dir":"/opt/sbbs/data/subs/fsx/","fidonet_o rigin":"I'm playing with > ANSI+videotex - wanna play too?","qwknet_tagline":"Alterant | an SBBS in > Docker on Pi!","settings":1021378 91,"ptridx":28,"qwk_conf":0,"max_crcs":100 > 00,"max_msgs":0,"max_age":365,"print_ mode":0,"print_mode_neg":0},"error":"" > ,"status":0,"file":"/opt/sbbs/data/subs/f sx/fsx_gen","retry_time":30,"retry > _delay":0,"first_msg":0,"last_msg":0,"total_m sgs":0,"max_crcs":0,"max_msgs" > :0,"max_age":0,"attributes":0,"subnum":40,"is_ope n":false} > > => Zero's as expected. > > AO:{"cfg":{"number":40,"grp_number":3,"grp_name":"0021:FSX","code":"fsx_gen" > ,"n ame":"01:GEN","description":"General > Chat","qwk_name":"FSX_GEN","area_tag":"FSX _GEN","newsgroup":"0021_FSX.01_GE > N","ars":"","read_ars":"","post_ars":"","opera tor_ars":"","moderated_ars":" > ","data_dir":"/opt/sbbs/data/subs/fsx/","fidonet_o rigin":"I'm playing with > ANSI+videotex - wanna play too?","qwknet_tagline":"Alterant | an SBBS in > Docker on Pi!","settings":1021378 91,"ptridx":28,"qwk_conf":0,"max_crcs":100 > 00,"max_msgs":0,"max_age":365,"print_ mode":0,"print_mode_neg":0},"error":"" > ,"status":0,"file":"/opt/sbbs/data/subs/f sx/fsx_gen","retry_time":30,"retry > _delay":250,"first_msg":50203,"last_msg":6001 8,"total_msgs":9816,"max_crcs" > :10000,"max_msgs":0,"max_age":365,"attributes":0, > "subnum":40,"is_open":true} > > => Has values as expected > > AC:{"cfg":{"number":40,"grp_number":3,"grp_name":"0021:FSX","code":"fsx_gen" > ,"n ame":"01:GEN","description":"General > Chat","qwk_name":"FSX_GEN","area_tag":"FSX _GEN","newsgroup":"0021_FSX.01_GE > N","ars":"","read_ars":"","post_ars":"","opera tor_ars":"","moderated_ars":" > ","data_dir":"/opt/sbbs/data/subs/fsx/","fidonet_o rigin":"I'm playing with > ANSI+videotex - wanna play too?","qwknet_tagline":"Alterant | an SBBS in > Docker on Pi!","settings":1021378 91,"ptridx":28,"qwk_conf":0,"max_crcs":100 > 00,"max_msgs":0,"max_age":365,"print_ mode":0,"print_mode_neg":0},"error":"" > ,"status":0,"file":"/opt/sbbs/data/subs/f sx/fsx_gen","retry_time":30,"retry > _delay":250,"first_msg":0,"last_msg":60018,"t otal_msgs":9816,"max_crcs":100 > 00,"max_msgs":0,"max_age":365,"attributes":0,"sub num":40,"is_open":false} > > => first_msg has been zeroed As I would expect. These property values are dynamic (query the open message base), so the msgbase needs to be open. > So why when the message base, is the "first_msg" attribute set to zero, but > all other attributes are untouched? The others are stale values from the previous time you queried the properties contained in the status header. > Can it be left untouched? You can copy the value if you want to save a snapshot of it. > (This is on a build as of yesterday - commit 6de0ebc0d.) It's not a bug. If anything, I'd just work to make all the other cached values 'undefined' rather than return stale values. That's not going to help you either. -- digital man (rob) This Is Spinal Tap quote #3: How much more black could this be? and the answer is none. None more black. Norco, CA WX: 60.9øF, 82.0% humidity, 0 mph ESE wind, 0.00 inches rain/24hrs --- þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net .