X-Git-Url: https://git.llucax.com/z.facultad/75.74/practicos.git/blobdiff_plain/6758589f5ff68b1775d5a83b01d7ac49f1b612ef..659563a75d668130df84664e7e6b1220667cbc28:/practicas/pipi/src/test_ipin.cpp diff --git a/practicas/pipi/src/test_ipin.cpp b/practicas/pipi/src/test_ipin.cpp index eb15d0f..e170b38 100644 --- a/practicas/pipi/src/test_ipin.cpp +++ b/practicas/pipi/src/test_ipin.cpp @@ -4,6 +4,7 @@ #include "dev.h" #include #include +#include #include #include #include @@ -32,8 +33,10 @@ int main(int argc, char* argv[]) proto = atoi(argv[5]); if (argc > 6) queue_id = atoi(argv[6]); + int que_id = msgget(queue_id, IPC_CREAT | 0666); + assert(que_id != -1); Dev dev(addr, mtu, queue_id); - int que_id = msgget(queue_id+1, IPC_CREAT | 0666); + que_id = msgget(queue_id+1, IPC_CREAT | 0666); assert(que_id != -1); Dev fwque(addr, DEV_MAX_MTU, queue_id+1); IPIn ipin(addr, dev, fwque, router, forward, std::cerr);