[settings] remove freerdp_settings_take_string
this function is problematic as it allows mixing allocators.
This commit is contained in:
parent
ecc21a2cfc
commit
a9a879c59f
@ -2083,17 +2083,6 @@ extern "C"
|
||||
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings* settings, size_t id,
|
||||
const char* param);
|
||||
|
||||
/** \brief Takes a string settings value. The \b param is assumed to be malloced (same runtime
|
||||
* as freerdp library!).
|
||||
*
|
||||
* \param settings A pointer to the settings to query, must not be NULL.
|
||||
* \param id The key to query
|
||||
* \param param The value to set. Old values are freed up, the value is set as the new one.
|
||||
*
|
||||
* \return \b TRUE for success, \b FALSE for failure
|
||||
*/
|
||||
FREERDP_API BOOL freerdp_settings_take_string(rdpSettings* settings, size_t id, char* param);
|
||||
|
||||
/** \brief Sets a string settings value. The \b param is converted to UTF-8 and the copy stored.
|
||||
*
|
||||
* \param settings A pointer to the settings to query, must not be NULL.
|
||||
|
@ -2040,14 +2040,6 @@ const char* freerdp_rdp_version_string(UINT32 version)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL freerdp_settings_take_string(rdpSettings* settings, size_t id, char* param)
|
||||
{
|
||||
size_t len = 0;
|
||||
if (param)
|
||||
len = strlen(param);
|
||||
return freerdp_settings_set_string_(settings, id, param, len);
|
||||
}
|
||||
|
||||
BOOL freerdp_settings_set_string_from_utf16(rdpSettings* settings, size_t id, const WCHAR* param)
|
||||
{
|
||||
WINPR_ASSERT(settings);
|
||||
|
Loading…
Reference in New Issue
Block a user