pike.git / lib / modules / Protocols.pmod / X.pmod / Auth.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/X.pmod/Auth.pmod:27:   {    mapping(int:mapping(string:mapping)) auth = ([]);       string make_key(string address, int display)    {    return sprintf("%d:%s", display, address);    }       void create(string s)    { -  object struct = ADT.struct(s); +  Stdio.Buffer struct = Stdio.Buffer(s);    -  while (!struct->is_empty()) +  while (sizeof(struct))    {    mapping m = ([ ]);    -  m->family = struct->get_uint(2); -  m->address = struct->get_var_string(2); -  m->display = (int) struct->get_var_string(2); -  m->name = struct->get_var_string(2); -  m->data = struct->get_var_string(2); +  m->family = struct->read_int(2); +  m->address = struct->read_hstring(2); +  m->display = (int) struct->read_hstring(2); +  m->name = struct->read_hstring(2); +  m->data = struct->read_hstring(2);       if (!auth[m->family])    auth[m->family] = ([]);       auth[m->family][make_key(m->address, m->display)] = m;    }    }       mapping lookup_local(string name, int display)    {
pike.git/lib/modules/Protocols.pmod/X.pmod/Auth.pmod:99:    object lock()    {    object f = Stdio.File();    if (!f->open(c_name, "cxw"))    return 0;    f->close();       return my_hardlink(c_name, l_name) && this;    }    -  void destroy() +  protected void _destruct()    {    rm(c_name);    rm(l_name);    }   }      object lock_file(string name)   {    return lock_key(name)->lock();   }