2 * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
11 int lber_int_debug = 0;
22 if(outvalue == NULL) {
23 /* no place to get to */
24 return LBER_OPT_ERROR;
28 if(option == LBER_OPT_BER_DEBUG) {
29 * (int *) outvalue = lber_int_debug;
30 return LBER_OPT_SUCCESS;
33 return LBER_OPT_ERROR;
36 ber = (BerElement *) item;
37 sb = (Sockbuf *) item;
40 case LBER_OPT_BER_OPTIONS:
41 * (int *) outvalue = ber->ber_options;
42 return LBER_OPT_SUCCESS;
44 case LBER_OPT_BER_DEBUG:
45 * (int *) outvalue = ber->ber_debug;
46 return LBER_OPT_SUCCESS;
53 return LBER_OPT_ERROR;
66 /* no place to set from */
67 return LBER_OPT_ERROR;
71 if(option == LBER_OPT_BER_DEBUG) {
72 lber_int_debug = * (int *) invalue;
73 return LBER_OPT_SUCCESS;
75 } else if(option == LBER_OPT_LOG_PRINT_FN) {
76 lber_pvt_log_print = (BER_LOG_PRINT_FN) invalue;
77 return LBER_OPT_SUCCESS;
80 return LBER_OPT_ERROR;
83 ber = (BerElement *) item;
84 sb = (Sockbuf *) item;
87 case LBER_OPT_BER_OPTIONS:
88 ber->ber_options = * (int *) invalue;
89 return LBER_OPT_SUCCESS;
91 case LBER_OPT_BER_DEBUG:
92 ber->ber_debug = * (int *) invalue;
93 return LBER_OPT_SUCCESS;
100 return LBER_OPT_ERROR;