Working on mods.
FossilOrigin-Name: b5e5c1240926372db9002305a0f0650ca7db5f6128a114f6078712dd2b575c05
This commit is contained in:
parent
98810fa0c3
commit
a36b3b92d8
@ -1017,6 +1017,9 @@ static inline const char *cw_strelemp_(cw_strheap_t h, int msg_id)
|
|||||||
|
|
||||||
extern int cw_in_generic(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
extern int cw_in_generic(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||||
int len,struct sockaddr *from);
|
int len,struct sockaddr *from);
|
||||||
|
extern int cw_in_generic2(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||||
|
int len,struct sockaddr *from);
|
||||||
|
|
||||||
extern int cw_in_vendor_specific_payload(struct conn *conn, struct cw_action_in *a,
|
extern int cw_in_vendor_specific_payload(struct conn *conn, struct cw_action_in *a,
|
||||||
uint8_t * data, int len,struct sockaddr *from);
|
uint8_t * data, int len,struct sockaddr *from);
|
||||||
extern int cw_in_wtp_name(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
extern int cw_in_wtp_name(struct conn *conn, struct cw_action_in *a, uint8_t * data,
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "mbag.h"
|
#include "mbag.h"
|
||||||
#include "capwap.h"
|
#include "capwap.h"
|
||||||
|
|
||||||
|
#include "item.h"
|
||||||
|
|
||||||
|
|
||||||
int static check_len(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
int static check_len(struct conn *conn, struct cw_action_in *a, uint8_t * data, int len,
|
||||||
struct sockaddr *from)
|
struct sockaddr *from)
|
||||||
@ -68,6 +70,19 @@ int static do_save(mbag_t itemstore, struct conn *conn, struct cw_action_in *a,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const cw_itemdef_t * idef = cw_itemdef_get(conn->actions->items,a->item_id,CW_ITEM_NONE);
|
||||||
|
|
||||||
|
if (!idef) {
|
||||||
|
cw_log(LOG_ERR,"No itemdef found for %s",a->item_id);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// printf("Idef: %s\n",idef->type->name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cw_log(LOG_ERR,
|
cw_log(LOG_ERR,
|
||||||
"Can't handle item type %d in definition for incomming msg %d (%s) - %d, cw_in_generic.",
|
"Can't handle item type %d in definition for incomming msg %d (%s) - %d, cw_in_generic.",
|
||||||
a->itemtype, a->msg_id, cw_strmsg(a->msg_id), a->elem_id);
|
a->itemtype, a->msg_id, cw_strmsg(a->msg_id), a->elem_id);
|
||||||
@ -80,9 +95,6 @@ int cw_in_generic2(struct conn *conn, struct cw_action_in *a, uint8_t * data, in
|
|||||||
struct sockaddr *from)
|
struct sockaddr *from)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("Here is cw in generic 2\n");
|
|
||||||
exit(0);
|
|
||||||
|
|
||||||
if (!check_len(conn, a, data, len, from))
|
if (!check_len(conn, a, data, len, from))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ static int detect(struct conn *conn,const uint8_t *rawmsg, int rawlen,struct soc
|
|||||||
{
|
{
|
||||||
cw_log(LOG_INFO,"Detecting ...");
|
cw_log(LOG_INFO,"Detecting ...");
|
||||||
conn->detected=1;
|
conn->detected=1;
|
||||||
|
conn->actions=&actions;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user