diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-19 01:12:42 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-19 01:12:42 +0000 |
commit | eb7d20251b052fb7c2660eb3b47c7c103e3b14d9 (patch) | |
tree | f9996db88505c8605863ab6b1d8be5de1f958cfd | |
parent | eaab37b7b2483118ad630691bf4d8f20fdfa1c69 (diff) | |
download | ATCD-eb7d20251b052fb7c2660eb3b47c7c103e3b14d9.tar.gz |
Was calling release on a message block twice before, now fixed
(thanks Carlos!). Added some code to make asynchronous IO work,
hopefully.
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/Concurrency.cpp | 5 | ||||
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/Concurrency.h | 2 | ||||
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp | 11 |
3 files changed, 12 insertions, 6 deletions
diff --git a/apps/JAWS/PROTOTYPE/JAWS/Concurrency.cpp b/apps/JAWS/PROTOTYPE/JAWS/Concurrency.cpp index 64cfe01d993..ff7c6380dd0 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/Concurrency.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/Concurrency.cpp @@ -84,7 +84,8 @@ JAWS_Concurrency_Base::svc_loop (JAWS_Data_Block *db) JAWS_TRACE ("JAWS_Concurrency_Base::svc_loop"); for (;;) - this->svc_hook (db); + if (this->svc_hook (db) != 0) + break; return 0; } @@ -178,7 +179,7 @@ JAWS_Concurrency_Base::svc_hook (JAWS_Data_Block *db) while (result == 0); policy->ioh_factory ()->destroy_io_handler (handler); - ts_db->release (); + delete ts_db; return result; } diff --git a/apps/JAWS/PROTOTYPE/JAWS/Concurrency.h b/apps/JAWS/PROTOTYPE/JAWS/Concurrency.h index e16d80a7068..2615db1b01c 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/Concurrency.h +++ b/apps/JAWS/PROTOTYPE/JAWS/Concurrency.h @@ -46,7 +46,7 @@ public: protected: int mb_acquired_; ACE_Message_Block *mb_; - ACE_Thread_Mutex lock_; + ACE_SYNCH_MUTEX lock_; }; class JAWS_Dispatcher diff --git a/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp b/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp index 11aa4d02a82..104f186da8e 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/IO_Handler.cpp @@ -27,12 +27,13 @@ JAWS_IO_Handler::JAWS_IO_Handler (JAWS_IO_Handler_Factory *factory) JAWS_IO_Handler::~JAWS_IO_Handler (void) { - if (this->mb_) - this->mb_->release (); this->mb_ = 0; + this->status_ = 0; + this->task_ = 0; + this->factory_ = 0; + ACE_OS::close (this->handle_); this->handle_ = ACE_INVALID_HANDLE; - this->status_ = 0; } void @@ -290,6 +291,8 @@ void JAWS_Asynch_Handler::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result) { + this->dispatch_handler (); + result.message_block ().release (); if (result.act () == (void *) CONFORMATION) @@ -303,6 +306,8 @@ JAWS_Asynch_Handler::handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result) { + this->dispatch_handler (); + if (result.success ()) this->handler ()->transmit_file_complete (); else |