comp.lang.ada
 help / color / mirror / Atom feed
From: frederic.ormancey@atosorigin.com (Frédéric Ormancey)
Subject: Bug in GNAT.Socket.Check_Selector in GNAT 3.14 Linux runtime
Date: 22 Apr 2002 07:28:57 -0700
Date: 2002-04-22T14:28:58+00:00	[thread overview]
Message-ID: <9c9fb8b4.0204220628.5326ae23@posting.google.com> (raw)

Hi!

While implementing a socket interface on Linux platform, I find a
major bug in GNAT.Socket package : the Check_Selector procedure
doesn't check the return status of the C_Select routine, and don't
convert correctly the TimeOut duration value to TimeVal C Structure =>
The result is an immediate return of the Check_Selector procedure,
with invalid flags in socket set's.

I correct the timeout conversion ( when construct the C TimeVal
structure, use a float'floor instead of an integer cast to take the
first integer smaller than the duration timeout instead of the rounded
integer value of the duration timeout )

I post the correction to reports@gnat.com, with some other procedure
added in GNAT.Socket package :

Service structure access, like host structure access :
   type Serv_Entry_Type (Aliases_Length : Natural) is private;
   function Get_Service_By_Name
   function Get_Service_By_Port

Byte order conversion :
   function Short_To_Network, Network_To_Short, Long_To_Network,
Network_To_Long



             reply	other threads:[~2002-04-22 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22 14:28 Frédéric Ormancey [this message]
2002-04-22 17:39 ` Bug in GNAT.Socket.Check_Selector in GNAT 3.14 Linux runtime Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox