Branch: Tag:

2020-02-25

2020-02-25 01:10:52 by Stephen R. van den Berg <srb@cuci.nl>

pgsql: Simplify code.

425:    |SSL.File   #endif    socket; -  private int towrite; +     final multiset(sql_result) runningportals = (<>);       final MUTEX nostash;
496:    private int write_cb() {    Thread.MutexKey lock = shortmux->lock();    if (this) { // Guard against async destructs -  towrite -= output_to(socket, towrite); +  output_to(socket);    lock = 0;    if (!i->fillread && !sizeof(this))    close();
564:    case SENDOUT:;    }    Thread.MutexKey lock = shortmux->trylock(); -  if (lock && (towrite = sizeof(this))) { +  if (lock && sizeof(this)) {    PD("%d>Sendcmd %O\n", -  socket->query_fd(), ((string)this)[..towrite-1]); -  towrite -= output_to(socket, towrite); +  socket->query_fd(), (string)this); +  output_to(socket);    }    } while (0);    started = 0;