]> git.sur5r.net Git - openldap/blobdiff - clients/rcpt500/query.c
Add configure tests for ssize_t and caddr_t and remove NT preamble
[openldap] / clients / rcpt500 / query.c
index c035881849ffeaf0c8976455b36cc612afc375b5..157b5a4bafc7eb7467fe51e7a89b12b805894f39 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * query.c: for rcpt500 (X.500 email query responder)
  *
@@ -8,8 +9,6 @@
 
 #include "portable.h"
 
-#include <stdio.h>
-
 #include <ac/stdlib.h>
 
 #include <ac/ctype.h>
 #include <ac/syslog.h>
 #include <ac/time.h>
 
-#include "lber.h"
-#include "ldap.h"
+#include <stdio.h>
 
-#include "disptmpl.h"
+#include <ldap.h>
+#include <disptmpl.h>
 
 #include "rcpt500.h"
-#include "ldapconfig.h"
+#include "ldap_defaults.h"
 
 static char buf[ MAXSIZE ];
 static char *errpreface = "Your query failed: ";
 
 static void close_ldap(LDAP *ld);
 static void append_entry_list(char *rep, char *qu, LDAP *ld, LDAPMessage *msg);
-static int  append_text(void *reply, char *text, int len);
+static int  append_text(void *reply, char *text, ber_len_t len);
 static int  do_read (LDAP *ld, char *dn, char *rep, struct ldap_disptmpl *tmp);
 static void report_ldap_err (LDAP *ldp, char *reply);
 static void remove_trailing_space (char *s);
@@ -77,7 +76,7 @@ query_cmd( struct msginfo *msgp, char *reply )
        ldp = cldap_open( ldaphost, ldapport );
     else
 #endif /* LDAP_CONNECTIONLESS */
-       ldp = ldap_open( ldaphost, ldapport );
+       ldp = ldap_init( ldaphost, ldapport );
 
     if ( ldp == NULL ) {
        strcat( reply, errpreface );
@@ -290,7 +289,7 @@ append_entry_list( char *reply, char *query, LDAP *ldp, LDAPMessage *ldmsgp )
 
 
 static int
-append_text( void *reply, char *text, int len )
+append_text( void *reply, char *text, ber_len_t len )
 {
     strcat( (char *) reply, text );
     return( len );