diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-29 21:08:27 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-29 21:08:27 +0000 |
commit | f6165b1f58634a0aeea6544f7d069a75bcca906b (patch) | |
tree | 93d342abdf877086199e007aadaf39aa93fd3bb7 /apps/JAWS | |
parent | 8a8c245781b8731febc9887817959204cdede5a4 (diff) | |
download | ATCD-f6165b1f58634a0aeea6544f7d069a75bcca906b.tar.gz |
ChangeLogTag:Thu Jul 29 14:47:10 1999 Ossama Othman <othman@cs.wustl.edu>
Diffstat (limited to 'apps/JAWS')
-rw-r--r-- | apps/JAWS/ChangeLog | 7 | ||||
-rw-r--r-- | apps/JAWS/PROTOTYPE/JAWS/IO.cpp | 24 |
2 files changed, 23 insertions, 8 deletions
diff --git a/apps/JAWS/ChangeLog b/apps/JAWS/ChangeLog index 435ee635e1f..b95b6242328 100644 --- a/apps/JAWS/ChangeLog +++ b/apps/JAWS/ChangeLog @@ -1,3 +1,10 @@ +Thu Jul 29 16:05:59 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * PROTOTYPE/JAWS/IO.cpp (transmit_file): Added some fixes so this + code will compile on NT. Thanks to Brian Jones + <bjones@edgemail.com> for reporting this problem and to James Hu + for fixing it. + Tue Jun 22 13:42:51 1999 David L. Levine <levine@cs.wustl.edu> * remora/app/Makefile: replaced rm -f with $(RM). diff --git a/apps/JAWS/PROTOTYPE/JAWS/IO.cpp b/apps/JAWS/PROTOTYPE/JAWS/IO.cpp index e5542efc15d..57bc0ca3094 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/IO.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/IO.cpp @@ -201,14 +201,22 @@ JAWS_Synch_IO::transmit_file (JAWS_IO_Handler *ioh, if (cf.file ()->get_handle () != ACE_INVALID_HANDLE) { #if defined (ACE_JAWS_BASELINE) || defined (ACE_WIN32) - ACE_SOCK_Stream stream; - stream.set_handle (ioh->handle ()); + ACE_FILE_Info info; + cf.file ()->get_info (info); - if ((stream.send_n (header, header_size) == header_size) - && ((u_long) stream.send_n (handle.address (), handle.size ()) - == handle.size ()) - && (stream.send_n (trailer, trailer_size) == trailer_size)) - this->handler_->transmit_file_complete (); + if (cf.file ()->get_info (info) == 0 && info.size_ > 0) + { + ACE_SOCK_Stream stream; + stream.set_handle (ioh->handle ()); + if (((u_long) stream.send_n (header, header_size) == header_size) + && (stream.send_n (cf.mmap ()->addr (), info.size_) + == info.size_) + && ((u_long) stream.send_n (trailer, trailer_size) + == trailer_size)) + this->handler_->transmit_file_complete (); + else + result = -1; + } else result = -1; #else @@ -224,7 +232,7 @@ JAWS_Synch_IO::transmit_file (JAWS_IO_Handler *ioh, } ACE_FILE_Info info; - cf.file ()->get_info (info); + if (cf.file ()->get_info (info) == 0 && info.size_ > 0) { iov[iovcnt].iov_base = (char *) cf.mmap ()->addr (); |