Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed May 22, 2024
1 parent 704557e commit 2f512f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion source/FreeRTOS_Sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -3894,7 +3894,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket )
if( pxClientSocket != NULL )
{
FreeRTOS_printf( ( "prvAcceptWaitClient: client %p parent %p\n",
pxClientSocket, pxParentSocket ) );
( void * ) pxClientSocket, ( void * ) pxParentSocket ) );
}
}
else
Expand Down
13 changes: 7 additions & 6 deletions source/FreeRTOS_TCP_IP.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
}
/*-----------------------------------------------------------*/

BaseType_t vTCPRemoveTCPChild( const FreeRTOS_Socket_t * pxChildSocket )
static BaseType_t vTCPRemoveTCPChild( const FreeRTOS_Socket_t * pxChildSocket )
{
BaseType_t xReturn = pdFALSE;
const ListItem_t * pxEnd = ( ( const ListItem_t * ) &( xBoundTCPSocketsList.xListEnd ) );
Expand Down Expand Up @@ -404,7 +404,6 @@

/* Don't need to access the parent socket anymore, so the
* reference 'pxPeerSocket' may be cleared. */
// pxSocket->u.xTCP.pxPeerSocket = NULL;
pxSocket->u.xTCP.bits.bPassQueued = pdFALSE_UNSIGNED;

/* When true, this socket may be returned in a call to accept(). */
Expand Down Expand Up @@ -482,6 +481,7 @@
( xParent->u.xTCP.pxPeerSocket == pxSocket ) )
{
xMustClear = pdTRUE;
( void ) xMustClear;
}
}
/* Socket goes to status eCLOSED because of a RST.
Expand All @@ -491,10 +491,10 @@
pxSocket->u.xTCP.bits.bPassAccept,
pxSocket->u.xTCP.bits.bReuseSocket ) );
FreeRTOS_printf( ( "vTCPStateChange: me %p parent %p peer %p clear %d\n",
pxSocket,
xParent,
xParent ? xParent->u.xTCP.pxPeerSocket : NULL,
xMustClear ) );
( void * ) pxSocket,
( void * ) xParent,
xParent ? ( void * ) xParent->u.xTCP.pxPeerSocket : NULL,
( int ) xMustClear ) );

vTaskSuspendAll();
{
Expand All @@ -504,6 +504,7 @@
if( pxSocket->u.xTCP.bits.bReuseSocket == pdFALSE_UNSIGNED )
{
xHasCleared = vTCPRemoveTCPChild( pxSocket );
( void ) xHasCleared;

pxSocket->u.xTCP.bits.bPassQueued = pdFALSE_UNSIGNED;
pxSocket->u.xTCP.bits.bPassAccept = pdFALSE_UNSIGNED;
Expand Down
6 changes: 3 additions & 3 deletions source/FreeRTOS_TCP_State_Handling.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,9 +1030,9 @@
pxSocket->u.xTCP.usChildCount,
pxSocket->u.xTCP.usBacklog,
( pxSocket->u.xTCP.usChildCount == 1U ) ? "" : "ren",
pxNewSocket,
pxSocket,
pxSocket ? pxSocket->u.xTCP.pxPeerSocket : NULL ) );
( void * ) pxNewSocket,
( void * ) pxSocket,
pxSocket ? ( void * ) pxSocket->u.xTCP.pxPeerSocket : NULL ) );

/* Now bind the child socket to the same port as the listening socket. */
if( vSocketBind( pxNewSocket, &xAddress, sizeof( xAddress ), pdTRUE ) != 0 )
Expand Down

0 comments on commit 2f512f2

Please sign in to comment.