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

version» Context lines:

pike.git/lib/modules/Sql.pmod/pgsql.pike:1260:    m_delete(tp,"preparedname");    if(!_options.reconnect)    ERROR("Lost connection to database %s:%d\n",_host,_port);    }    PD("Actually start to connect\n");    qportals=Thread.Queue();    _readyforcommit=Thread.Condition();    _readyforquerycount=1;    _waittocommit=0;    qportals->write(1); -  if(!getsocket()) { -  string msg=sprintf("Couldn't connect to database on %s:%d",_host,_port); -  if(force) { -  if(!sizeof(lastmessage) || lastmessage[sizeof(lastmessage)-1]!=msg) -  lastmessage+=({msg}); -  return 0; -  } else -  ERROR(msg+"\n"); -  } +  if(!(c=getsocket())) +  ERROR("Couldn't connect to database on %s:%d\n",_host,_port);    _runtimeparameter=([]);    _unnamedportalmux=Thread.Mutex();    unnamedstatement=Thread.Mutex();    readyforquery_cb=recon?reconnect_cb:connect_cb;    _portalsinflight=0;    return 1;   }      //! For PostgreSQL this function performs the same function as @[resync()].   //!