diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-01-22 10:52:19 +0000 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-01-25 09:40:44 +0000 |
commit | b07f963e987725494dfa38a8841199546f4ba444 (patch) | |
tree | 6eef1be85b1dfceac95a4c0e687e678cfbbf8589 /vcl | |
parent | 64b23ff688fc4ba3fc0205094380f072fd98b5b5 (diff) |
Resolves: rhbz#1257635 after httpConnectEncrypt use cupsGetDests2
sometimes after calling httpConnectEncrypt + httpClose and then
calling cupsGetDests we get no printers found. Using
cupsGetDests2 with the return of httpConnectEncrypt consistently
provides results.
Change-Id: I7ea5b11fbaabbd7ca73e5c94d0757ebdea8445ad
(cherry picked from commit 6b86edae5c1eee51ee754b8013d463497bb75f65)
Reviewed-on: https://gerrit.libreoffice.org/21714
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/printer/cupsmgr.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 5c47442d8789..b46b2999435d 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -220,10 +220,7 @@ void CUPSManager::runDests() ippPort(), cupsEncryption())) != nullptr ) { - // neat, cups is up, clean up the canary - httpClose(p_http); - - int nDests = cupsGetDests( &pDests ); + int nDests = cupsGetDests2(p_http, &pDests); SAL_INFO("vcl.unx.print", "came out of cupsGetDests"); osl::MutexGuard aGuard( m_aCUPSMutex ); @@ -231,6 +228,8 @@ void CUPSManager::runDests() m_pDests = pDests; m_bNewDests = true; SAL_INFO("vcl.unx.print", "finished cupsGetDests"); + + httpClose(p_http); } } |