Subj : MsgBase first_msg property. To : Digital Man From : deon Date : Mon May 09 2022 11:42:18 Re: MsgBase first_msg property. By: Digital Man to deon on Sun May 08 2022 05:17 pm > > > I've added a proper caching of the last-read 'first_msg' value (caching it in the object's private data). I'll commit that now. Give it a try and let me know if it does what you were hoping for. > > > Thanks, I was going for what you were doing but couldnt figure out how first_msg would default to zero if the attribute was read and the msgbase hadnt been opened yet. How are you getting that? > > This line zeroes-out the index structure (where the first message number is taken): > memset(&idx,0,sizeof(idx)); > > If the call to smb_getfirstidx() fails, then the idx is just left as is (all zeroed-out). > Thanks, yes I saw that. But it's only called if the msgbase is opened. What if x = new MsgBase(code); JSON.stringify(x); It still shows first_msg is zero (as is last_msg) - which I know is what it should be - I couldnt follow how that was achieved for "first_msg" (I see how it is done for the other attributes). Or was that pure luck, and it could potentially be anything? It doesnt impact what I'm doing, just learning c++ code, one idea at a time :) ....лоеп --- ю Synchronet ю Alterant | an SBBS in Docker on Pi! * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .