summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-10-27 14:54:14 +0000
committerPascal Junck <pjunck@openoffice.org>2004-10-27 14:54:14 +0000
commit4a86b25ebcf7f7c20abc6da20710ba6d686cf168 (patch)
treed5caa8c2e552d1537e84dba42c0e38b3cccff8e4 /psprint
parentc8c9c13db8b914b0f371f82ca55ee4014f8dcdc6 (diff)
INTEGRATION: CWS os36 (1.4.8); FILE MERGED
2004/10/08 13:50:25 os 1.4.8.2: RESYNC: (1.4-1.7); FILE MERGED 2004/10/01 13:10:31 pl 1.4.8.1: fix a deadlock in case of not responding CUPS server
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/printer/cupsmgr.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/psprint/source/printer/cupsmgr.cxx b/psprint/source/printer/cupsmgr.cxx
index 562a4e3f5db9..28df64dac3ca 100644
--- a/psprint/source/printer/cupsmgr.cxx
+++ b/psprint/source/printer/cupsmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cupsmgr.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: hr $ $Date: 2004-09-09 10:59:43 $
+ * last change: $Author: pjunck $ $Date: 2004-10-27 15:54:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -388,9 +388,13 @@ void CUPSManager::runDests()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "starting cupsGetDests\n" );
#endif
- osl::MutexGuard aGuard( m_aCUPSMutex );
+ int nDests = 0;
+ cups_dest_t* pDests = NULL;
+ nDests = m_pCUPSWrapper->cupsGetDests( &pDests );
- m_nDests = m_pCUPSWrapper->cupsGetDests( (cups_dest_t**)&m_pDests );
+ osl::MutexGuard aGuard( m_aCUPSMutex );
+ m_nDests = nDests;
+ m_pDests = pDests;
m_bNewDests = true;
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "finished cupsGetDests\n" );
@@ -755,12 +759,14 @@ bool CUPSManager::checkPrintersChanged()
{
bChanged = m_bNewDests;
m_aCUPSMutex.release();
- initialize();
}
if( ! bChanged )
bChanged = PrinterInfoManager::checkPrintersChanged();
+ if( bChanged )
+ initialize();
+
return bChanged;
}