]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: clean up aborted message handling
authorSage Weil <sage@newdream.net>
Wed, 30 Jun 2010 19:09:14 +0000 (12:09 -0700)
committerSage Weil <sage@newdream.net>
Wed, 30 Jun 2010 19:09:32 +0000 (12:09 -0700)
No need for a dummy message.  Make the (single) caller handle returning
no message as a non-error.

Signed-off-by: Sage Weil <sage@newdream.net>
src/msg/SimpleMessenger.cc

index 1c65cb621e10cd62d451d4c9c7b77f583b69854d..2776965066d1e9a87add10e40a05582ffbc39e10 100644 (file)
@@ -1506,7 +1506,8 @@ void SimpleMessenger::Pipe::reader()
       pipe_lock.Lock();
       
       if (!m) {
-       fault(false, true);
+       if (r < 0)
+         fault(false, true);
        continue;
       }
 
@@ -1832,10 +1833,6 @@ int SimpleMessenger::Pipe::read_message(Message **pm)
   if (aborted) {
     dout(0) << "reader got " << front.length() << " + " << middle.length() << " + " << data.length()
            << " byte message.. ABORTED" << dendl;
-    // MEH FIXME 
-    *pm = new MGenericMessage(CEPH_MSG_PING);
-    header.type = CEPH_MSG_PING;
-    (*pm)->set_header(header);
     ret = 0;
     goto out_dethrottle;
   }