Permalink
Browse files

more work

  • Loading branch information...
gafferongames committed Oct 21, 2017
1 parent d33a6d2 commit b5b2dd38a7177928dea2a9831d14c151a66e25f7
Showing with 11 additions and 6 deletions.
  1. +11 −6 netcode.c
View
@@ -355,6 +355,13 @@ int netcode_address_equal( struct netcode_address_t * a, struct netcode_address_
if ( a->type != b->type )
return 0;
#if NETCODE_NETWORK_NEXT
if ( a->type == NETCODE_ADDRESS_NEXT )
{
return a->data.flow_id == b->data.flow_id;
}
#endif // #if NETCODE_NETWORK_NEXT
if ( a->port != b->port )
return 0;
@@ -376,12 +383,6 @@ int netcode_address_equal( struct netcode_address_t * a, struct netcode_address_
return 0;
}
}
#if NETCODE_NETWORK_NEXT
else if ( a->type == NETCODE_ADDRESS_NEXT )
{
return a->data.flow_id == b->data.flow_id;
}
#endif // #if NETCODE_NETWORK_NEXT
else
{
return 0;
@@ -1571,6 +1572,7 @@ void * netcode_read_packet( uint8_t * buffer,
netcode_assert( sequence );
netcode_assert( allowed_packets );
// todo: is this still necessary? probably not.
if ( allocate_function == NULL )
{
allocate_function = netcode_default_allocate_function;
@@ -1579,7 +1581,10 @@ void * netcode_read_packet( uint8_t * buffer,
*sequence = 0;
if ( buffer_length < 1 )
{
netcode_printf( NETCODE_LOG_LEVEL_DEBUG, "ignored packet. buffer length is less than 1\n" );
return NULL;
}
uint8_t * start = buffer;

0 comments on commit b5b2dd3

Please sign in to comment.