cleaned out idiotic commenting of FUNCDEF, which had been done when a strict compile
[feisty_meow.git] / octopi / library / tentacles / file_transfer_tentacle.cpp
index 877672b11477a482e4453efcdd31c8d8e6ad1c78..c004b07740ee7de1ad6b3e48ccb9e431ae16ab67 100644 (file)
@@ -273,14 +273,14 @@ outcome file_transfer_tentacle::add_correspondence
   }
 #ifdef DEBUG_FILE_TRANSFER_TENTACLE
   LOG(astring("adding tree for: ent=") + new_record->_ent.text_form()
-      + " src=" + new_record->_src_root + " dest=" + new_record->_dest_root);
+      + " src=" + new_record->_src_root);
 #endif
   // calculate size and checksum info for the directory.
   new_record->_local_dir->calculate( !(_mode & COMPARE_CONTENT_SAMPLE) );
 
 #ifdef DEBUG_FILE_TRANSFER_TENTACLE
   LOG(astring("done adding tree for: ent=") + new_record->_ent.text_form()
-      + " src=" + new_record->_src_root + " dest=" + new_record->_dest_root);
+      + " src=" + new_record->_src_root);
 #endif
 
   _correspondences->append(new_record);
@@ -620,10 +620,12 @@ outcome file_transfer_tentacle::handle_storage_request
       (_correspondences->translate(the_rec->_src_root), *the_rec->_diffs,
       the_rec->_last_sent, resp->_packed_data, _maximum_transfer);
   if (bufret == heavy_file_operations::FINISHED) {
-    // finish by setting command to be a conclude marker.
-    the_rec->_done = true;
-    resp->_command = file_transfer_infoton::CONCLUDE_TRANSFER_MARKER;
-    bufret = OKAY;  // now it's no longer an exceptional outcome.
+    bufret = OKAY;  // in either case, we don't emit a finished outcome; handled elsewhere.
+    if (!resp->_packed_data.length()) {
+      // blank packages, so finish by setting command to be a conclude marker.
+      the_rec->_done = true;
+      resp->_command = file_transfer_infoton::CONCLUDE_TRANSFER_MARKER;
+    }
   } else if (bufret != OKAY) {
     // complain, but still send.
     LOG(astring("buffer files returned an error on item=")