Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable for loop when USE_RECVMSG is not defined #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/rtpsession_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,12 +1603,13 @@ int rtp_session_rtp_recv_abstract(ortp_socket_t socket, mblk_t *msg, int flags,
msghdr.msg_controllen = sizeof(control);
#ifdef USE_RECVMSG
ret = rtp_recvmsg(socket, msg, flags, from, fromlen, &msghdr, bufsz);
if(ret >= 0) {
struct cmsghdr *cmsghdr;
#else
ret = recvfrom(socket, msg->b_wptr, bufsz, flags, from, fromlen);
#endif
if(ret >= 0) {
struct cmsghdr *cmsghdr;
#endif
#if defined USE_RECVMSG || defined _WIN32
for (cmsghdr = CMSG_FIRSTHDR(&msghdr); cmsghdr != NULL ; cmsghdr = CMSG_NXTHDR(&msghdr, cmsghdr)) {
#ifdef _RECV_SO_TIMESTAMP_TYPE
if (cmsghdr->cmsg_level == SOL_SOCKET && cmsghdr->cmsg_type == _RECV_SO_TIMESTAMP_TYPE) {
Expand Down Expand Up @@ -1663,6 +1664,7 @@ int rtp_session_rtp_recv_abstract(ortp_socket_t socket, mblk_t *msg, int flags,
}
}else{
}
#endif
return ret;
}

Expand Down