Misc ...
FossilOrigin-Name: 968d10c26f0cd7ba32e00b75d6af37d689aade5c2098caa9e2113bc3df285fb1
This commit is contained in:
@ -20,14 +20,15 @@ ifndef ARCH
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS += -O0 -Wall -g
|
||||
#CFLAGS += -Os -Wall
|
||||
LDFLAGS += -L../../src/capwap/$(ARCH)
|
||||
#CFLAGS += -O0 -Wall -g
|
||||
CFLAGS += -Os -Wall
|
||||
LDFLAGS += -L../contrib/jsmn -L../../src/capwap/$(ARCH)
|
||||
|
||||
|
||||
LIBS+=-lcapwap
|
||||
LIBS+=-lnl-3
|
||||
LIBS+=-lnl-genl-3
|
||||
LIBS+=-ljsmn
|
||||
|
||||
CONFOBJS = wtp_conf.o
|
||||
|
||||
@ -71,7 +72,7 @@ CFLAGS += $(HA_INCS)
|
||||
|
||||
#CFLAGS += -I../src
|
||||
#CFLAGS += -I../src/utils
|
||||
CFLAGS += -I../../src -I /usr/local/include
|
||||
CFLAGS += -I../../src -I /usr/local/include -I ../contrib/jsmn
|
||||
|
||||
#CFLAGS += -I/usr/local/include
|
||||
|
||||
@ -80,6 +81,7 @@ CFLAGS += -I../../src -I /usr/local/include
|
||||
|
||||
OBJS += wtp_main.o
|
||||
OBJS += image_update.o
|
||||
OBJS += cfg.o
|
||||
|
||||
|
||||
#OBJS += wtp_conf.o
|
||||
|
@ -166,17 +166,13 @@ int run_join(struct conn * conn)
|
||||
|
||||
int rc = cw_send_request(conn,CW_MSG_JOIN_REQUEST);
|
||||
|
||||
if (rc >=0 ) {
|
||||
cw_dbg(DBG_ELEM,"Join Result: %d - %s",rc,cw_strresult(rc));
|
||||
|
||||
}
|
||||
if (rc != 0 && rc != 2) {
|
||||
cw_log(LOG_ERR,"Can't Join AC at %s, AC returned code: %d - %s.",
|
||||
sock_addr2str(&conn->addr),
|
||||
rc,cw_strresult(rc));
|
||||
if (!cw_rcok(rc) ) {
|
||||
cw_log(LOG_ERR,"Can't Join AC at %s: %d - %s.",
|
||||
sock_addr2str(&conn->addr),rc,cw_strerror(rc));
|
||||
return 0;
|
||||
}
|
||||
|
||||
cw_dbg(DBG_ELEM,"Join Result: %d - %s",rc,cw_strresult(rc));
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -196,7 +192,7 @@ int join()
|
||||
avliter_foreach(&ii){
|
||||
cw_acip_t * ip = avliter_get(&ii);
|
||||
|
||||
cw_dbg(DBG_ELEM,"Going to join CAWAP controller on %s",sock_addr2str(&ip->ip));
|
||||
cw_dbg(DBG_INFO,"Going to join CAWAP controller on %s",sock_addr2str(&ip->ip));
|
||||
|
||||
int rc = run_join_d((struct sockaddr*)&ip->ip);
|
||||
if (!rc)
|
||||
|
@ -9,6 +9,7 @@ extern int sulking_state();
|
||||
extern int join();
|
||||
extern int discovery();
|
||||
extern int image_update();
|
||||
extern int setup_conf(struct conn * conn);
|
||||
|
||||
|
||||
struct conn * get_conn();
|
||||
|
@ -15,6 +15,13 @@
|
||||
|
||||
#include "capwap/dbg.h"
|
||||
|
||||
#include "jsmn.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** The one and only connection object */
|
||||
@ -23,6 +30,9 @@ struct cw_actiondef capwap_actions;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
@ -55,6 +65,10 @@ int main()
|
||||
conn->incomming = cw_itemstore_create();
|
||||
conn->local = cw_itemstore_create();
|
||||
|
||||
|
||||
// setup_conf(conn);
|
||||
|
||||
|
||||
cw_itemstore_t board_data = cw_itemstore_create();
|
||||
cw_itemstore_set_dword(board_data, CW_ITEM_WTP_BOARD_VENDOR, conf_vendor_id);
|
||||
|
||||
@ -65,6 +79,7 @@ int main()
|
||||
bstr_data(conf_serial_no), bstr_len(conf_serial_no));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cw_itemstore_set_avltree(conn->outgoing, CW_ITEM_WTP_BOARD_DATA, board_data);
|
||||
|
Reference in New Issue
Block a user