pike.git / lib / modules / Protocols.pmod / LDAP.pmod / protocol.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/protocol.pike:12:   // - improved checking of readed bytes in 'readmsg'   // v1.9.1.1   // 1999-03-21 - changed FILE to File (unbuffered)   // - some inactive code   //   // v1.10 1999-03-28 - rewritten methods 'readmsg' & 'writemsg'   // to new method 'xchgmsg'   // - added core for async operation   //    - #if constant(Standards.ASN1.Types) -  +    import Protocols.LDAP;      #include "ldap_globals.h"       // private variables    int next_id = 1; // message id counter    int ldap_version = LDAP_DEFAULT_VERSION; // actually used protocol vers.    string ldap_rem_errstr = ldap_error_strings[LDAP_SUCCESS]; // last remote error description    int ldap_errno = LDAP_SUCCESS; // last error code   
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/protocol.pike:147:    if(ix > 0)    s = ldapfd->read(ix);    if (!s || (sizeof(s) < ix)) {    seterr (LDAP_CONNECT_ERROR,    !s ? strerror (ldapfd->errno()) : "Connection closed");    ERROR ("LDAP read error: %s\n", ldap_rem_errstr);    //return -ldap_errno;    return;    }    readbuf += s; -  //DWRITE(sprintf("protocol.read_answer: %s\n", .ldap_privates.ldap_der_decode(readbuf)->debug_string())); +  //DWRITE(sprintf("protocol.read_answer: %O\n", .ldap_privates.ldap_der_decode(readbuf)));    DWRITE("protocol.read_answer: ok=1.\n");    ok = 1;       last_io_time = time();       if(con_ok)    con_ok(this, @extra_args);    }       protected int is_whole_pdu() {
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/protocol.pike:294:    DWRITE(sprintf("protocol.readmsg: reading %d bytes.\n", msglen));    s = ldapfd->read(msglen);    if (!s | (sizeof(s) < msglen)) {    seterr (LDAP_SERVER_DOWN,    !s ? strerror (ldapfd->errno()) : "Connection closed");    ERROR ("LDAP read error: %s\n", ldap_rem_errstr);    return -ldap_errno;    }    retv += s;    last_io_time = time(); -  DWRITE(sprintf("protocol.readmsg: %s\n", .ldap_privates.ldap_der_decode(retv)->debug_string())); +  DWRITE(sprintf("protocol.readmsg: %O\n", .ldap_privates.ldap_der_decode(retv)));    return retv;    }       int writemsg(object msgop) {    // Make LDAP PDU envelope for 'msgop' and send it       object msgval;    object msgid;    int rv = 0, msgnum;   
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/protocol.pike:329:    if (rv < 2) {    seterr (LDAP_SERVER_DOWN, strerror (ldapfd->errno()));    ERROR ("LDAP write error: %s\n", ldap_rem_errstr);    return -ldap_errno;    }    DWRITE(sprintf("protocol.writemsg: write OK [%d bytes].\n",rv));    msgval = 0; msgid = 0;    last_io_time = time();    return msgnum;    } -  - #else - constant this_program_does_not_exist=1; - #endif +