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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:261:    return this;    }    stashcount++;    return bufcon(this);    }       private int write_cb() {    Thread.MutexKey lock=shortmux->lock();    towrite-=output_to(socket,towrite);    lock=0; -  if(!i->fillread && !sizeof(this)) { -  PD("%d>Close socket delayed\n",socket->query_fd()); -  socket->close(); -  } +  if(!i->fillread && !sizeof(this)) +  close();    return 0;    }       final void sendcmd(void|int mode,void|sql_result portal) {    if(portal)    queueup(portal);   nosync:    do {    switch(mode) {    default:
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:383:    error("Encryption library missing,"    " cannot establish connection to %s:%d\n",    pgsqlsess.host,pgsqlsess.port);   #endif    break;    }    if(!socket->is_open())    error(strerror(socket->errno()));    socket->set_backend(local_backend);    socket->set_buffer_mode(i,0); -  socket->set_nonblocking(i->read_cb,write_cb,0); +  socket->set_nonblocking(i->read_cb,write_cb,close);    Thread.Thread(pgsqlsess->_processloop,this);    return;    };    if(pgsqlsess)    pgsqlsess->_connectfail(err);    }       private string _sprintf(int type, void|mapping flags) {    string res=UNDEFINED;    switch(type) {