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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:201:    lock=0;    } else    throw(MAGICTERMINATE);    return true;    }       final int read_cb(mixed id,mixed b) {    PD("Read callback %O\n",(string)b);    Thread.MutexKey lock=fillreadmux->lock();    if(procmsg) -  procmsg=0,lock=0,Thread.Thread(id); +  procmsg=0,lock=0,Thread.Thread(id());    else if(fillread)    didreadcb=1, fillread.signal();    lock=0;    return 0;    }       protected void create() {    i::create();    fillreadmux=Thread.Mutex();    fillread=Thread.Condition();
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:348:    PD("%d>Close socket\n",socket->query_fd());    ret=socket->close();    sendterminate();    foreach(closecallbacks;function(void|mixed:void) closecb;)    closecb();    closecallbacks=(<>);    return ret;    }       protected void destroy() { -  catch { // Exceptions don't work inside destructors -  close(); -  socket->set_callbacks(); // Clear all callbacks -  }; +  catch(close()); // Exceptions don't work inside destructors    connectfail=0;    }       final void connectloop(object pgsqlsess, int nossl) {    mixed err=catch {    for(;;clear()) {    socket->connect(pgsqlsess._host,pgsqlsess._port);   #if constant(SSL.File)    if(!nossl && !pgsqlsess->nossl    && (pgsqlsess._options.use_ssl || pgsqlsess._options.force_ssl)) {
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:396:    pgsqlsess.host,pgsqlsess.port);   #endif    break;    }    if(!socket->is_open())    error(strerror(socket->errno())+".\n");    connectfail=pgsqlsess->_connectfail;    socket->set_backend(local_backend);    socket->set_buffer_mode(i,0);    socket->set_nonblocking(i->read_cb,write_cb,close); +  connectfail=pgsqlsess->_connectfail;    Thread.Thread(pgsqlsess->_processloop,this);    return;    };    catch(connectfail(err));    }       private string _sprintf(int type, void|mapping flags) {    string res=UNDEFINED;    switch(type) {    case 'O':