[Xastir] Networking issue for Cygwin

Tom Russo russo at bogodyn.org
Sun Oct 31 17:07:16 PDT 2021


Generally speaking, it's bad form to use uninitialized variables for
precisely this reason.

Initializing the entire hints datastructure to zeros before setting the 
specific bits we actually need sounds like the right thing to do.

The man page for getaddrinfo even shows that memset prior to using the
hints structure.

On Sun, Oct 31, 2021 at 08:01:19PM -0400, we recorded a bogon-computron collision of the <easternontariotracks at gmail.com> flavor, containing:
> That works!  I take it this confirms the specified values are working and
> the issue is with the contents of the rest of the structure.  Documentation
> suggests the other hints fields should be 0 or null pointers, so I added a
> test on the three pointer fields { as for example
> (hints.ai_addr==NULL)?"Null":"Not null" } and without the memset hack they
> all turn up "Not null".  Could this mean Cygwin is initializing the
> structure in an unusual way?
> Thanks,
> Russ
> 
> -----Original Message-----
> From: Xastir <xastir-bounces at lists.xastir.org> On Behalf Of Jason Godfrey
> Sent: October 31, 2021 1:14 PM
> To: Xastir - APRS client software discussion <xastir at lists.xastir.org>
> Subject: Re: [Xastir] Networking issue for Cygwin (and possible solution)
> 
> Hello.
> 
> Could you try doing a memset to 0 of hints in net_init before the hints
> fields are set and see if that helps?  In my copy it is line 3457 in
> interface.c.
> 
> Thanks
> - Jason
> 
> 
> 
> _______________________________________________
> Xastir mailing list
> Xastir at lists.xastir.org
> http://xastir.org/mailman/listinfo/xastir

-- 
Tom Russo    KM5VY
Tijeras, NM  

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir mailing list