From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,474b93277d081a60,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-22 07:28:58 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: frederic.ormancey@atosorigin.com (=?ISO-8859-1?Q?Fr=E9d=E9ric_Ormancey?=) Newsgroups: comp.lang.ada Subject: Bug in GNAT.Socket.Check_Selector in GNAT 3.14 Linux runtime Date: 22 Apr 2002 07:28:57 -0700 Organization: http://groups.google.com/ Message-ID: <9c9fb8b4.0204220628.5326ae23@posting.google.com> NNTP-Posting-Host: 193.105.113.102 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1019485738 13562 127.0.0.1 (22 Apr 2002 14:28:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 22 Apr 2002 14:28:58 GMT Xref: archiver1.google.com comp.lang.ada:22916 Date: 2002-04-22T14:28:58+00:00 List-Id: 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