Bug in wiced_network_common.c:wiced_network_up_default ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

wiced_network_up_default(...) starts with the following lines:

    /* Read config */

    wiced_dct_read_lock( (void**) &dct_network_config, WICED_TRUE, DCT_NETWORK_CONFIG_SECTION, 0, sizeof(platform_dct_network_config_t) );

    *interface = dct_network_config->interface;

    wiced_dct_read_unlock( dct_network_config, WICED_FALSE );

The doc for wiced_dct_read_lock and wiced_dct_read_unlock states that the value of ptr_is_writable should match across these two calls. And they don't. Unlock thus does not free the memory allocated by lock.

(When EXTERNAL_DCT is set, the  ptr_is_writable is ignored. But this is not always the case)

0 Likes
1 Reply
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

I think you are right, it's a bug that needs fix.

But when I look at the code the wiced_network_up_default() naming really

makes me confused. What is the *default* meaning?

And what is the *default* meaning in wiced_get_default_ready_interface().

IMHO, use wiced_network_up()/wiced_network_is_up() APIs are enough.

0 Likes