merged string function cleanup from RC_0_16

This commit is contained in:
Arvid Norberg
2012-08-26 15:26:17 +00:00
parent 2665d2a4e1
commit fdc25967c2
15 changed files with 206 additions and 118 deletions

View File

@@ -34,9 +34,9 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/socket.hpp"
#include "libtorrent/udp_socket.hpp"
#include "libtorrent/connection_queue.hpp"
#include "libtorrent/escape_string.hpp"
#include "libtorrent/socket_io.hpp"
#include "libtorrent/error.hpp"
#include "libtorrent/string_util.hpp" // for allocate_string_copy
#include <stdlib.h>
#include <boost/bind.hpp>
#include <boost/array.hpp>
@@ -144,7 +144,7 @@ void udp_socket::send_hostname(char const* hostname, int port
m_queue.push_back(queued_packet());
queued_packet& qp = m_queue.back();
qp.ep.port(port);
qp.hostname = strdup(hostname);
qp.hostname = allocate_string_copy(hostname);
qp.buf.insert(qp.buf.begin(), p, p + len);
qp.flags = 0;
}