Changeset 219:c8c7e9957cc5 in roaraudio
- Timestamp:
- 07/21/08 23:13:26 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/file.c
r217 r219 31 31 socklen_t cork_len = sizeof(int); 32 32 33 getsockopt(out, IPPROTO_TCP, TCP_CORK, &cork_old, &cork_len); 34 setsockopt(out, IPPROTO_TCP, TCP_CORK, &cork_new, sizeof(int)); 33 if ( getsockopt(out, IPPROTO_TCP, TCP_CORK, &cork_old, &cork_len) == -1 ) { 34 cork_old = -1; 35 } else { 36 setsockopt(out, IPPROTO_TCP, TCP_CORK, &cork_new, sizeof(int)); 37 } 35 38 #endif 36 39 … … 46 49 47 50 #ifdef __linux__ 48 setsockopt(out, IPPROTO_TCP, TCP_CORK, &cork_old, cork_len); 51 if ( cork_old != -1 ) 52 setsockopt(out, IPPROTO_TCP, TCP_CORK, &cork_old, cork_len); 49 53 #endif 50 54 return r;
Note: See TracChangeset
for help on using the changeset viewer.