Some work on wtp and ktv config files
FossilOrigin-Name: 3747732055809fd587f96cff65c389a0878a09a197947c1e68a76f605bdb44a0
This commit is contained in:
@ -97,7 +97,7 @@ extern struct cw_Mod * cw_get_mod_ac (const char *name);
|
||||
|
||||
extern void test_sets();
|
||||
#include "cw/file.h"
|
||||
#include "cw/kvt.h"
|
||||
#include "cw/ktv.h"
|
||||
|
||||
|
||||
struct mykv {
|
||||
@ -153,6 +153,36 @@ int stcmp (const void * sa1, const void *sa2)
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
mlist_t list;
|
||||
mlistelem_t * elem;
|
||||
|
||||
list = mlist_create_conststr();
|
||||
|
||||
|
||||
mlist_append_ptr(list, "helo");
|
||||
mlist_append_ptr(list, "tobias");
|
||||
mlist_append_ptr(list, "nase");
|
||||
|
||||
|
||||
mlist_foreach(elem,list){
|
||||
// data = mlistelem_dataptr(elem);
|
||||
// char * str = ((char**)data)[0];
|
||||
// printf("%p %p\n",data,str);
|
||||
printf("String: %s\n", mlistelem_get_str(elem));
|
||||
}
|
||||
|
||||
mlist_destroy(list);
|
||||
|
||||
mlist_foreach(elem,list){
|
||||
// data = mlistelem_dataptr(elem);
|
||||
// char * str = ((char**)data)[0];
|
||||
// printf("%p %p\n",data,str);
|
||||
printf("String: %s\n", mlistelem_get_str(elem));
|
||||
}
|
||||
|
||||
//exit(0);
|
||||
|
||||
|
||||
/* mavl_t tree;
|
||||
int i;
|
||||
mavliter_t it;
|
||||
|
@ -573,7 +573,7 @@ static int conf_read_mods(cfg_t *cfg){
|
||||
conf_mods = malloc(sizeof(struct cw_Mod *)*(n+1));
|
||||
|
||||
cw_dbg(DBG_INFO,"Mods directory: %s",conf_mods_dir);
|
||||
cw_mod_set_mod_path(conf_mods_dir);
|
||||
cw_mod_set_path(conf_mods_dir);
|
||||
|
||||
for (i=0; i < n; i++){
|
||||
char *modname = cfg_getnstr(cfg, CFG_ENTRY_MODS, i);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "socklist.h"
|
||||
#include "wtpman.h"
|
||||
#include "wtplist.h"
|
||||
#include "cw/kvt.h"
|
||||
#include "cw/ktv.h"
|
||||
|
||||
static void reset_echointerval_timer(struct wtpman *wtpman)
|
||||
{
|
||||
@ -97,7 +97,7 @@ static void wtpman_run_discovery(void *arg)
|
||||
/* wtpman->conn->outgoing = mbag_create();
|
||||
wtpman->conn->incomming = mbag_create();
|
||||
*/
|
||||
wtpman->conn->remote_cfg = cw_kvt_create(); //mavl_cmp_kv,NULL,1312);
|
||||
wtpman->conn->remote_cfg = cw_ktv_create(); //mavl_cmp_kv,NULL,1312);
|
||||
|
||||
while (!cw_timer_timeout(timer)
|
||||
&& wtpman->conn->capwap_state == CAPWAP_STATE_DISCOVERY) {
|
||||
|
Reference in New Issue
Block a user