Skip to content

Commit e2e0b20

Browse files
committed
iot-vsocket: Fix return type of NetworkSend_t and NetworkRecv_t
Update the return type of function pointers NetworkSend_t and NetworkRecv_t to match function pointer definition in Mbed TLS. Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent 685c89b commit e2e0b20

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Middleware/ARM/IoT_VSocket-lib/transport_tls_iot_socket.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include "logging_stack.h"
2323

2424

25-
static int32_t Recv_Cb( void * pvCallerContext,
25+
static int Recv_Cb( void * pvCallerContext,
2626
unsigned char * pucReceiveBuffer,
2727
size_t xReceiveLength );
28-
static int32_t Send_Cb( void * pvCallerContext,
28+
static int Send_Cb( void * pvCallerContext,
2929
const unsigned char * pucData,
3030
size_t xDataLength );
3131

@@ -198,11 +198,11 @@ int32_t Transport_Send( NetworkContext_t * pNetworkContext,
198198
*
199199
* @return The number of bytes actually read or appropirate error code.
200200
*/
201-
static int32_t Recv_Cb( void * pvCallerContext,
201+
static int Recv_Cb( void * pvCallerContext,
202202
unsigned char * pucReceiveBuffer,
203203
size_t xReceiveLength )
204204
{
205-
int32_t rc;
205+
int rc;
206206
NetworkContext_t * pNetworkContext = ( NetworkContext_t * ) ( pvCallerContext );
207207

208208
if( ( pNetworkContext == NULL ) || ( pucReceiveBuffer == NULL ) )
@@ -235,12 +235,12 @@ static int32_t Recv_Cb( void * pvCallerContext,
235235
*
236236
* @return The number of bytes actually sent.
237237
*/
238-
static int32_t Send_Cb( void * pvCallerContext,
238+
static int Send_Cb( void * pvCallerContext,
239239
const unsigned char * pucData,
240240
size_t xDataLength )
241241
{
242242
NetworkContext_t * pNetworkContext = ( NetworkContext_t * ) ( pvCallerContext );
243-
int32_t rc;
243+
int rc;
244244

245245
if( ( pNetworkContext == NULL ) || ( pucData == NULL ) )
246246
{

Middleware/ARM/mbedtls-lib/src/tls_helper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ typedef struct TLSContext
6262
*
6363
* @return The number of bytes actually read.
6464
*/
65-
typedef int32_t ( * NetworkRecv_t )( void * pvCallerContext,
65+
typedef int ( * NetworkRecv_t )( void * pvCallerContext,
6666
unsigned char * pucReceiveBuffer,
6767
size_t xReceiveLength );
6868

@@ -75,7 +75,7 @@ typedef int32_t ( * NetworkRecv_t )( void * pvCallerContext,
7575
*
7676
* @return The number of bytes actually sent.
7777
*/
78-
typedef int32_t ( * NetworkSend_t )( void * pvCallerContext,
78+
typedef int ( * NetworkSend_t )( void * pvCallerContext,
7979
const unsigned char * pucData,
8080
size_t xDataLength );
8181

0 commit comments

Comments
 (0)