Changeset 9047
- Timestamp:
- 11/22/13 18:04:27 (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi.c
r9031 r9047 556 556 { 557 557 struct sockaddr_in saddr; 558 fcntl(socket_fd, F_SETFL, O_NONBLOCK);558 set_nonblock(socket_fd, true); 559 559 bzero(&saddr, sizeof(saddr)); 560 560 saddr.sin_family = AF_INET; -
trunk/module-pandora.c
r9008 r9047 246 246 247 247 cl->pfd = cl->udp_fd; 248 // fcntl(cl->udp_fd, F_SETFL, fcntl(cl->udp_fd, F_GETFL, 0) | O_NONBLOCK); //!!!!!248 //set_nonblock(cl->udp_fd, true); //!!!!! 249 249 return (0); 250 250 } -
trunk/oscam-net.c
r8960 r9047 298 298 setsockopt(sock, SOL_TCP, TCP_USER_TIMEOUT, (char *) &timeout, sizeof(timeout)); 299 299 #endif 300 } 301 302 int set_nonblock(int32_t fd, bool nonblock) 303 { 304 int32_t flags = fcntl(fd, F_GETFL); 305 if (flags == -1) 306 return -1; 307 if (nonblock) 308 flags |= O_NONBLOCK; 309 else 310 flags &= (~O_NONBLOCK); 311 return fcntl(fd, F_SETFL, flags); 300 312 } 301 313 -
trunk/oscam-net.h
r8365 r9047 36 36 int set_socket_priority(int fd, int priority); 37 37 void setTCPTimeouts(int32_t sock); 38 int set_nonblock(int32_t fd, bool nonblock); 38 39 int8_t check_fd_for_data(int32_t fd); 39 40 int32_t recv_from_udpipe(uchar *); -
trunk/oscam-reader.c
r9008 r9047 785 785 } 786 786 787 int32_t fl = fcntl(client->udp_fd, F_GETFL); 788 fcntl(client->udp_fd, F_SETFL, O_NONBLOCK); 787 set_nonblock(client->udp_fd, true); 789 788 790 789 int32_t res = connect(client->udp_fd, (struct sockaddr *)&client->udp_sa, client->udp_sa_len); … … 821 820 } 822 821 823 fcntl(client->udp_fd, F_SETFL, fl); //restore blocking mode822 set_nonblock(client->udp_fd, false); //restore blocking mode 824 823 825 824 setTCPTimeouts(client->udp_fd);
Note:
See TracChangeset
for help on using the changeset viewer.