Ejemplo n.º 1
0
NS_IMETHODIMP
nsFolderCompactState::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
                                    nsresult status)
{
  nsCOMPtr<nsIMsgDBHdr> msgHdr;
  nsCOMPtr<nsIMsgDBHdr> newMsgHdr;
  if (NS_FAILED(status))
  {
    m_status = status; // set the m_status to status so the destructor can remove the
                       // temp folder and database
    m_folder->NotifyCompactCompleted();
    ReleaseFolderLock();
  }
  else
  {
    EndCopy(nsnull, status);
    if (m_curIndex >= m_size)
    {
      msgHdr = nsnull;
      newMsgHdr = nsnull;
      // no more to copy finish it up
      FinishCompact();
    }
    else
    {
      // in case we're not getting an error, we still need to pretend we did get an error,
      // because the compact did not successfully complete.
      m_folder->NotifyCompactCompleted();
      CleanupTempFilesAfterError();
      ReleaseFolderLock();
    }
  }
  Release(); // kill self
  return status;
}
Ejemplo n.º 2
0
void OGRPGDumpDataSource::LogCommit()
{
    EndCopy();

    if (!bInTransaction)
        return;
    bInTransaction = FALSE;
    Log("COMMIT");
}
Ejemplo n.º 3
0
OGRPGDumpLayer::~OGRPGDumpLayer()
{
    EndCopy();

    poFeatureDefn->Release();
    CPLFree(pszSqlTableName);
    CPLFree(pszGeomColumn);
    CPLFree(pszFIDColumn);
}
OGRPGDumpLayer::~OGRPGDumpLayer()
{
    EndCopy();

    poFeatureDefn->Release();
    CPLFree(pszSchemaName);
    CPLFree(pszSqlTableName);
    CPLFree(pszFIDColumn);
    CSLDestroy(papszOverrideColumnTypes);
}
NS_IMETHODIMP nsCopyMessageStreamListener::OnStopRequest(nsIRequest* request, nsISupports *ctxt, nsresult aStatus)
{
  return EndCopy(ctxt, aStatus);
}
Ejemplo n.º 6
0
void OGRPGDumpDataSource::StartCopy( OGRPGDumpLayer *poPGLayer )
{
    EndCopy();
    poLayerInCopyMode = poPGLayer;
}