Changeset 2575
- Timestamp:
- 04/23/12 20:04:24 (13 months ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/tcpreceiver.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/tcpreceiver.cc
r2571 r2575 176 176 void TCPNameserver::sendPacket(shared_ptr<DNSPacket> p, int outsock) 177 177 { 178 const string buffer = p->getString();179 uint16_t len=htons(buffer.length());180 writenWithTimeout(outsock, &len, 2);178 uint16_t len=htons(p->getString().length()); 179 string buffer((const char*)&len, 2); 180 buffer.append(p->getString()); 181 181 writenWithTimeout(outsock, buffer.c_str(), buffer.length()); 182 182 }