@@ -71,8 +71,6 @@ pub(crate) enum SocketDomain {
7171/// The type of socket (Stream, Datagram, or neither)
7272#[ derive( Debug , Copy , Clone , PartialEq , Eq ) ]
7373pub ( crate ) enum SocketType {
74- /// Used with `SocketDomain::Lte`
75- None ,
7674 /// Used with `SocketDomain::Inet` for TCP and TLS streams
7775 Stream ,
7876 /// Used with UDP sockets, and for GPS
@@ -323,7 +321,6 @@ impl Into<i32> for SocketType {
323321 fn into ( self ) -> i32 {
324322 use SocketType :: * ;
325323 match self {
326- None => 0 ,
327324 Stream => sys:: NRF_SOCK_STREAM as i32 ,
328325 Datagram => sys:: NRF_SOCK_DGRAM as i32 ,
329326 }
@@ -434,14 +431,14 @@ pub fn poll(poll_list: &mut [PollEntry], timeout_ms: u16) -> Result<i32, Error>
434431 }
435432
436433 let mut poll_fds: [ sys:: nrf_pollfd ; MAX_SOCKETS_POLL ] = [ sys:: nrf_pollfd {
437- handle : 0 ,
438- requested : 0 ,
439- returned : 0 ,
434+ fd : 0 ,
435+ events : 0 ,
436+ revents : 0 ,
440437 } ; MAX_SOCKETS_POLL ] ;
441438
442439 for ( poll_entry, pollfd) in poll_list. iter_mut ( ) . zip ( poll_fds. iter_mut ( ) ) {
443- pollfd. handle = poll_entry. socket . get_fd ( ) ;
444- pollfd. requested = poll_entry. flags as i16 ;
440+ pollfd. fd = poll_entry. socket . get_fd ( ) ;
441+ pollfd. events = poll_entry. flags as i16 ;
445442 count += 1 ;
446443 }
447444
@@ -452,7 +449,7 @@ pub fn poll(poll_list: &mut [PollEntry], timeout_ms: u16) -> Result<i32, Error>
452449 0 => Ok ( 0 ) ,
453450 n => {
454451 for ( poll_entry, pollfd) in poll_list. iter_mut ( ) . zip ( poll_fds. iter ( ) ) {
455- poll_entry. result = PollResult ( pollfd. returned as u32 ) ;
452+ poll_entry. result = PollResult ( pollfd. revents as u32 ) ;
456453 }
457454 Ok ( n)
458455 }
0 commit comments