From 4c87a6fe468e776073fb1fb1f433484b62cb7485 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Wed, 26 May 2004 15:00:37 +0000 Subject: [PATCH] BMessage passed to add-on's init_transport() should be set to 'okok' on success. 2 years before I think about inspecting the BMessage returned by Be's transport add-ons :-( git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7652 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../transports/print_to_file/print_transport.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/add-ons/print/transports/print_to_file/print_transport.cpp b/src/add-ons/print/transports/print_to_file/print_transport.cpp index 1c18aff1e9..1a20f08ea2 100644 --- a/src/add-ons/print/transports/print_to_file/print_transport.cpp +++ b/src/add-ons/print/transports/print_to_file/print_transport.cpp @@ -64,13 +64,20 @@ extern "C" _EXPORT BDataIO * init_transport return NULL; file = new BFile(&ref, B_WRITE_ONLY | B_CREATE_FILE | B_ERASE_FILE); - if ( file->InitCheck() != B_OK ) - { + if ( file->InitCheck() != B_OK ) { + msg->what = 'canc'; // Indicates user cancel the panel... delete file; return NULL; - }; + }; AddFile(file); + + BPath path; + path.SetTo(&ref); + + // Print transport add-ons should set to 'okok' the message on success + msg->what = 'okok'; + msg->AddString("path", path.Path()); // Add path of new choosen file to transport message return file; }