Revert "* Added valgrind memory leak tests in testmem.sh for restconf"

String error
This reverts commit 6e63f0a77b.
This commit is contained in:
Olof hagsand 2019-02-20 16:19:07 +01:00
parent 5b6bdbfd3a
commit a73d2bd242
29 changed files with 131 additions and 193 deletions

View file

@ -32,12 +32,7 @@
***** END LICENSE BLOCK *****
*
* This file contains access functions for two types of clixon vars:
* - options, ie string based variables from Clixon configuration files.
* Accessed with clicon_options(h).
* - data. Free-typed values for runtime getting and setting.
* Accessed with clicon_data(h).
* Consider splitting?
* CLICON options
*/
#ifdef HAVE_CONFIG_H
#include "clixon_config.h" /* generated by config & autoconf */
@ -364,8 +359,6 @@ clicon_option_str(clicon_handle h,
* @param[in] h clicon_handle
* @param[in] name option name
* @param[in] val option value, must be null-terminated string
* @retval 0 OK
* @retval -1 Error
*/
int
clicon_option_str_set(clicon_handle h,
@ -751,7 +744,7 @@ clicon_conf_xml(clicon_handle h)
return NULL;
}
/*! Set YANG specification for Clixon system options and features
/*! Set YANG specification for Clixon system options and features
* ys must be a malloced pointer
*/
int
@ -890,35 +883,3 @@ clicon_username_set(clicon_handle h,
}
/*! Get socket fd (ie backend server socket / restconf fcgx socket)
* @param[in] h Clicon handle
* @retval -1 No open socket
* @retval s Socket
*/
int
clicon_socket_get(clicon_handle h)
{
clicon_hash_t *cdat = clicon_data(h);
void *p;
if ((p = hash_value(cdat, "socket", NULL)) == NULL)
return -1;
return *(int*)p;
}
/*! Set socket fd (ie backend server socket / restconf fcgx socket)
* @param[in] h Clicon handle
* @param[in] s Open socket (or -1 to close)
* @retval 0 OK
* @retval -1 Error
*/
int
clicon_socket_set(clicon_handle h,
int s)
{
clicon_hash_t *cdat = clicon_data(h);
if (s == -1)
return hash_del(cdat, "socket");
return hash_add(cdat, "socket", &s, sizeof(int))==NULL?-1:0;
}