More improved dumps
This commit is contained in:
13
src/cw/cfg.c
13
src/cw/cfg.c
@ -87,7 +87,7 @@ cw_Cfg_t *cw_cfg_create()
|
||||
cfg = malloc(sizeof(cw_Cfg_t));
|
||||
if (cfg == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(cfg,0,sizeof(cw_Cfg_t));
|
||||
cfg->cfg = mavl_create(cmp, del, sizeof(struct cw_Cfg_entry));
|
||||
if (cfg->cfg==NULL){
|
||||
cw_cfg_destroy(cfg);
|
||||
@ -98,7 +98,7 @@ cw_Cfg_t *cw_cfg_create()
|
||||
|
||||
int cw_cfg_set(cw_Cfg_t * cfg, const char *key, const char *val)
|
||||
{
|
||||
cw_dbg(DBG_CFG_SET, "%s: %s",key,val);
|
||||
cw_dbg(cfg->dbg_level, "%s%s: %s",cfg->dbg_prefix,key,val);
|
||||
|
||||
struct cw_Cfg_entry e;
|
||||
int replaced;
|
||||
@ -694,7 +694,7 @@ int cw_cfg_set_val(cw_Cfg_t * cfg, const char *key, const struct cw_Type *type,
|
||||
|
||||
|
||||
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst,int dbg_level,const char *dbg_prefix)
|
||||
{
|
||||
mavliter_t it;
|
||||
mavliter_init(&it, src->cfg);
|
||||
@ -726,9 +726,7 @@ void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
*/
|
||||
|
||||
if (!exists){
|
||||
|
||||
|
||||
cw_dbg(DBG_CFG_SET, "New: %s: %s",new_elem.key,new_elem.val);
|
||||
cw_dbg(dbg_level, "%s: [undef] -> %s",new_elem.key,new_elem.val);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -740,7 +738,8 @@ void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst)
|
||||
continue;
|
||||
}
|
||||
|
||||
cw_dbg(DBG_CFG_SET, "Replace: %s: %s (old: %s)",new_elem.key, new_elem.val, old_elem->val);
|
||||
cw_dbg(dbg_level, "%s: %s -> %s",new_elem.key,old_elem->val,new_elem.val);
|
||||
// cw_dbg(DBG_X, "Replace: %s: %s (old: %s)",new_elem.key, new_elem.val, old_elem->val);
|
||||
if(dst->cfg->del){
|
||||
dst->cfg->del(old_elem);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ struct cw_Cfg {
|
||||
struct mavl * cfg;
|
||||
const char *name;
|
||||
int dbg_level;
|
||||
const char *dbg_prefix;
|
||||
};
|
||||
|
||||
typedef struct cw_Cfg cw_Cfg_t;
|
||||
@ -45,7 +46,7 @@ bstr16_t cw_cfg_get_bstr16(cw_Cfg_t * cfg, const char * key, const char *def);
|
||||
int cw_cfg_set_bstr16(cw_Cfg_t * cfg, const char * key, bstr16_t str);
|
||||
int cw_cfg_get_next_index(cw_Cfg_t * cfg, const char *key);
|
||||
const char *cw_cfg_get_l(cw_Cfg_t ** cfg, const char * key, const char *def);
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst);
|
||||
void cw_cfg_copy(cw_Cfg_t *src, cw_Cfg_t *dst,int dbg_level,const char *dbg_prefix);
|
||||
void cw_cfg_destroy(cw_Cfg_t *cfg);
|
||||
void cw_cfg_clear(cw_Cfg_t *cfg);
|
||||
int cw_cfg_base_exists(cw_Cfg_t * cfg, const char *key);
|
||||
|
@ -484,7 +484,10 @@ static int process_elements(struct cw_Conn *conn, uint8_t * rawmsg, int len,
|
||||
params.mand_found = mavl_create_conststr();
|
||||
params.unrecognized = mlist_create(NULL, NULL, sizeof(uint8_t *));
|
||||
|
||||
params.cfg = cw_cfg_create();
|
||||
params.cfg = cw_cfg_create();
|
||||
params.cfg->dbg_level = DBG_ELEM_DETAIL_IN;
|
||||
params.cfg->dbg_prefix = " ";
|
||||
|
||||
params.cfg_list[0]=params.cfg;
|
||||
params.cfg_list[1]=conn->local_cfg;
|
||||
params.cfg_list[2]=conn->global_cfg;
|
||||
|
@ -29,6 +29,8 @@ int conn_send_msg(struct cw_Conn * conn, uint8_t *rawmsg)
|
||||
int elems_len = cw_get_msg_elems_len(msg_ptr);
|
||||
elems_ptr = cw_get_msg_elems_ptr(msg_ptr);
|
||||
cw_Cfg_t * cfg = cw_cfg_create();
|
||||
cfg->dbg_level = DBG_ELEM_DETAIL_OUT;
|
||||
cfg->dbg_prefix = " ";
|
||||
|
||||
struct cw_ElemHandlerParams params;
|
||||
memset(¶ms,0,sizeof(struct cw_ElemHandlerParams));
|
||||
|
@ -9,6 +9,7 @@ int cw_dbg_set_level_from_str(const char *level)
|
||||
switch(*level){
|
||||
case '-':
|
||||
case '!':
|
||||
case '~':
|
||||
on =0;
|
||||
slevel=level+1;
|
||||
break;
|
||||
|
55
src/cw/dbg.c
55
src/cw/dbg.c
@ -63,14 +63,13 @@ static struct cw_StrListElem theme0[] = {
|
||||
{DBG_PKT_DMP_OUT, ANSI_BYELLOW ANSI_ITALIC},
|
||||
|
||||
{DBG_MSG_IN, ANSI_BLUE ANSI_BOLD},
|
||||
{DBG_MSG_PARSING, ANSI_BLUE },
|
||||
|
||||
{DBG_MSG_OUT, ANSI_BLUE ANSI_BOLD ANSI_ITALIC},
|
||||
{DBG_MSG_ASSEMBLY, ANSI_BLUE ANSI_ITALIC},
|
||||
{DBG_MSG_COMPOSE, ANSI_BLUE ANSI_ITALIC},
|
||||
|
||||
|
||||
{DBG_MSG_IN_DMP, ANSI_BBLUE },
|
||||
{DBG_MSG_OUT_DMP, ANSI_BBLUE ANSI_ITALIC},
|
||||
{DBG_MSG_DMP_IN, ANSI_BBLUE },
|
||||
{DBG_MSG_DMP_OUT, ANSI_BBLUE ANSI_ITALIC},
|
||||
|
||||
{DBG_ELEM_IN, ANSI_DEFAULT},
|
||||
{DBG_ELEM_OUT, ANSI_DEFAULT ANSI_ITALIC},
|
||||
@ -92,8 +91,8 @@ static struct cw_StrListElem theme0[] = {
|
||||
{DBG_X, "\x1b[31m"},
|
||||
{DBG_WARN, ANSI_CYAN},
|
||||
{DBG_MOD, ANSI_WHITE},
|
||||
{DBG_CFG_DMP, ANSI_BCYAN },
|
||||
|
||||
// {DBG_CFG_DMP, ANSI_BCYAN },
|
||||
{DBG_CFG_UPDATES,ANSI_BRED},
|
||||
|
||||
{CW_STR_STOP, ""}
|
||||
};
|
||||
@ -118,26 +117,25 @@ static struct cw_StrListElem color_off[] = {
|
||||
*/
|
||||
|
||||
static struct cw_StrListElem prefix[] = {
|
||||
{DBG_INFO, "Info -"},
|
||||
{DBG_PKT_IN, "Pkt In -"},
|
||||
{DBG_PKT_OUT, "Pkt Out -"},
|
||||
{DBG_MSG_IN, "Msg In - "},
|
||||
{DBG_MSG_OUT, "Msg Out - "},
|
||||
{DBG_INFO, "Info -"},
|
||||
{DBG_PKT_IN, "Pkt In -"},
|
||||
{DBG_PKT_OUT, "Pkt Out -"},
|
||||
{DBG_MSG_IN, "Msg In - "},
|
||||
{DBG_MSG_OUT, "Msg Out - "},
|
||||
|
||||
{DBG_MSG_PARSING, "" },
|
||||
{DBG_ELEM_IN, " Msg Element -"},
|
||||
{DBG_ELEM_OUT, " Msg Element -"},
|
||||
{DBG_ELEM_IN, " Msg Element -"},
|
||||
{DBG_ELEM_OUT, " Msg Element -"},
|
||||
|
||||
{DBG_MSG_ERR, " Msg Error -"},
|
||||
{DBG_PKT_ERR, " Pkt Error -"},
|
||||
{DBG_ELEM_ERR, " Elem Error -"},
|
||||
{DBG_RFC, " RFC -"},
|
||||
{DBG_DTLS, "DTLS - "},
|
||||
{DBG_DTLS_DETAIL, "DTLS - "},
|
||||
{DBG_WARN, " Warning - "},
|
||||
{DBG_MOD, " Mod - "},
|
||||
{DBG_STATE, " STATEMACHINE - "},
|
||||
{DBG_CFG_SET, " Cfg Set - "},
|
||||
{DBG_MSG_ERR, " Msg Error -"},
|
||||
{DBG_PKT_ERR, " Pkt Error -"},
|
||||
{DBG_ELEM_ERR, " Elem Error -"},
|
||||
{DBG_RFC, " RFC -"},
|
||||
{DBG_DTLS, "DTLS - "},
|
||||
{DBG_DTLS_DETAIL, "DTLS - "},
|
||||
{DBG_WARN, " Warning - "},
|
||||
{DBG_MOD, "Mod - "},
|
||||
{DBG_STATE, "STATEMACHINE - "},
|
||||
{DBG_CFG_UPDATES, "Cfg - "},
|
||||
|
||||
|
||||
|
||||
@ -357,16 +355,16 @@ void cw_dbg_msg(int level, struct cw_Conn *conn, uint8_t * packet, int len,
|
||||
cw_dbg(level, "%s", buf);
|
||||
|
||||
|
||||
if (cw_dbg_is_level(DBG_MSG_DMP)){
|
||||
// if (cw_dbg_is_level(DBG_MSG_DMP)){
|
||||
int dlevel;
|
||||
if(level==DBG_MSG_IN){
|
||||
dlevel = DBG_MSG_IN_DMP;
|
||||
dlevel = DBG_MSG_DMP_IN;
|
||||
}
|
||||
else{
|
||||
dlevel = DBG_MSG_OUT_DMP;
|
||||
dlevel = DBG_MSG_DMP_OUT;
|
||||
}
|
||||
cw_dbg_dmp(dlevel,packet,len,"");
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@ -415,7 +413,6 @@ void cw_dbg_elem(int level, struct cw_Conn *conn, int msg,
|
||||
handler->name,len);
|
||||
|
||||
if (cw_dbg_is_level(DBG_ELEM_DMP)) {
|
||||
int dlevel;
|
||||
if (level == DBG_ELEM_OUT)
|
||||
cw_dbg_dmp(DBG_ELEM_DMP_OUT,msgbuf,len,"");
|
||||
else
|
||||
|
75
src/cw/dbg.h
75
src/cw/dbg.h
@ -51,90 +51,95 @@ enum cw_dbg_levels{
|
||||
DBG_PKT_IN = (1<<0),
|
||||
DBG_PKT_OUT = (1<<1),
|
||||
|
||||
/** Hex-dump incomming/outgoing CAPWAP packets */
|
||||
DBG_PKT_DMP_IN = (1<<3),
|
||||
DBG_PKT_DMP_OUT = (1<<4),
|
||||
|
||||
/** Incomming CAPWAP packets with errors, wich would
|
||||
usually silently discarded */
|
||||
DBG_PKT_ERR = (1<<2),
|
||||
|
||||
/** Dump content of packets */
|
||||
// DBG_PKT_DMP = (1<<3),
|
||||
DBG_PKT_ERR = (1<<5),
|
||||
|
||||
|
||||
/** Display incomming/outgoing CAPWAP/LWAPP messages */
|
||||
DBG_MSG_IN = (1<<4),
|
||||
DBG_MSG_OUT = (1<<5),
|
||||
DBG_MSG_IN = (1<<6),
|
||||
DBG_MSG_OUT = (1<<7),
|
||||
|
||||
/** Show hex-dump of messages */
|
||||
DBG_MSG_DMP = (1<<6),
|
||||
|
||||
DBG_MSG_DMP_IN = (1<<8),
|
||||
DBG_MSG_DMP_OUT = (1<<9),
|
||||
|
||||
/** Message errors */
|
||||
DBG_MSG_ERR = (1<<7),
|
||||
DBG_MSG_ERR = (1<<10),
|
||||
|
||||
/** Show message elements in incomming/outgoing messages */
|
||||
DBG_ELEM_IN = (1<<8),
|
||||
DBG_ELEM_OUT = (1<<9),
|
||||
DBG_ELEM_IN = (1<<11),
|
||||
DBG_ELEM_OUT = (1<<12),
|
||||
|
||||
/** Show message element details */
|
||||
DBG_ELEM_DETAIL = (1<<10),
|
||||
DBG_ELEM_DETAIL_IN = (1<<13),
|
||||
DBG_ELEM_DETAIL_OUT = (1<<14),
|
||||
|
||||
/** Error in msg elements */
|
||||
DBG_ELEM_ERR = (1<<11),
|
||||
DBG_ELEM_ERR = (1<<15),
|
||||
|
||||
/** hex dump elements */
|
||||
DBG_ELEM_DMP = (1<<12),
|
||||
DBG_ELEM_DMP = (1<<16),
|
||||
|
||||
/** General infos, like CAPWAP state */
|
||||
DBG_INFO = (1<<13),
|
||||
DBG_INFO = (1<<17),
|
||||
|
||||
/** Misc. warnings */
|
||||
DBG_WARN = (1<<14),
|
||||
DBG_WARN = (1<<18),
|
||||
|
||||
/** RFC related */
|
||||
DBG_RFC = (1<<15),
|
||||
DBG_RFC = (1<<19),
|
||||
|
||||
/** DTLS related messages */
|
||||
DBG_DTLS = (1<<16),
|
||||
DBG_DTLS = (1<<20),
|
||||
|
||||
/** DTLS BIOs in/out */
|
||||
DBG_DTLS_BIO = (1<<17),
|
||||
DBG_DTLS_BIO = (1<<21),
|
||||
|
||||
/** Dump DTLS BIO i/o */
|
||||
DBG_DTLS_BIO_DMP = (1<<18),
|
||||
DBG_DTLS_BIO_DMP = (1<<22),
|
||||
|
||||
/** Show DTLS Details */
|
||||
DBG_DTLS_DETAIL = (1<<19),
|
||||
DBG_DTLS_DETAIL = (1<<23),
|
||||
|
||||
DBG_CFG_DMP = (1<<20),
|
||||
// DBG_CFG_DMP = (1<<20),
|
||||
|
||||
DBG_CFG_SET = (1<<21),
|
||||
// DBG_CFG_SET = (1<<21),
|
||||
|
||||
/** Debug Mods */
|
||||
DBG_MOD = (1<<22),
|
||||
DBG_MOD = (1<<24),
|
||||
|
||||
/**Debug State machine */
|
||||
DBG_STATE = (1<<23),
|
||||
DBG_STATE = (1<<25),
|
||||
|
||||
|
||||
DBG_PKT_DMP_OUT = (1<<24),
|
||||
DBG_PKT_DMP_IN = (1<<25),
|
||||
|
||||
|
||||
DBG_MSG_ASSEMBLY = (1<<26),
|
||||
DBG_MSG_COMPOSE = (1<<26),
|
||||
|
||||
DBG_MSG_IN_DMP = (1<<27),
|
||||
DBG_MSG_OUT_DMP = (1<<29),
|
||||
DBG_CFG_UPDATES = (1<<27),
|
||||
|
||||
|
||||
DBG_X = (1<<30),
|
||||
DBG_ALL = (0xffffffff),
|
||||
|
||||
|
||||
DBG_MSG_PARSING = 3,
|
||||
DBG_MSG_COMPOSING = 5,
|
||||
|
||||
DBG_ELEM_DMP_IN = 7,
|
||||
DBG_ELEM_DMP_OUT = 9,
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define DBG_MSG (DBG_MSG_IN | DBG_MSG_OUT)
|
||||
#define DBG_PKT (DBG_PKT_IN | DBG_PKT_OUT)
|
||||
#define DBG_ELEM (DBG_ELEM_IN | DBG_ELEM_OUT)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define DBG_LN __FILE__,__LINE__
|
||||
|
||||
|
@ -39,12 +39,13 @@ struct cw_StrListElem cw_dbg_strings[] = {
|
||||
{ DBG_PKT_IN, "pkt_in" },
|
||||
{ DBG_PKT_OUT, "pkt_out" },
|
||||
{ DBG_PKT_ERR, "pkt_err" },
|
||||
// { DBG_PKT_IN_DMP, "pkt_in_dmp" },
|
||||
// { DBG_PKT_IN_DMP, "pkt_out_dmp" },
|
||||
{ DBG_PKT_DMP_IN, "pkt_dmp_in" },
|
||||
{ DBG_PKT_DMP_OUT, "pkt_dmp_out" },
|
||||
|
||||
{ DBG_MSG_IN, "msg_in" },
|
||||
{ DBG_MSG_OUT, "msg_out" },
|
||||
// { DBG_MSG_DMP, "msg_dmp" },
|
||||
{ DBG_MSG_DMP_IN, "msg_dmp_in" },
|
||||
{ DBG_MSG_DMP_OUT, "msg_dmp_out" },
|
||||
|
||||
{ DBG_MSG_ERR, "msg_err"},
|
||||
|
||||
@ -54,32 +55,32 @@ struct cw_StrListElem cw_dbg_strings[] = {
|
||||
{ DBG_ELEM_OUT, "elem_out"},
|
||||
{ DBG_ELEM_DMP, "elem_dmp"},
|
||||
|
||||
// { DBG_SUBELEM, "subelem"},
|
||||
// { DBG_SUBELEM_DMP, "subelem_dmp" },
|
||||
|
||||
// { DBG_ELEM_DETAIL, "elem_detail"},
|
||||
|
||||
{ DBG_ELEM_ERR, "elem_err" },
|
||||
{ DBG_ELEM_DETAIL_IN, "elem_detail_in" },
|
||||
{ DBG_ELEM_DETAIL_OUT, "elem_detail_out" },
|
||||
|
||||
{ DBG_DTLS, "dtls" },
|
||||
{ DBG_DTLS_BIO, "dtls_bio" },
|
||||
{ DBG_DTLS_BIO_DMP, "dtls_bio_dmp"},
|
||||
{ DBG_DTLS_DETAIL, "dtls_detail"},
|
||||
|
||||
{ DBG_CFG_SET, "cfg_set" },
|
||||
{ DBG_CFG_UPDATES, "cfg_updates" },
|
||||
|
||||
|
||||
{DBG_CFG_DMP, "cfg_dmp" },
|
||||
// {DBG_CFG_DMP, "cfg_dmp" },
|
||||
|
||||
{ DBG_WARN, "warn" },
|
||||
|
||||
|
||||
{ DBG_MOD,"mod"},
|
||||
{ DBG_STATE, "state" },
|
||||
|
||||
{ DBG_MSG_COMPOSE, "msg_compose" },
|
||||
|
||||
{ (DBG_MSG_IN | DBG_MSG_OUT), "msg" },
|
||||
{ (DBG_PKT_IN | DBG_PKT_OUT), "pkt" },
|
||||
{ (DBG_MSG_IN | DBG_MSG_OUT | DBG_ELEM_IN | DBG_ELEM_OUT ), "std" },
|
||||
{ (DBG_ELEM_IN | DBG_ELEM_OUT), "elem" },
|
||||
{ (DBG_ELEM_DETAIL_IN | DBG_ELEM_DETAIL_OUT), "elem_detail" },
|
||||
{ (DBG_ELEM_IN | DBG_ELEM_OUT | DBG_ELEM_DMP | DBG_ELEM_DETAIL_IN | DBG_ELEM_DETAIL_OUT), "elem_all" },
|
||||
{ (DBG_MSG_IN | DBG_MSG_OUT | DBG_ELEM_IN | DBG_ELEM_OUT | DBG_STATE), "std" },
|
||||
|
||||
{ DBG_ALL, "all"},
|
||||
|
||||
|
@ -98,7 +98,7 @@ void cw_discovery_results_add(struct cw_DiscoveryResults *dis,
|
||||
if (e.cfg == NULL)
|
||||
continue;
|
||||
|
||||
cw_cfg_copy(ac_cfg,e.cfg);
|
||||
cw_cfg_copy(ac_cfg,e.cfg,0,"");
|
||||
|
||||
strcpy(e.ip,ipval);
|
||||
|
||||
|
@ -21,7 +21,7 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
params->elemdata = data;
|
||||
|
||||
if (handler==NULL){
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_log(LOG_ERR,"Can't put message element %d %d %d, no handler defined.",
|
||||
data->proto,data->vendor,data->id);
|
||||
continue;
|
||||
@ -29,7 +29,7 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
|
||||
if (handler->put == NULL){
|
||||
if (data->mand){
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_log(LOG_ERR,"Error: Can't add mandatory message element %d - %s, no put method defined",
|
||||
handler->id, handler->name);
|
||||
|
||||
@ -39,7 +39,7 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
|
||||
if (!data->mand){
|
||||
if (!cw_cfg_base_exists(params->cfg_list[0],handler->key)){
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s - (skip)",
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s - (skip)",
|
||||
data->proto, data->vendor, data->id, handler->name);
|
||||
|
||||
continue;
|
||||
@ -48,7 +48,7 @@ int cw_encode_elements(struct cw_ElemHandlerParams *params, mlist_t elements_lis
|
||||
|
||||
|
||||
l = handler->put(handler,params,dst+len);
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s - (%d bytes)",
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s - (%d bytes)",
|
||||
data->proto, data->vendor, data->id, handler->name,l);
|
||||
|
||||
len += l;
|
||||
@ -89,7 +89,7 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
msg->preprocess(conn);
|
||||
}
|
||||
|
||||
cw_dbg(DBG_MSG_ASSEMBLY,"*** Assembling message of type %d (%s) ***",
|
||||
cw_dbg(DBG_MSG_COMPOSE,"Composing message of type %d (%s) ***",
|
||||
msg->type, msg->name);
|
||||
|
||||
dst = msgptr+8;
|
||||
@ -112,7 +112,7 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
|
||||
data = mlistelem_dataptr(elem);
|
||||
handler = cw_msgset_get_elemhandler(conn->msgset,data->proto,data->vendor,data->id);
|
||||
cw_dbg(DBG_MSG_ASSEMBLY," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
cw_dbg(DBG_MSG_COMPOSE," Add Elem: %d %d %d %s", data->proto, data->vendor, data->id, handler->name);
|
||||
if (handler==NULL){
|
||||
cw_log(LOG_ERR,"Can't put message element %d %d %d, no handler defined.",
|
||||
data->proto,data->vendor,data->id);
|
||||
@ -149,8 +149,8 @@ int cw_compose_message(struct cw_Conn *conn, uint8_t * rawout)
|
||||
// }
|
||||
|
||||
cw_set_msg_elems_len(msgptr, len);
|
||||
cw_dbg(DBG_MSG_ASSEMBLY,"*** Done assenmbling message of type %d (%s) ***",
|
||||
msg->type, msg->name);
|
||||
//cw_dbg(DBG_MSG_COMPOSE,"*** Done assenmbling message of type %d (%s) ***",
|
||||
// msg->type, msg->name);
|
||||
if (type & 1) {
|
||||
/* It's a request, so we have to set seqnum */
|
||||
int s = conn_get_next_seqnum(conn);
|
||||
|
Reference in New Issue
Block a user