Work on join
FossilOrigin-Name: 5e55d9a27f8f7cce95c16618e1f7bf9b8c9c4a60c28346ec2d3ef2638de33e9b
This commit is contained in:
parent
d2fe42e686
commit
e14d8d36b0
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CodeLite_Workspace Name="actube" Database="">
|
||||
<Project Name="ac" Path="ac.project" Active="No"/>
|
||||
<Project Name="ac" Path="ac.project" Active="Yes"/>
|
||||
<Project Name="wtp" Path="wtp.project" Active="No"/>
|
||||
<Project Name="mod_cipwap" Path="mod_cipwap.project" Active="No"/>
|
||||
<Project Name="mod_capwap" Path="mod_capwap.project" Active="No"/>
|
||||
<Project Name="mod_cisco" Path="mod_cisco.project" Active="No"/>
|
||||
<Project Name="libcw" Path="libcw.project" Active="Yes"/>
|
||||
<Project Name="libcw" Path="libcw.project" Active="No"/>
|
||||
<Project Name="mod_capwap80211" Path="mod_capwap80211.project" Active="No"/>
|
||||
<Project Name="mod_fortinet" Path="mod_fortinet.project" Active="No"/>
|
||||
<BuildMatrix>
|
||||
|
@ -346,22 +346,9 @@ int ac_run()
|
||||
|
||||
conf_parse_listen_addr (conf_listen_addrs[i], addr, port, &proto);
|
||||
|
||||
|
||||
/* //struct sockaddr sa;*/
|
||||
|
||||
|
||||
socklist_add_unicast (addr, port, proto);
|
||||
|
||||
/*
|
||||
//#ifdef WITH_LWAPP
|
||||
// if (conf_lwapp)
|
||||
// socklist_add_unicast(conf_listen_addrs[i], conf_lw_control_port,
|
||||
// AC_PROTO_LWAPP);
|
||||
//#endif*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (socklist_len == 0) {
|
||||
cw_log (LOG_ERR, "Fatal error: Could not setup any listen socket");
|
||||
return 1;
|
||||
|
@ -32,7 +32,7 @@ endif
|
||||
|
||||
|
||||
#SRC=$(wildcard *.c)
|
||||
SRC=wtp_main.c discovery.c
|
||||
SRC=wtp_main.c discovery.c join.c
|
||||
|
||||
OBJS=$(patsubst %.c,%.o,$(SRC))
|
||||
OBJS:=$(patsubst %.o,$(OBJDIR)/%.o,$(OBJS))
|
||||
|
@ -13,9 +13,10 @@
|
||||
#include "cw/dbg.h"
|
||||
#include "cw/sock.h"
|
||||
#include "cw/dtls.h"
|
||||
#include "cw/aciplist.h"
|
||||
|
||||
|
||||
#include "wtp.h"
|
||||
|
||||
|
||||
/*
|
||||
#define acinfo_log acinfo_log_
|
||||
@ -94,10 +95,11 @@ acinfo.result_code=99;
|
||||
|
||||
*/
|
||||
|
||||
int run_join_d(struct sockaddr *sa)
|
||||
int run_join_d(struct conn * conn, struct sockaddr *sa)
|
||||
{
|
||||
char addrstr[SOCK_ADDR_BUFSIZE];
|
||||
struct conn *conn = get_conn();
|
||||
/* struct conn *conn = get_conn();*/
|
||||
|
||||
conn->capwap_state = CAPWAP_STATE_JOIN;
|
||||
|
||||
int sockfd;
|
||||
@ -130,7 +132,7 @@ int run_join_d(struct sockaddr *sa)
|
||||
|
||||
int dtls_conf_ok=0;
|
||||
|
||||
if (conf_dtls_psk) {
|
||||
if (conn->dtls_psk) {
|
||||
conn->dtls_psk = conf_dtls_psk;
|
||||
conn->dtls_psk_len = strlen(conn->dtls_psk);
|
||||
conn->dtls_cipher = conf_dtls_cipher;
|
||||
@ -214,12 +216,12 @@ int run_join(struct conn *conn)
|
||||
|
||||
|
||||
|
||||
int join()
|
||||
int join(struct conn * conn, struct cw_DiscoveryResult dis)
|
||||
{
|
||||
struct conn *conn = get_conn();
|
||||
|
||||
mavliter_t ii;
|
||||
char addrstr[SOCK_ADDR_BUFSIZE];
|
||||
printf("Join\n");
|
||||
|
||||
|
||||
/*mbag_del_all(conn->incomming);*/
|
||||
|
||||
@ -236,16 +238,17 @@ int join()
|
||||
}
|
||||
*/
|
||||
|
||||
/*DEFINE_AVLITER(ii, iplist);*/
|
||||
|
||||
mavliter_foreach(&ii) {
|
||||
|
||||
cw_acip_t *ip = avliter_get(&ii);
|
||||
/* cw_acip_t *ip = avliter_get(&ii);*/
|
||||
|
||||
|
||||
cw_dbg(DBG_INFO, "Going to join CAWAP controller on %s",
|
||||
/* cw_dbg(DBG_INFO, "Going to join CAWAP controller on %s",
|
||||
sock_addr2str_p(&ip->ip,addrstr));
|
||||
*/
|
||||
|
||||
int rc = run_join_d((struct sockaddr *) &ip->ip);
|
||||
/* int rc = run_join_d((struct sockaddr *) &ip->ip);
|
||||
|
||||
if (rc<=0)
|
||||
continue;
|
||||
@ -255,7 +258,7 @@ int join()
|
||||
conn->capwap_state = CW_STATE_CONFIGURE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user