Renamed struct conn to struct cw_Conn
This commit is contained in:
@ -36,7 +36,7 @@ void wlan0_cmd(struct shelldata *sd, const char * cmd);
|
||||
void show_cfg (FILE *out, mavl_t ktv);
|
||||
void show_aps (FILE *out);
|
||||
|
||||
struct conn * find_ap(const char *name);
|
||||
struct cw_Conn * find_ap(const char *name);
|
||||
|
||||
struct command{
|
||||
char * cmd;
|
||||
@ -72,7 +72,7 @@ void list_cmd(struct shelldata *sd, const char *cmd)
|
||||
|
||||
void cfg_cmd(struct shelldata *sd, const char *cmd)
|
||||
{
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
wtplist_lock();
|
||||
conn = find_ap(sd->prompt);
|
||||
if (conn==NULL){
|
||||
@ -86,7 +86,7 @@ void cfg_cmd(struct shelldata *sd, const char *cmd)
|
||||
|
||||
void ucfg_cmd(struct shelldata *sd, const char *cmd)
|
||||
{
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
show_cfg(sd->out,sd->update_cfg);
|
||||
|
||||
}
|
||||
@ -96,7 +96,7 @@ void ucfg_cmd(struct shelldata *sd, const char *cmd)
|
||||
void
|
||||
send_cmd(struct shelldata * sd, const char *cmd)
|
||||
{
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
wtplist_lock();
|
||||
conn = find_ap(sd->prompt);
|
||||
if (conn==NULL){
|
||||
@ -111,7 +111,7 @@ send_cmd(struct shelldata * sd, const char *cmd)
|
||||
void
|
||||
wlan0_cmd(struct shelldata * sd, const char *cmd)
|
||||
{
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
wtplist_lock();
|
||||
conn = find_ap(sd->prompt);
|
||||
if (conn==NULL){
|
||||
@ -129,7 +129,7 @@ wlan0_cmd(struct shelldata * sd, const char *cmd)
|
||||
|
||||
void set_cmd(struct shelldata *sd, const char *str)
|
||||
{
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
struct cw_Val_Reader r;
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
char type[CW_KTV_MAX_KEY_LEN];
|
||||
@ -189,7 +189,7 @@ void show_aps (FILE *out)
|
||||
cw_Val_t * result;
|
||||
char addr[SOCK_ADDR_BUFSIZE];
|
||||
char wtp_name[CAPWAP_MAX_WTP_NAME_LEN];
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
conn = mavliter_get_ptr (&it);
|
||||
|
||||
sock_addr2str_p (&conn->addr, addr);
|
||||
@ -211,7 +211,7 @@ void show_aps (FILE *out)
|
||||
|
||||
|
||||
|
||||
struct conn * find_ap(const char *name)
|
||||
struct cw_Conn * find_ap(const char *name)
|
||||
{
|
||||
struct connlist * cl;
|
||||
mavliter_t it;
|
||||
@ -224,7 +224,7 @@ struct conn * find_ap(const char *name)
|
||||
mavliter_foreach (&it) {
|
||||
cw_Val_t * result;
|
||||
char wtp_name[CAPWAP_MAX_WTP_NAME_LEN];
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
conn = mavliter_get_ptr (&it);
|
||||
|
||||
result = cw_ktv_get (conn->remote_cfg, "wtp-name", NULL);
|
||||
@ -266,7 +266,7 @@ void con (FILE *out)
|
||||
cw_Val_t * result;
|
||||
char addr[SOCK_ADDR_BUFSIZE];
|
||||
char wtp_name[CAPWAP_MAX_WTP_NAME_LEN];
|
||||
struct conn * conn;
|
||||
struct cw_Conn * conn;
|
||||
conn = mavliter_get_ptr (&it);
|
||||
|
||||
sock_addr2str_p (&conn->addr, addr);
|
||||
|
@ -71,7 +71,7 @@ void wtplist_destroy()
|
||||
struct wtpman * wtplist_get(const struct sockaddr * addr)
|
||||
{
|
||||
|
||||
struct conn * conn = connlist_get(connlist,addr);
|
||||
struct cw_Conn * conn = connlist_get(connlist,addr);
|
||||
if (!conn)
|
||||
return 0;
|
||||
return conn->data;
|
||||
@ -80,8 +80,8 @@ struct wtpman * wtplist_get(const struct sockaddr * addr)
|
||||
|
||||
struct wtpman * wtplist_get_by_session_id(bstr16_t *session_id)
|
||||
{
|
||||
struct conn search;
|
||||
struct conn * conn;
|
||||
struct cw_Conn search;
|
||||
struct cw_Conn * conn;
|
||||
|
||||
search.session_id = session_id;
|
||||
/*memcpy (search.session_id, session_id,16);*/
|
||||
|
@ -63,7 +63,7 @@ static void reset_echointerval_timer(struct wtpman *wtpman)
|
||||
}
|
||||
|
||||
|
||||
static int msg_start_handler(struct conn *conn, struct cw_action_in *a,
|
||||
static int msg_start_handler(struct cw_Conn *conn, struct cw_action_in *a,
|
||||
uint8_t * data, int len, struct sockaddr *from)
|
||||
{
|
||||
struct wtpman *wtpman = conn->data;
|
||||
@ -144,7 +144,7 @@ static int wtpman_join(void *arg)
|
||||
int rc;
|
||||
char sock_buf[SOCK_ADDR_BUFSIZE];
|
||||
struct wtpman *wtpman = (struct wtpman *) arg;
|
||||
struct conn *conn = wtpman->conn;
|
||||
struct cw_Conn *conn = wtpman->conn;
|
||||
time_t timer, wait_join;
|
||||
|
||||
cw_dbg(DBG_INFO, "Join State - %s",
|
||||
@ -193,7 +193,7 @@ static int wtpman_join(void *arg)
|
||||
static void wtpman_image_data(struct wtpman *wtpman)
|
||||
{
|
||||
/* char sock_buf[SOCK_ADDR_BUFSIZE];
|
||||
struct conn *conn = wtpman->conn;
|
||||
struct cw_Conn *conn = wtpman->conn;
|
||||
|
||||
// Image upload
|
||||
const char *filename = mbag_get_str(conn->outgoing, CW_ITEM_IMAGE_FILENAME, NULL);
|
||||
@ -255,7 +255,7 @@ void *wtpman_run_data(void *wtpman_arg)
|
||||
return NULL;
|
||||
/*
|
||||
struct wtpman *wtpman = (struct wtpman *) wtpman_arg;
|
||||
struct conn *conn = wtpman->conn;
|
||||
struct cw_Conn *conn = wtpman->conn;
|
||||
|
||||
|
||||
uint8_t data[1001];
|
||||
@ -271,7 +271,7 @@ void *wtpman_run_data(void *wtpman_arg)
|
||||
|
||||
}
|
||||
|
||||
int cw_run_state_machine(struct conn *conn, time_t * timer)
|
||||
int cw_run_state_machine(struct cw_Conn *conn, time_t * timer)
|
||||
{
|
||||
|
||||
int timerval;
|
||||
@ -326,7 +326,7 @@ static void *wtpman_main(void *arg)
|
||||
int rc;
|
||||
time_t timer;
|
||||
char sock_buf[SOCK_ADDR_BUFSIZE];
|
||||
struct conn *conn;
|
||||
struct cw_Conn *conn;
|
||||
int last_state;
|
||||
|
||||
struct wtpman *wtpman = (struct wtpman *) arg;
|
||||
|
@ -15,7 +15,7 @@
|
||||
struct wtpman {
|
||||
pthread_t thread;
|
||||
|
||||
struct conn *conn;
|
||||
struct cw_Conn *conn;
|
||||
|
||||
|
||||
/* wtp data */
|
||||
|
Reference in New Issue
Block a user