This should be fine. only the Client uses this so far (not MDS).
If OSDs want to use this, though, this must be made smarter!!!
*/
- long pcid = ++last_pcid;
+ long pcid = ++_last_pcid;
m->set_pcid(pcid);
_lock.Lock();
msg_addr_t _myaddr;
// procedure call fun
- long last_pcid;
+ long _last_pcid;
Mutex _lock; // protect call_sem, call_reply
map<long, Cond*> call_cond;
map<long, Message*> call_reply;
public:
- Messenger(msg_addr_t w) : dispatcher(0), _myaddr(w) { }
+ Messenger(msg_addr_t w) : dispatcher(0), _myaddr(w), _last_pcid(1) { }
virtual ~Messenger() { }
msg_addr_t get_myaddr() { return _myaddr; }
//dout(DBL) << "tcp_write writing " << len << endl;
while (len > 0) {
int did = ::send( sd, buf, len, 0 );
+ if (did < 0) {
+ dout(1) << "tcp_write error did = " << did << " errno " << errno << " " << strerror(errno) << endl;
+ }
assert(did >= 0);
len -= did;
buf += did;
}
sender_lock.Unlock();
+
+ // hose message
+ delete m;
}