pike.git / lib / modules / Sql.pmod / pgsql_util.pmod

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:404:    Thread.Thread(pgsqlsess->_processloop,this);    return;    };    catch(connectfail(err));    }       private string _sprintf(int type, void|mapping flags) {    string res=UNDEFINED;    switch(type) {    case 'O': +  int fd=-1; +  if(socket) +  catch(fd=socket->query_fd());    res=predef::sprintf("conxion fd: %d input queue: %d/%d "    "queued portals: %d output queue: %d/%d\n", -  socket&&socket->query_fd(), -  sizeof(i),i->_size_object(), +  fd,sizeof(i),i->_size_object(),    qportals->size(),sizeof(this),_size_object());    break;    }    return res;    }       protected void create(object pgsqlsess,Thread.Queue _qportals,int nossl) {    o::create();    qportals = _qportals;    synctransact = 1;
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:472:    final string _query;    final string _preparedname;    final mapping(string:mixed) _tprepared;    private function(:void) gottimeout;    private int timeout;       private string _sprintf(int type, void|mapping flags) {    string res=UNDEFINED;    switch(type) {    case 'O': +  int fd=-1; +  if(c&&c->socket) +  catch(fd=c->socket->query_fd());    res=sprintf("sql_result state: %d numrows: %d eof: %d inflight: %d\n"    "query: %O\n"    "fd: %O portalname: %O datarows: %d"    " laststatus: %s\n",    _state,rowsreceived,eoffound,inflight, -  _query,c&&c->socket?->query_fd(), -  _portalname,datarowtypes&&sizeof(datarowtypes), +  _query,fd,_portalname,datarowtypes&&sizeof(datarowtypes),    statuscmdcomplete||(_unnamedstatementkey?"*parsing*":""));    break;    }    return res;    }       protected void create(object _pgsqlsess,conxion _c,string query,    int _portalbuffersize,int alltyped,array params,int forcetext,    int _timeout) {    pgsqlsess = _pgsqlsess;