mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
weird
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@382 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
262717a99c
commit
cb8e50d6a3
@ -196,6 +196,7 @@ class bufferptr {
|
||||
|
||||
// assignment operator
|
||||
bufferptr& operator=(const bufferptr& other) {
|
||||
assert(0);
|
||||
// discard old
|
||||
discard_buffer();
|
||||
|
||||
|
@ -32,18 +32,21 @@ class bufferlist {
|
||||
bdbout(1) << "bufferlist.cons " << this << endl;
|
||||
}
|
||||
bufferlist(bufferlist& bl) : _len(0) {
|
||||
bdbout(1) << "bufferlist.cons " << this << endl;
|
||||
bdbout(1) << "bufferlist.cons " << this << endl; // O(n) and stupid!
|
||||
_buffers = bl._buffers;
|
||||
_len = bl._len;
|
||||
}
|
||||
~bufferlist() {
|
||||
bdbout(1) << "bufferlist.des " << this << endl;
|
||||
}
|
||||
/*
|
||||
|
||||
bufferlist& operator=(bufferlist& bl) {
|
||||
assert(0); // actually, this should be fine.
|
||||
assert(0); // actually, this should be fine, just slow (O(n)) and stupid.
|
||||
_buffers = bl._buffers;
|
||||
_len = bl._len;
|
||||
return *this;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// accessors
|
||||
list<bufferptr>& buffers() {
|
||||
|
@ -349,7 +349,9 @@ int tcp_send(Message *m)
|
||||
m->reset_payload();
|
||||
m->encode_payload();
|
||||
msg_envelope_t *env = &m->get_envelope();
|
||||
bufferlist blist = m->get_payload();
|
||||
bufferlist blist;
|
||||
blist.claim( m->get_payload() );
|
||||
|
||||
#ifdef TCP_KEEP_CHUNKS
|
||||
env->nchunks = blist.buffers().size();
|
||||
#else
|
||||
|
@ -93,7 +93,7 @@ int main(int oargc, char **oargv) {
|
||||
int world = tcpmessenger_world();
|
||||
|
||||
//cerr << "horrible hack remove me" << endl;
|
||||
//if (myrank == 0) g_conf.debug_filer = 15;
|
||||
//if (myrank == 0) g_conf.debug = 10;
|
||||
|
||||
|
||||
if (myrank == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user