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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:364:    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); +  int|.pgsql_util.sql_result portal; +  while (portal = qportals->try_read()) +  if (objectp(portal)) +  portal->_purgeportal();    if(nostash) {    catch {    while(sizeof(closecallbacks))    foreach(closecallbacks;function(void|mixed:void) closecb;)    closecb();    destruct(nostash);    socket->set_nonblocking(); // Drop all callbacks    PD("%d>Close socket\n",socket->query_fd());    socket->close();    };
pike.git/lib/modules/Sql.pmod/pgsql_util.pmod:395: Inside #if constant(SSL.File)
   PD("SSLRequest\n");    start()->add_int32(8)->add_int32(PG_PROTOCOL(1234,5679))    ->sendcmd(SENDOUT);    switch(read_int8()) {    case 'S':    object fcon=SSL.File(socket,SSL.Context());    if(fcon->connect()) {    socket=fcon;    break;    } -  default:PD("%d>Close socket\n",socket->query_fd()); +  default: +  PD("%d>Close socket short\n", socket->query_fd());    socket->close();    pgsqlsess.nossl=1;    continue;    case 'N':    if(pgsqlsess._options.force_ssl)    error("Encryption not supported on connection to %s:%d\n",    pgsqlsess.host,pgsqlsess.port);    }    }   #else    if(pgsqlsess._options.force_ssl)    error("Encryption library missing,"    " cannot establish connection to %s:%d\n",    pgsqlsess.host,pgsqlsess.port);   #endif    break;    } -  +  connectfail=pgsqlsess->_connectfail;    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);    if (nossl != 2) {    connectfail=pgsqlsess->_connectfail;    Thread.Thread(pgsqlsess->_processloop,this);    }    return;    };    catch(connectfail(err));