X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/78d6e1ce97611abe9f0d083033197773f93c33f7..32f33ac62101f37de1133688b45c8eb837d5b8d8:/practicas/pipi/src/devtcp.cpp diff --git a/practicas/pipi/src/devtcp.cpp b/practicas/pipi/src/devtcp.cpp index 828e0e6..e8828f4 100644 --- a/practicas/pipi/src/devtcp.cpp +++ b/practicas/pipi/src/devtcp.cpp @@ -41,7 +41,7 @@ void DevTCP::transmit(const std::string& data, const mac_type& mac) size_t size = data.size(); if (libtcp_send(tx_pool[mac], &size, sizeof(size_t)) != sizeof(size_t)) throw std::runtime_error("Error al enviar por el socket"); - if ((unsigned)libtcp_send(tx_pool[mac], data.c_str(), data.size()) != data.size()) + if ((unsigned)libtcp_send(tx_pool[mac], data.data(), data.size()) != data.size()) throw std::runtime_error("Error al enviar por el socket"); #ifdef DEBUG2 std::cout << "DevTCP::transmit(mac = " << mac << ", size = "