mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 18:36:30 +03:00
Make cb_set_config() safe
This commit is contained in:
@@ -233,13 +233,8 @@ unsafe fn cb_precheck_imf(
|
||||
return rfc724_mid_exists;
|
||||
}
|
||||
|
||||
unsafe fn cb_set_config(context: &Context, key: *const libc::c_char, value: *const libc::c_char) {
|
||||
let v = if value.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(as_str(value))
|
||||
};
|
||||
context.sql.set_config(context, as_str(key), v).ok();
|
||||
fn cb_set_config(context: &Context, key: &str, value: Option<&str>) {
|
||||
context.sql.set_config(context, key, value).ok();
|
||||
}
|
||||
|
||||
/* *
|
||||
|
||||
Reference in New Issue
Block a user