From: Manav Rathi Date: Fri, 6 Mar 2015 03:34:10 +0000 (+0530) Subject: FS-7352: Document how to use switch_core_set_variable to delete variables X-Git-Tag: v1.4.18~1^2~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=830bc28c45091990ad7f53e3fdea2f1166b5901d;p=thirdparty%2Ffreeswitch.git FS-7352: Document how to use switch_core_set_variable to delete variables I had to scan through the source of the function to verify that this is the indeed the actual behaviour, and that NULL is a valid argument. By mentioning this in the header, we save posterity that effort. --- diff --git a/src/include/switch_core.h b/src/include/switch_core.h index 89916b2a55..e783dbd767 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -914,6 +914,7 @@ SWITCH_DECLARE(char *) switch_core_get_domain(switch_bool_t dup); \brief Add a global variable to the core \param varname the name of the variable \param value the value of the variable + \ If \p value is NULL, then \p varname is deleted. */ SWITCH_DECLARE(void) switch_core_set_variable(_In_z_ const char *varname, _In_opt_z_ const char *value); SWITCH_DECLARE(switch_status_t) switch_core_get_variables(switch_event_t **event);