Changeset 12f51629cadbce2beb3d924d761ad2cc07e95ba1
- Timestamp:
- 06/15/10 11:14:19 (2 years ago)
- Children:
- 5b42e03e0f421c03ed23d10ccbfe624435d35a62
- Parents:
- 19beb87b09eead3ac023e509e8df964ec8d55566
- git-author:
- Antti-Juhani Kaijanaho <ajk@…> (06/15/10 11:12:39)
- git-committer:
- Antti-Juhani Kaijanaho <ajk@…> (06/15/10 11:14:19)
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
local/connection.cc
r19beb87 r12f5162 98 98 std::string s = 99 99 util::streambuf_to_string(*sbp, n); 100 if (s.length() > n) s.resize(n); 100 101 ent.reset(new msg::entity(s)); 101 102 } -
util.cc
r19beb87 r12f5162 92 92 buffer_size(*it)); 93 93 } 94 if (recv.length() > n) recv.resize(n);95 94 sbuf.consume(recv.length()); 96 95 return recv; -
util.hh
r19beb87 r12f5162 133 133 } 134 134 135 /* WARNING: The resulting string may be longer than n. If you 136 need exactly n, truncate the string afterward by using the resize(n) 137 method. */ 135 138 std::string streambuf_to_string(boost::asio::streambuf &sbuf, size_t n); 136 139 }
