wpa_supplicant/hidl/sprd_1.2/sta_network.cpp
/**
 * Helper function to set value in a string field in |wpa_ssid| structue
 * instance for this network.
 * This function frees any existing data in these fields.
 */
Helper function to set value in a string field in |wpa_ssid| structue
instance for this network.
This function frees any existing data in these fields.
Helper function to set value in a string field in |wpa_ssid| structue instance for this network . This function frees any existing data in these fields .
int StaNetwork::setStringFieldAndResetState(
    const char *value, char **to_update_field, const char *hexdump_prefix)
{
	int value_len = strlen(value);
	if (*to_update_field) {
		os_free(*to_update_field);
	}
	*to_update_field = dup_binstr(value, value_len);
	if (!(*to_update_field)) {
		return 1;
	}
	wpa_hexdump_ascii(
	    MSG_MSGDUMP, hexdump_prefix, *to_update_field, value_len);
	resetInternalStateAfterParamsUpdate();
	return 0;
}
int StaNetwork :: setStringFieldAndResetState ( const char * value , char * * to_update_field , const char * hexdump_prefix ) { int value_len = strlen ( value ) ; if ( * to_update_field ) { os_free ( * to_update_field ) ; } * to_update_field = dup_binstr ( value , value_len ) ; if ( ! ( * to_update_field ) ) { return 1 ; } wpa_hexdump_ascii ( MSG_MSGDUMP , hexdump_prefix , * to_update_field , value_len ) ; resetInternalStateAfterParamsUpdate ( ) ; return 0 ; }
Helper function to set value in a string field in |wpa_ssid| structue
 instance for this network.
Helper function to set value in a string field in |wpa_ssid| structue instance for this network .