Calls msg_start and msg_end.
FossilOrigin-Name: c5c7514bcb9aaf1f6827e652c6b1a93780238fdec1ca1738478ccefafbdffd9e
This commit is contained in:
parent
19cf085d57
commit
3cf0fd04d5
@ -92,12 +92,16 @@ void cw_init_request(struct conn *conn, int msg_id)
|
|||||||
cw_set_msg_elems_len(msgptr, 0);
|
cw_set_msg_elems_len(msgptr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cw_init_keepalive(struct conn *conn)
|
void cw_init_data_msg(struct conn *conn)
|
||||||
{
|
{
|
||||||
uint8_t *buffer = conn->req_buffer;
|
uint8_t *buffer = conn->req_buffer;
|
||||||
cw_put_dword(buffer + 0, 0);
|
cw_put_dword(buffer + 0, 0);
|
||||||
cw_put_dword(buffer + 4, 0);
|
cw_put_dword(buffer + 4, 0);
|
||||||
|
|
||||||
|
/* unencrypted */
|
||||||
|
cw_set_hdr_preamble(buffer, CAPWAP_VERSION << 4 | 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +206,7 @@ static struct cw_actiondef *load_mods(struct conn *conn, uint8_t * rawmsg, int l
|
|||||||
|
|
||||||
cw_dbg(DBG_INFO, "Mods deteced: %s,%s", cmod->name, bmod->name);
|
cw_dbg(DBG_INFO, "Mods deteced: %s,%s", cmod->name, bmod->name);
|
||||||
|
|
||||||
struct cw_actiondef *ad = mod_cache_add(cmod, bmod);
|
struct cw_actiondef *ad = mod_cache_add(conn,cmod, bmod);
|
||||||
|
|
||||||
return ad;
|
return ad;
|
||||||
|
|
||||||
@ -297,7 +301,7 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
|
|||||||
//struct mod_ac *mod;
|
//struct mod_ac *mod;
|
||||||
struct cw_actiondef *ad = load_mods(conn, rawmsg, len, elems_len, from);
|
struct cw_actiondef *ad = load_mods(conn, rawmsg, len, elems_len, from);
|
||||||
if (!ad) {
|
if (!ad) {
|
||||||
cw_log(LOG_ERR, "Eror");
|
cw_log(LOG_ERR, "Error");
|
||||||
errno = EAGAIN;
|
errno = EAGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -354,6 +358,10 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (conn->msg_start){
|
||||||
|
conn->msg_start(conn, afm, rawmsg, len, from);
|
||||||
|
}
|
||||||
|
|
||||||
/* Execute start processor for message */
|
/* Execute start processor for message */
|
||||||
if (afm->start) {
|
if (afm->start) {
|
||||||
afm->start(conn, afm, rawmsg, len, from);
|
afm->start(conn, afm, rawmsg, len, from);
|
||||||
@ -424,6 +432,9 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
|
|||||||
result_code = afm->end(conn, afm, rawmsg, len, from);
|
result_code = afm->end(conn, afm, rawmsg, len, from);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (conn->msg_end){
|
||||||
|
conn->msg_end(conn, afm, rawmsg, len, from);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unrecognized) {
|
if (unrecognized) {
|
||||||
|
Loading…
Reference in New Issue
Block a user