Branch: Tag:

2002-01-23

2002-01-23 06:52:48 by Honza Petrous <hop@unibase.cz>

Catched tagged octet string data.
Fixes [Bug 2667].

Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.29

2:      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.28 2001/11/21 16:22:42 anders Exp $ + // $Id: client.pike,v 1.29 2002/01/23 06:52:48 hop Exp $   //   // Honza Petrous, hop@unibase.cz   //
124:    private array(mapping(string:array(string))) entry = ({});    array(string) referrals;    +  private string utf2s(string in) { +  // catched variant of utf8_to_string needed for tagged octed string data +  +  string out = ""; +  catch( out = utf8_to_string(in) ); +  return out; +  +  } +     private array _get_attr_values(int ver, object x) {       array res = ({});
134:    res += ({ val1->value });    if(ver == 3) {    // deUTF8 -  res = Array.map(res, utf8_to_string); +  res = Array.map(res, utf2s);    }    return(res);    }
349:    void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.28 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.29 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;