I have fixed it in str_to_ip as:
int str_to_ip( const char* arg, wiced_ip_address_t* address )
uint32_t* addr = &address->ip.v4;
uint8_t num = 0;
int error = 0;
*addr = 0;
uint32_t tmp_val = 0;
*addr = *addr << 8;
// string_to_unsigned( ++arg, 3, &tmp_val, 0 ); // CML Problem is here
if (string_to_unsigned( ++arg, 3, &tmp_val, 0 ) == 0) // CML change
error = -1; // CML if bad conversion, set error return state
*addr += (uint32_t) tmp_val;
while ( ( *arg != '\x00' ) && ( *arg != '.' ) )
} while ( ( num < 4 ) && ( *arg != '\x00' ) );
if ( num == 4 )
address->version = WICED_IPV4;
return error; //CML was "return 0"
return error; // CML was "return -1"
I am not sure how to get this in the production code but easy test is to use the "snip.email..." test application and set "account.smpt_server = "smtp.mail.yahoo.com". Most of the constructs were in place, it is just that if the function try to convert random letters it fails, but the failure is not checked in the above routine.
I believe that is what I saw. I hope this is fixed in the latest code. 3.5.2
The sdk-3.5.2 includes the fix already (with slightly different code).
I just tested on sdk-3.5.2 and the DNS lookup for both smtp.mail.yahoo.com
and www.dailymail.co.uk looks good.