]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: use send_reply for pool ops; fix msg leak
authorSage Weil <sage@newdream.net>
Mon, 12 Oct 2009 19:06:36 +0000 (12:06 -0700)
committerSage Weil <sage@newdream.net>
Mon, 12 Oct 2009 19:06:36 +0000 (12:06 -0700)
src/mon/PGMonitor.cc

index 77b3543c77dd96a10a3e9ec66ccf28c52686153e..37e32655cd683da1bd413cf600c6f999a4d6538d 100644 (file)
@@ -225,7 +225,7 @@ void PGMonitor::handle_statfs(MStatfs *statfs)
   reply->h.st.num_objects = pg_map.pg_sum.num_objects;
 
   // reply
-  mon->messenger->send_message(reply, statfs->get_orig_source_inst());
+  mon->send_reply(statfs, reply);
  out:
   delete statfs;
 }
@@ -253,7 +253,7 @@ bool PGMonitor::preprocess_getpoolstats(MGetPoolStats *m)
     reply->pool_stats[*p] = pg_map.pg_pool_sum[poolid];
   }
 
-  mon->messenger->send_message(reply, m->get_orig_source_inst());
+  mon->send_reply(m, reply);
 
  out:
   delete m;
@@ -292,7 +292,9 @@ bool PGMonitor::preprocess_pg_stats(MPGStats *stats)
        p != stats->pg_stat.end();
        p++)
     ack->pg_stat[p->first] = p->second.reported;
-  mon->messenger->send_message(ack, stats->get_orig_source_inst());
+  mon->send_reply(stats, ack);
+
+  delete stats;
   return true;
 }