Working on mods...
FossilOrigin-Name: 38c2ad1dd0ad8734bd1c30721f63fecfc6f011c32163b750757ef50a961c131d
This commit is contained in:
@ -86,11 +86,12 @@ extern struct mod_ac * cw_get_mod_ac(const char *name);
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int rc = 0;
|
||||
/*
|
||||
struct mod_ac *m = cw_get_mod_ac("cipwap");
|
||||
printf("Ptr: %p\n",m);
|
||||
|
||||
//struct mod_ac *m = cw_get_mod_ac("capwap");
|
||||
//m->init();
|
||||
//exit(0);
|
||||
|
||||
m->init();
|
||||
*/
|
||||
|
||||
/* parse arguments */
|
||||
parse_args(argc, argv);
|
||||
|
@ -134,6 +134,20 @@ static int init_acname()
|
||||
return 1;
|
||||
}
|
||||
|
||||
#include "capwap/mod.h"
|
||||
|
||||
|
||||
struct mod_ac * conf_mods[10];
|
||||
|
||||
static int init_mods()
|
||||
{
|
||||
|
||||
conf_mods[0]=cw_get_mod_ac("cipwap");
|
||||
conf_mods[1]=NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int init_acid()
|
||||
{
|
||||
|
||||
@ -811,6 +825,8 @@ int read_config(const char *filename)
|
||||
if (!conf_image_dir)
|
||||
conf_image_dir = CONF_DEFAULT_IMAGE_DIR;
|
||||
|
||||
init_mods();
|
||||
|
||||
conf_init_capwap_mode();
|
||||
|
||||
|
||||
|
@ -29,6 +29,10 @@
|
||||
#include "capwap/capwap.h"
|
||||
#include "capwap/lwapp.h"
|
||||
#include "capwap/bstr.h"
|
||||
#include "capwap/mod.h"
|
||||
|
||||
|
||||
extern struct mod_ac * conf_mods[10];
|
||||
|
||||
#ifndef CONF_DEFAULT_ACNAME
|
||||
#define CONF_DEFAULT_ACNAME "AC"
|
||||
|
@ -77,7 +77,6 @@ void socklist_destroy()
|
||||
free(socklist);
|
||||
socklist = 0;
|
||||
pthread_mutex_destroy(&socklist_mutex);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -510,8 +510,6 @@ struct wtpman *wtpman_create(int socklistindex, struct sockaddr *srcaddr)
|
||||
replyfd = socklist[socklistindex].sockfd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int sockfd = replyfd; //socklist[socklistindex].reply_sockfd;
|
||||
|
||||
|
||||
@ -519,7 +517,7 @@ struct wtpman *wtpman_create(int socklistindex, struct sockaddr *srcaddr)
|
||||
socklen_t dbgaddrl=sizeof(dbgaddr);
|
||||
getsockname(sockfd,&dbgaddr,&dbgaddrl);
|
||||
|
||||
cw_dbg(DBG_INFO,"Creating wtpman with socket %d, %s:%d",sockfd,sock_addr2str(&dbgaddr),sock_getport(&dbgaddr));
|
||||
cw_dbg(DBG_INFO,"Creating wtpman on socket %d, %s:%d",sockfd,sock_addr2str(&dbgaddr),sock_getport(&dbgaddr));
|
||||
|
||||
wtpman->conn = conn_create(sockfd, srcaddr, 100);
|
||||
if (!wtpman->conn) {
|
||||
|
Reference in New Issue
Block a user