Changeset 4256:6b0da49a8ef9 in roaraudio for libroar/socket.c
- Timestamp:
- 08/25/10 18:30:09 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/socket.c
r4073 r4256 349 349 size_t locallen[1] = {1}; 350 350 351 if ( sock < 0 ) 352 return -1; 351 ROAR_DBG("roar_socket_recv_fh(sock=%i, mes=%p, len=%p) = ?", sock, mes, len); 352 353 if ( sock < 0 ) { 354 ROAR_DBG("roar_socket_recv_fh(sock=%i, mes=%p, len=%p) = -1 // invalid socket", sock, mes, len); 355 return -1; 356 } 353 357 354 358 if ( len == NULL ) { … … 367 371 msg.msg_controllen = _SCMR_CONTROLLEN; 368 372 369 if ( (*len = recvmsg(sock, &msg, 0)) == -1 ) 370 return -1; 371 372 if ( msg.msg_controllen != _SCMR_CONTROLLEN ) 373 return -1; 374 373 if ( (*len = recvmsg(sock, &msg, 0)) == -1 ) { 374 ROAR_DBG("roar_socket_recv_fh(sock=%i, mes=%p, len=%p) = -1 // can not read from socket", sock, mes, len); 375 return -1; 376 } 377 378 if ( msg.msg_controllen != _SCMR_CONTROLLEN ) { 379 ROAR_DBG("roar_socket_recv_fh(sock=%i, mes=%p, len=%p) = -1 // control len is wrong", sock, mes, len); 380 return -1; 381 } 382 383 ROAR_DBG("roar_socket_recv_fh(sock=%i, mes=%p, len=%p) = %i", sock, mes, len, *(int *)CMSG_DATA(cmptr)); 375 384 return *(int *)CMSG_DATA(cmptr); 376 385 #else
Note: See TracChangeset
for help on using the changeset viewer.