WTP joins now a Cisco vwlc via mod cisco.

FossilOrigin-Name: 21ef75e0a9c1bd22396902887a13ebd383bbbf97fe30834c8232f86ef6bb8eb6
This commit is contained in:
7u83@mail.ru
2016-03-13 17:55:42 +00:00
parent af2e0eec9b
commit 06d748a470
11 changed files with 91 additions and 28 deletions

View File

@ -28,6 +28,7 @@ struct mbag_item *cw_out_get_local(struct conn *conn, struct cw_action_out *a)
struct mbag_item *cw_out_get_config(struct conn *conn, struct cw_action_out *a)
{
// printf("cw get config (%d %d %s) %p\n",a->msg_id, a->elem_id,a->item_id, conn->config);
return mbag_get(conn->config,a->item_id);
}

View File

@ -15,6 +15,7 @@ int cw_in_check_generic_resp(struct conn *conn, struct cw_action_in *a, uint8_t
/* Check if the message contains a result code and
if it indicates an errror */
mbag_item_t * result = mbag_get(conn->incomming,CW_ITEM_RESULT_CODE);
if (result ) {
if (!cw_rcok(result->dword)){
return result->dword;
@ -35,8 +36,9 @@ int cw_in_check_generic_resp(struct conn *conn, struct cw_action_in *a, uint8_t
}
/* if we hava a result code, return it */
if ( result )
if ( result ) {
return result->dword;
}
return 0;
}

View File

@ -83,12 +83,13 @@ int cw_put_msg(struct conn *conn, uint8_t * rawout)
/* Element is from next msg, close action */
break;
}
int l=0;
if (ae->out) {
int l=0;
// printf("Out Call with len =%d\n",len);
l= ae->out(conn, ae, dst+len);
// cw_dbg_elem(DBG_ELEM, conn, ae->msg_id, ae->elem_id, dst+len,l);
// printf("Returned len = %d\n",l);
@ -169,6 +170,11 @@ int cw_put_custom_msg(struct conn *conn, uint8_t * rawout, mavl_conststr_t elems
DBGX("Put %d %i %p\n",ae->msg_id,ae->elem_id,ae->item_id);
DBGX("Elem ID %s",ae->item_id);
if ( ae->item_id ) {
DBGX("Item ID: %s %p",ae->item_id,CW_ITEM_NONE);
}
@ -177,14 +183,18 @@ int cw_put_custom_msg(struct conn *conn, uint8_t * rawout, mavl_conststr_t elems
/* Element is from next msg, close action */
break;
}
int l=0;
if (ae->out) {
int l=0;
l= ae->out(conn, ae, dst+len);
len +=l;
// cw_dbg_elem_colored(DBG_ELEM, conn, ae->msg_id, ae->elem_id,
// dst+len-l,l);
}
// printf("DEBUGGER\n");
// cw_dbg_elem(DBG_ELEM, conn, ae->msg_id, ae->elem_id, 0,l);
//cw_dbg_elem_colored(DBG_ELEM,"Adding element %d to msg %d, len = %d",ae->msg_id,ae->elem_id,l);