Commit b471cf83 authored by Andreas Schmidt's avatar Andreas Schmidt

Proper checks.

parent 0009cbef
Pipeline #757 passed with stage
in 47 seconds
......@@ -43,9 +43,9 @@ PrrtSocket *PrrtSocket_create(const bool is_sender)
int enabled = 1;
check(sock_ptr->dataSocketFd = socket(AF_INET, SOCK_DGRAM, 0), "Cannot create data socket.");
check(setsockopt(sock_ptr->dataSocketFd, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled)), "Socket option set failed.");
check(setsockopt(sock_ptr->dataSocketFd, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled)) == EXIT_SUCCESS, "Socket option set failed.");
check(sock_ptr->feedbackSocketFd = socket(AF_INET, SOCK_DGRAM, 0), "Cannot create feedback socket.");
check(setsockopt(sock_ptr->feedbackSocketFd, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled)), "Socket option set failed.");
check(setsockopt(sock_ptr->feedbackSocketFd, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled)) == EXIT_SUCCESS, "Socket option set failed.");
pthread_mutexattr_t attr;
check(pthread_mutexattr_init(&attr) == 0, "Mutex attr init failed.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment