|
|
|
|
@ -478,7 +478,7 @@ static EfErrCode del_env(const char *key) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set an ENV.
|
|
|
|
|
* Set an ENV.If it value is NULL, delete it.
|
|
|
|
|
* If not find it in ENV table, then create it.
|
|
|
|
|
*
|
|
|
|
|
* @param key ENV name
|
|
|
|
|
@ -498,6 +498,10 @@ EfErrCode ef_set_env(const char *key, const char *value) {
|
|
|
|
|
/* lock the ENV cache */
|
|
|
|
|
ef_port_env_lock();
|
|
|
|
|
|
|
|
|
|
/* if ENV value is NULL, delete it */
|
|
|
|
|
if (value == NULL) {
|
|
|
|
|
result = del_env(key);
|
|
|
|
|
} else {
|
|
|
|
|
old_env = find_env(key);
|
|
|
|
|
/* If find this ENV, then compare the new value and old value. */
|
|
|
|
|
if (old_env) {
|
|
|
|
|
@ -514,6 +518,8 @@ EfErrCode ef_set_env(const char *key, const char *value) {
|
|
|
|
|
} else {
|
|
|
|
|
result = create_env(key, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* unlock the ENV cache */
|
|
|
|
|
ef_port_env_unlock();
|
|
|
|
|
|
|
|
|
|
|