problems opening a socket on PPP on LP3500

Hi all… I’ve vritten these code:

if ( 0L == inet_addr(config->srvip)) {
printf( "ApriSocket: Errore di conversone della stringa di indirizzo: %s
", config->srvip);
return 0;
}
//if ( tcp_open( socket, 0, inet_addr(config->srvip), (word ) config->portasrv, NULL) == 0L ) {
for ( ntent = 1 ; ntent < 4 ; ntent++ ) {
printf( "ApriSocket: tentativo di connessione %d/3 su: ", ntent);
if ( statomodem == PPPCONNG ) {
printf( "GPRS
");
if ( tcp_extopen( socket, IF_PPP2, 0, inet_addr(config->srvip),
(word ) config->portasrv, NULL, socketbuff, 4096 ) == 0 ) {
printf( "ApriSocket: non sono riuscito a connettermi: %d%s!
", sock_error( socket, 0), sockerr( socket));
return 0;
}
} else {
printf( "SAT
");
if ( tcp_extopen( socket, IF_PPP1, 0, inet_addr(config->srvip),
(word ) config->portasrv, NULL, socketbuff, 4096 ) == 0 ) {
printf( "ApriSocket: non sono riuscito a connettermi!: %d%s!
", sock_error( socket, 0), sockerr( socket));
return 0;
}
}

and when it executes:

tcp_extopen( socket, IF_PPP2, 0, inet_addr(config->srvip),
(word ) config->portasrv, NULL, socketbuff, 4096 )

the board freeze and totally block.

On same hardware the result is different!!! Why???

The difference is between a wavecom wismo modem that works fine and a ercon & gener modem Genpro20e SQB

There’s a buffer overflow into the tcp maintenance???