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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:272:    foreach(stashqueue->try_read_array();;sql_result portal)    queueup(portal);    lock=0;    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)) +  Thread.MutexKey lock = shortmux->lock(); +  towrite -= output_to(socket,towrite); +  lock = 0; + #ifdef PG_DEBUG +  if (!i->fillread) +  PD("%d>Delayed close to go %d\n", socket->query_fd(), sizeof(this)); + #endif +  if (!i->fillread && !sizeof(this))    close();    return 0;    }       final void sendcmd(void|int mode, void|sql_result portal) {    if (portal)    queueup(portal);    Thread.MutexKey lock;    if (started) {    lock = shortmux->lock();
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:357:    }    lock=0;    PD("%d>Delayed close, flush write\n",socket->query_fd());    i->read_cb(socket->query_id(),0);    return 0;    } else    return -1;    }       protected void destroy() { +  PD("%d>Close conxion %d\n", socket ? socket->query_fd() : -1, !!nostash);    if(nostash) {    catch {    while(sizeof(closecallbacks))    foreach(closecallbacks;function(void|mixed:void) closecb;)    closecb();    destruct(nostash);    PD("%d>Close socket\n",socket->query_fd());    socket->close();    };    }