@@ -358,7 +358,7 @@ impl SctpSocket {
358358
359359 /// Send data in Sctp style, to the provided address (may be `None` if the socket is connected), on the stream `stream`, with the TTL `ttl`.
360360 /// On success, returns the quantity on bytes sent
361- pub fn sendmsg < A : ToSocketAddrs > ( & self , msg : & [ u8 ] , address : Option < A > , ppid : u64 , stream : u16 , ttl : libc:: c_ulong ) -> Result < usize > {
361+ pub fn sendmsg < A : ToSocketAddrs > ( & self , msg : & [ u8 ] , address : Option < A > , ppid : u32 , stream : u16 , ttl : libc:: c_ulong ) -> Result < usize > {
362362 let len = msg. len ( ) as libc:: size_t ;
363363 let ( raw_addr, addr_len) = match address {
364364 Some ( a) => {
@@ -367,8 +367,9 @@ impl SctpSocket {
367367 } ,
368368 None => ( std:: ptr:: null_mut ( ) , 0 )
369369 } ;
370+ let ppid = ppid. to_be ( ) ;
370371 unsafe {
371- return match sctp_sys:: sctp_sendmsg ( self . 0 , msg. as_ptr ( ) as * const libc:: c_void , len, raw_addr, addr_len, ppid, 0 , stream, ttl, 0 ) {
372+ return match sctp_sys:: sctp_sendmsg ( self . 0 , msg. as_ptr ( ) as * const libc:: c_void , len, raw_addr, addr_len, ppid as libc :: c_ulong , 0 , stream, ttl, 0 ) {
372373 res if res > 0 => Ok ( res as usize ) ,
373374 _ => Err ( Error :: last_os_error ( ) )
374375 } ;
0 commit comments