]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7352: Document how to use switch_core_set_variable to delete variables
authorManav Rathi <mx4492@gmail.com>
Fri, 6 Mar 2015 03:34:10 +0000 (09:04 +0530)
committerManav Rathi <mx4492@gmail.com>
Sat, 7 Mar 2015 01:29:06 +0000 (06:59 +0530)
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.

src/include/switch_core.h

index 89916b2a55129ccd5cb3eac37520f6b3df8d795e..e783dbd76785b4f8b1c7b1fb2682426a74bca0cc 100644 (file)
@@ -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);