Subj : MsgBase.put_msg_header() failing to save header To : Digital Man From : Nightfox Date : Mon Aug 15 2016 08:08 pm Re: MsgBase.put_msg_header() failing to save header By: Digital Man to Nightfox on Wed Aug 10 2016 22:00:02 > >>> Why might put_msg_header() fail? > DM>> For a number of reasons. Try printing the msgbase.status and > DM>> msgbase.error values when whever put_msg_header() fails along with > DM>> the parameter values you're passing to put_msg_header(), and then > DM>> share the results here. That'll help to isolate the cause of the > DM>> error. >> This is the status and error message I'm getting when it fails to save >> the message: >> Status: -101 >> Error: illegal header length increase: 770 (4 blocks) vs 752 (3 >> blocks) DM> This means that the modified message header requires more storage (blocks DM> in the *.shd file) than what was allocated for the original message DM> header. The read header used 752 bytes (3 256-byte blocks) and the DM> modified header requires 770 bytes (4 256-byte blocks). Setting the "read" DM> attribute should not increase the storage space for a header at all, so DM> something else is changing between when you read the header and when DM> you're attempting to write it. My reader script shouldn't do anything that increases the size of the header before I write it. I can double-check my reader to see if it's doing anything to increase the header size though. The odd thing is that it successfully saves the header for some messages but fails this way for others. DM> The problem might lie in this field_list. Can you expand this array in DM> your debug output so we can see what's being added to the header? DM> Also, the dump of the original header would be useful for comparison DM> purposes. I've updated the debug dump to expand field_list. This is the original header before my reader modifies it: number: 2289 offset: 727 to: Eric Oulashin from: robert wolfe subject: BBS software for Mac OS X to_agent: 0 from_agent: 0 replyto_agent: 0 to_net_type: 0 from_net_type: 2 from_net_addr: 1:116/17 replyto_net_type: 0 forwarded: 0 expiration: 0 priority: 0 cost: 0 type: 0 version: 289 attr: 0 auxattr: 0 netattr: 0 when_written_time: 1465744314 when_written_zone: 16684 when_written_zone_offset: -300 when_imported_time: 1465740264 when_imported_zone: 16864 when_imported_zone_offset: -480 thread_id: 2239 thread_back: 2255 thread_next: 0 thread_first: 0 delivery_attempts: 0 last_downloaded: 0 times_downloaded: 0 data_length: 582 date: Sun, 12 Jun 2016 08:11:54 -0500 reply_id: <57559F2C.2255.fido_bbscarni@digitaldistortionbbs.com> id: <575D6BE8.2289.fido_bbscarni@digitaldistortionbbs.com> ftn_msgid: 1:116/17 48cc417b ftn_reply: 2255.fido_bbscarni@1:340/7 1bbaddfb ftn_tid: Mystic BBS 1.12 A16 ftn_area: BBS_CARNIVAL field_list: 0: type: 162 data: 14/5 18/200 19/33 34/999 90/1 116/17 18 110 120/331 123/10 500 1: type: 162 data: 128/187 140/1 218/510 700 222/2 230/150 240/1120 249/303 261/20 38 2: type: 162 data: 261/100 266/404 267/155 280/1027 282/1056 292/907 908 320/119 219 3: type: 162 data: 340/400 393/68 73 396/45 712/848 801/161 189 2320/105 303 340/7 10 4: type: 162 data: 340/100 138/389 340/700 226/50 340/200 101 800 300/6 5 340/0 5: type: 163 data: 116/17 18 261/38 340/400 can_read: true And this is the header after it applies the MSG_READ attribute: number: 2289 offset: 727 to: Eric Oulashin from: robert wolfe subject: BBS software for Mac OS X to_agent: 0 from_agent: 0 replyto_agent: 0 to_net_type: 0 from_net_type: 2 from_net_addr: 1:116/17 replyto_net_type: 0 forwarded: 0 expiration: 0 priority: 0 cost: 0 type: 0 version: 289 attr: 2 auxattr: 0 netattr: 0 when_written_time: 1465744314 when_written_zone: 16684 when_written_zone_offset: -300 when_imported_time: 1465740264 when_imported_zone: 16864 when_imported_zone_offset: -480 thread_id: 2239 thread_back: 2255 thread_next: 0 thread_first: 0 delivery_attempts: 0 last_downloaded: 0 times_downloaded: 0 data_length: 582 date: Sun, 12 Jun 2016 08:11:54 -0500 reply_id: <57559F2C.2255.fido_bbscarni@digitaldistortionbbs.com> id: <575D6BE8.2289.fido_bbscarni@digitaldistortionbbs.com> ftn_msgid: 1:116/17 48cc417b ftn_reply: 2255.fido_bbscarni@1:340/7 1bbaddfb ftn_tid: Mystic BBS 1.12 A16 ftn_area: BBS_CARNIVAL field_list: 0: type: 162 data: 14/5 18/200 19/33 34/999 90/1 116/17 18 110 120/331 123/10 500 1: type: 162 data: 128/187 140/1 218/510 700 222/2 230/150 240/1120 249/303 261/20 38 2: type: 162 data: 261/100 266/404 267/155 280/1027 282/1056 292/907 908 320/119 219 3: type: 162 data: 340/400 393/68 73 396/45 712/848 801/161 189 2320/105 303 340/7 10 4: type: 162 data: 340/100 138/389 340/700 226/50 340/200 101 800 300/6 5 340/0 5: type: 163 data: 116/17 18 261/38 340/400 can_read: true Nightfox --- þ Synchronet þ Digital Distortion: digitaldistortionbbs.com .