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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:584:   }      protected void waitauthready() {    if(waitforauthready) {    Thread.MutexKey lock=waitforauth->lock();    catch(waitforauthready->wait(lock));    lock=0;    }   }    + protected inline mixed callout(function(mixed ...:void) f, +  float|int delay,mixed ... args) { +  return .pgsql_util.local_backend->call_out(f,delay,@args); + } +    final void _processloop(.pgsql_util.PGassist ci) {    int terminating=0;    int|.pgsql_util.pgsql_result portal;    mixed err;    {    Stdio.Buffer plugbuffer=Stdio.Buffer()->add_int32(PG_PROTOCOL(3,0));    if(user)    plugbuffer->add("user\0")->add(user)->add_int8(0);    if(database)    plugbuffer->add("database\0")->add(database)->add_int8(0);
pike.git/lib/modules/Sql.pmod/pgsql.pike:832: Inside #if defined(PG_DEBUG)
   PD("<%O ParameterDescription %d values\n",portal._query,cols);    msglen-=4+2+4*cols;   #endif    foreach(a=allocate(cols);int i;)    a[i]=ci->read_int32();   #ifdef PG_DEBUGMORE    PD("%O\n",a);   #endif    if(portal._tprepared)    portal._tprepared.datatypeoid=a; -  Thread.Thread(portal->_preparebind,a); +  callout(portal->_preparebind,0,a);    break;    }    case 'T': {    array a;   #ifdef PG_DEBUG    int cols=ci->read_int16();    PD("<RowDescription %d columns %O\n",cols,portal._query);    msglen-=4+2;    foreach(a=allocate(cols);int i;)   #else
pike.git/lib/modules/Sql.pmod/pgsql.pike:1273:    return;    reconnectdelay=RECONNECTBACKOFF;    break;    }    Thread.MutexKey lock=waitforauth->lock();    if(!waitforauthready)    waitforauthready=Thread.Condition();    lock=0;    PD("Schedule reconnect in %ds\n",tdelay);    _delayederror=0; -  .pgsql_util.local_backend->call_out(reconnect,tdelay,1); +  callout(reconnect,tdelay,1);    } else if(err)    _delayederror=err;   }      protected int reconnect(void|int force) {    PD("(Re)connect\n");    if(!force) {    Thread.MutexKey lock=waitforauth->lock();    if(waitforauthready) {    lock=0;
pike.git/lib/modules/Sql.pmod/pgsql.pike:1462:    if(args)    old+=args;    notifylist[condition]=old;    }   }      protected void runcallback(int pid,string condition,string extrainfo) {    array cb;    if((cb=notifylist[condition]||notifylist[""])    && (pid!=backendpid || sizeof(cb)>1 && cb[1])) -  Thread.Thread(cb[0],pid,condition,extrainfo,@cb[2..]); +  callout(cb[0],0,pid,condition,extrainfo,@cb[2..]);   }      //! @returns   //! The given string, but escapes/quotes all contained magic characters   //! according to the quoting rules of the current session for non-binary   //! arguments in textual SQL-queries.   //!   //! @note   //! Quoting must not be done for parameters passed in bindings.   //!