Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

RTOS/CC3100: Not able to receive bigger file in http GET response

$
0
0

Part Number:CC3100

Tool/software:TI-RTOS

Hi,

HARDWARE: Linux based processor, CC3100 module for wifi communication.

SDK: version 1.0.2

When I try to get a smaller size file (<1kb) from http server I get it correctly,

but when I try to download around 2kb sized file, It ends up with the error, "can not allocate memory",

I have looked into the SDK in http_client code., in functionreadResponse(HTTpCli_Handler) there is a false check of memory allocation...

if(len > sizeof(g_buff))
{
dataBuffer = (_i8 *) malloc(len);
if(dataBuffer)
{
CLI_Write(" Failed to allocate memory\n\r");
retVal = -1;
goto end;
}
}
else
{
dataBuffer = (_i8 *)g_buff;
}

Why "if(dataBuffer)" this condition has kept instead of if(dataBuffer==NULL) condition?

I have tried to do the malloc successfully but then i get spi read error.

How to read larger files in http GET request?

Thanks,

Drashti


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>