comparison src/eldap.h @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents 7347b34c275b
children 74fd4e045ea6
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
35 struct lcrecord_header header; 35 struct lcrecord_header header;
36 /* The LDAP connection handle used by the LDAP API */ 36 /* The LDAP connection handle used by the LDAP API */
37 LDAP *ld; 37 LDAP *ld;
38 /* Name of the host we connected to */ 38 /* Name of the host we connected to */
39 Lisp_Object host; 39 Lisp_Object host;
40 /* Status of the LDAP connection. */
41 int livep;
40 }; 42 };
41 43
42 44
43 DECLARE_LRECORD (ldap, struct Lisp_LDAP); 45 DECLARE_LRECORD (ldap, struct Lisp_LDAP);
44 #define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP) 46 #define XLDAP(x) XRECORD (x, ldap, struct Lisp_LDAP)
48 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap) 50 #define CHECK_LDAP(x) CHECK_RECORD (x, ldap)
49 #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap) 51 #define CONCHECK_LDAP(x) CONCHECK_RECORD (x, ldap)
50 52
51 #define CHECK_LIVE_LDAP(ldap) do { \ 53 #define CHECK_LIVE_LDAP(ldap) do { \
52 CHECK_LDAP (ldap); \ 54 CHECK_LDAP (ldap); \
53 if (!XLDAP (ldap)->ld) \ 55 if (!XLDAP (ldap)->livep) \
54 signal_simple_error ("Attempting to access closed LDAP connection", \ 56 signal_simple_error ("Attempting to access closed LDAP connection", \
55 ldap); \ 57 ldap); \
56 } while (0) 58 } while (0)
57 59
58 60