Issue 239 - libldap LDAP_OPT_NETWORK_TIMEOUT feature
Summary: libldap LDAP_OPT_NETWORK_TIMEOUT feature
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-07-29 13:31 UTC by lars.uffmann@mediaways.net
Modified: 2014-08-01 21:07 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description lars.uffmann@mediaways.net 1999-07-29 13:31:48 UTC
Full_Name: Lars Uffmann
Version: -devel
OS: aix 3/4, sunos, linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.71.129.112)



Enhancment to libldap. It introduces a new LDAP_OPTION,
LDAP_OPT_NETWORK_TIMEOUT, configurable via ldap_(set/get)_options.
The value of LDAP_OPT_NETWORK_TIMEOUT is a struct timeval *,
which is used to specify a timeout to otherwise blocking network related
system calls like connect().

There are several open questions/issues with my patch:

1) configure check for inet_aton().
2) ioctl()/fcntl() portability iussues.
3) on ftp://koobera.math.uic.edu/www/docs/connect.html, D. J. Bernstein
mentions
   that the following code might crash older systems:

        int so_errno;
        int dummy = sizeof(so_errno);
        getsockopt(s,SOL_SOCKET,SO_ERROR,&so_errno,&dummy);

   How to identify those systems ?


Comment 1 lars.uffmann@mediaways.net 1999-08-02 15:56:45 UTC
ftp://ftp.openldap.org/incoming/libldap-opt_network_timeout-19990802.tar.gz
The diffs are made against -HEAD/19990802. 

Changelog:

- fixed a typo in options.c.

- renamed functions in os-ip.c to follow the ldap_pvt_ convention.

- replaced all function calls with portability/configure problems:
    getsockopt(...,SO_ERROR,...) => getpeername(); read()
    inet_aton() => inet_addr()
    fcntl(...,O_NONBLOCK,...) => ioctl(...,FIONBIO,...)
  I left the code to reenable it if the configure issues are resolved.

Notes: The code in ldap_set_option allows to pass a (struct timeval
*)NULL.
This is necessary to disable the timeout.

--
Lars Uffmann, <lars.uffmann@mediaways.net>, fon +49 5241 80 1438
Comment 2 Kurt Zeilenga 1999-08-03 05:13:01 UTC
moved from Incoming to Software Enhancements
Comment 3 Kurt Zeilenga 1999-08-03 18:15:36 UTC
changed notes
changed state Open to Test
Comment 4 Kurt Zeilenga 1999-08-03 18:16:47 UTC
committed to -devel (with mods).
Looks like we still have lots of issues to sort out....

Kurt
Comment 5 Kurt Zeilenga 1999-12-12 01:02:32 UTC
changed state Test to Closed
Comment 6 OpenLDAP project 2014-08-01 21:07:00 UTC
committed to devel (with mods).