MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / unset_env

Function unset_env

modules/exec/exec_hf.c:383–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383void unset_env(environment_t *backup_env)
384{
385 char **cur_env, **cur_env0;
386 int i;
387
388 /* switch-over to backup environment */
389 cur_env0=cur_env=environ;
390 environ=backup_env->env;
391 i=0;
392 /* release environment */
393 while(*cur_env) {
394 /* leave previously existing vars alone */
395 if (i>=backup_env->old_cnt) {
396 pkg_free(*cur_env);
397 }
398 cur_env++;
399 i++;
400 }
401 pkg_free(cur_env0);
402 pkg_free(backup_env);
403}
404
405static int append_var(char *name, char *value, int len, struct hf_wrapper **list)
406{

Callers 2

w_execFunction · 0.85
w_async_execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected