Re: TCP Sockets on V4R5: bind() woes
Patrik Schindler <[email protected]> Sat, 2 Jul 2022 15:12:13 +0200
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Message-ID | <[email protected]> |
Hello Scott, Am 02.07.2022 um 01:07 schrieb Scott Klement <[email protected]>: > The problem appears to be on this line: > memset(&thisSockData, 0, thisSockSize); > > Since you haven't yet set "thisSockSize" at this point, it will write zeroes into an unpredictable amount of memory, and cause strange problems. I downloaded your code and corrected that line, and it worked okay for me. Augh, how embarrassing to have overlooked this! :-) I can confirm, there's no crash anymore, so I can continue expanding the program. Thanks a lot!! :wq! PoC -- This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/c400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/c400-l. Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com