X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/0f45342a680ac4a02816e71b8550dbc3610391c0..ac1d74a402f344ad8135f125cbac73ecda46172e:/practicas/pipi/src/devtcp.cpp?ds=sidebyside 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 = "