more on mods.

FossilOrigin-Name: 92539795329743de76ef8a9a362dccad314b19682f4045ace4a10c432f6f1425
This commit is contained in:
7u83@mail.ru
2016-03-05 21:32:52 +00:00
parent dc5dd3e0e4
commit 0919d85456
8 changed files with 93 additions and 33 deletions

View File

@ -5,6 +5,11 @@
"wtp_name":"WFAT-004A9902FAC0",
"wtp_software_version":"11591,0.1",
"radios":{
"0":{
"radio_type":"1"
},
"1":{
"radio_type":"2"
}
}
}

View File

@ -4,6 +4,7 @@
#include "cw/log.h"
#include "wtp_interface.h"
#include "cfg.h"
int configure()
{
@ -22,6 +23,8 @@ int configure()
"Error sending Configuration Status Request to AC at %s: %d - %s.",
sock_addr2str(&conn->addr), errno, cw_strerror(rc));
}
cfg_to_json();
return 0;
}

View File

@ -75,32 +75,22 @@ int main()
cw_dbg_opt_display = DBG_DISP_ASC_DMP | DBG_DISP_COLORS;
/*
mbag_t b = mbag_create();
mbag_set_byte(b,1,99);
mbag_set_avltree(b,2,mbag_create());
mavl_destroy(b);
*/
dtls_init();
the_conn = conn_create_noq(-1, NULL);
struct conn *conn = the_conn;
conn->radios = mbag_i_create();
// mbag_set_mbag(conn->radios,0,mbag_create());
// mbag_set_mbag(conn->radios,1,mbag_create());
mbag_i_set_mbag(conn->radios,0,mbag_create());
mbag_i_set_mbag(conn->radios,1,mbag_create());
// mbag_set_mbag(conn->radios,0xff,mbag_create());
// mbag_t r;
// r = mbag_get_mbag(conn->radios,0,NULL);
// mbag_set_dword(r,CW_RADIO_TYPE,1);
// r = mbag_get_mbag(conn->radios,1,NULL);
// mbag_set_dword(r,CW_RADIO_TYPE,2);
mbag_t r;
r = mbag_i_get_mbag(conn->radios,0,NULL);
mbag_set_dword(r,CW_RADIO_TYPE,1);
r = mbag_i_get_mbag(conn->radios,1,NULL);
mbag_set_dword(r,CW_RADIO_TYPE,2);
// r = mbag_get_mbag(conn->radios,1,NULL);
// mbag_set_dword(r,CW_RADIO_TYPE,1);
@ -114,7 +104,6 @@ mavl_destroy(b);
exit(0);
}
conn->detected = 1;
mod->register_actions(&capwap_actions);