IMPORT_LOG0( "*** Something is not set properly, interface, mailboxes, or destination.\n");
IMPORT_LOG0( "*** BeginImport: Either the interface or source mailbox is not set properly.");
NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval){	NS_PRECONDITION(_retval != nsnull, "null ptr");    if (!_retval)        return NS_ERROR_NULL_POINTER;	nsString	success;	nsString	error;	if (!m_doImport) {		nsImportStringBundle::GetStringByID( IMPORT_NO_MAILBOXES, success);		SetLogs( success, error, successLog, errorLog);					*_retval = PR_TRUE;		return( NS_OK);			}		if (!m_pInterface || !m_pMailboxes) {		IMPORT_LOG0( "*** Something is not set properly, interface, mailboxes, or destination.\n");		nsImportStringBundle::GetStringByID( IMPORT_ERROR_MB_NOTINITIALIZED, error);		SetLogs( success, error, successLog, errorLog);		*_retval = PR_FALSE;		return( NS_OK);	}		if (!m_pDestFolder) {		IMPORT_LOG0( "*** No import destination.\n");		nsImportStringBundle::GetStringByID( IMPORT_ERROR_MB_NODESTFOLDER, error);		SetLogs( success, error, successLog, errorLog);		*_retval = PR_FALSE;		return( NS_OK);	}	if (m_pThreadData) {		m_pThreadData->DriverAbort();		m_pThreadData = nsnull;	}	NS_IF_RELEASE( m_pSuccessLog);	NS_IF_RELEASE( m_pErrorLog);	m_pSuccessLog = successLog;	m_pErrorLog = errorLog;	NS_IF_ADDREF( m_pSuccessLog);	NS_IF_ADDREF( m_pErrorLog);			// kick off the thread to do the import!!!!	m_pThreadData = new ImportThreadData();	m_pThreadData->boxes = m_pMailboxes;	NS_ADDREF( m_pMailboxes);	m_pThreadData->mailImport = m_pInterface;	NS_ADDREF( m_pInterface);	m_pThreadData->errorLog = m_pErrorLog;	NS_IF_ADDREF( m_pErrorLog);	m_pThreadData->successLog = m_pSuccessLog;	NS_IF_ADDREF( m_pSuccessLog);		m_pThreadData->ownsDestRoot = m_deleteDestFolder;	m_pThreadData->destRoot = m_pDestFolder;	NS_IF_ADDREF( m_pDestFolder);	PRThread *pThread = PR_CreateThread( PR_USER_THREAD, &ImportMailThread, m_pThreadData, 									PR_PRIORITY_NORMAL, 									PR_LOCAL_THREAD, 									PR_UNJOINABLE_THREAD,									0);	if (!pThread) {		m_pThreadData->ThreadDelete();		m_pThreadData->abort = PR_TRUE;		m_pThreadData->DriverAbort();		m_pThreadData = nsnull;		*_retval = PR_FALSE;		nsImportStringBundle::GetStringByID( IMPORT_ERROR_MB_NOTHREAD, error);		SetLogs( success, error, successLog, errorLog);	}	else		*_retval = PR_TRUE;						return( NS_OK);}