* The add-on additionally to the print_server gets loaded by printer

add-ons too. The USBPrinterRoster thread has to be stopped before
  the transport add-on gets unloaded.
  This fixes the bug described in ticket #6008 that a page gets printed
  again and again.
* Added comment that the add-on might access a deleted object if the printer
  get disconnected during printing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38915 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2010-10-10 09:09:51 +00:00
parent 7fbfbc1dac
commit 08af89feda
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,9 @@
#define PIT_VENDOR_SPECIFIC 0xff
// TODO handle disconnection of printer during printing
// currently the USBPrinter will be deleted and USBTransport will still
// access the memory
class USBPrinter {
public:
USBPrinter(const BString& id, const BString& name,
@ -271,6 +274,7 @@ USBTransport::USBTransport(BDirectory *printer, BMessage *msg)
USBTransport::~USBTransport()
{
gUSBPrinterRoster.Stop();
}