/* $OpenLDAP$ */
/*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
#include "portable.h"
-#ifdef LDAP_PF_LOCAL
+#ifdef LDAP_PF_UNIX
#include <stdio.h>
#endif /* HAVE_IO_H */
#include "ldap-int.h"
+#include "ldap_defaults.h"
/* int ldap_int_tblsize = 0; */
}
if ( path == NULL || path[0] == '\0' ) {
- path = "/tmp/.ldap-sock";
+ path = LDAPI_SOCK;
} else {
if ( strlen(path) > (sizeof( server.sun_path ) - 1) ) {
ldap_pvt_set_errno( ENAMETOOLONG );
oslocal_debug(ld, "ldap_connect_to_path: Trying %s\n", path, 0, 0);
- memset( &server, 0, sizeof(server) );
+ memset( &server, '\0', sizeof(server) );
server.sun_family = AF_UNIX;
strcpy( server.sun_path, path );
rc = ldap_pvt_connect(ld, s, &server, async);
if (rc == 0) {
- ber_pvt_sb_set_desc( sb, s );
+ ber_sockbuf_ctrl( sb, LBER_SB_OPT_SET_FD, (void *)&s );
} else {
ldap_pvt_close_socket(ld, s);
}
}
#else
static int dummy;
-#endif /* LDAP_PF_LOCAL */
+#endif /* LDAP_PF_UNIX */