Inserted a lot of debug printfs, fixed some bugs
This commit is contained in:
@ -90,7 +90,7 @@ struct conn * conn_create(int sock, struct sockaddr * addr, int qsize)
|
||||
/* conn->send_data_packet = conn_send_data_packet;*/
|
||||
|
||||
conn->last_seqnum_received=-1;
|
||||
conn->mtu=500;
|
||||
conn->mtu=600;
|
||||
|
||||
|
||||
conn->cur_packet=0;
|
||||
@ -102,7 +102,7 @@ struct conn * conn_create(int sock, struct sockaddr * addr, int qsize)
|
||||
|
||||
/* conn->write_data = conn->send_data_packet; */
|
||||
|
||||
conn->dtls_mtu = 500;
|
||||
conn->dtls_mtu = 600;
|
||||
|
||||
return conn;
|
||||
}
|
||||
|
@ -515,6 +515,7 @@ int process_message(struct conn *conn, uint8_t * rawmsg, int rawlen,
|
||||
if ((sd > 0 && sd < 128) || (sd < 0 && sd < -128) || s1 < 0) {
|
||||
/* seqnum is ok, normal message processing */
|
||||
conn->last_seqnum_received = seqnum;
|
||||
|
||||
return process_elements(conn, rawmsg, rawlen, from);
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,8 @@ int cw_decode_element(struct cw_ElemHandlerParams *params, int proto,
|
||||
handler->name);
|
||||
return CAPWAP_RESULT_UNRECOGNIZED_MESSAGE_ELEMENT;
|
||||
}
|
||||
|
||||
printf ("USING HANDLERi TO DECODE: %d %s\n",handler->id,handler->name);
|
||||
rc = handler->get(handler, params, data, len);
|
||||
|
||||
|
||||
|
@ -18,6 +18,8 @@ int cw_in_generic_struct(struct cw_ElemHandler * handler, struct cw_ElemHandlerP
|
||||
key = handler->key;
|
||||
}
|
||||
|
||||
printf("CW_IN_GENERIC STRUCT: %s\n",key);
|
||||
|
||||
/* int (*mkkey)(struct cw_ElemHandler * handler, char *dst, struct cw_ElemHandlerParams * params,
|
||||
uint8_t*data, int len);
|
||||
*/
|
||||
|
@ -8,9 +8,6 @@ int cw_ktv_read_struct(mavl_t ktv,const cw_KTVStruct_t * stru, const char *pkey,
|
||||
int pos, i,l;
|
||||
cw_KTV_t * result;
|
||||
|
||||
if (strcmp(pkey,"radio.0/cisco/wtp-radio-config")==0)
|
||||
i = 99;
|
||||
|
||||
|
||||
pos=0; i=0;
|
||||
while (stru[i].type != NULL){
|
||||
@ -47,6 +44,7 @@ int cw_ktv_read_struct(mavl_t ktv,const cw_KTVStruct_t * stru, const char *pkey,
|
||||
|
||||
stru[i].type->to_str(result,dbstr,100);
|
||||
cw_dbg(DBG_ELEM_DETAIL, "Read (%d): %s: %s",pos,key,dbstr);
|
||||
printf("READ STRUCT (%d): %s: %s\n",pos,key,dbstr);
|
||||
|
||||
if (stru[i].len==-1)
|
||||
l = result->type->len(result);
|
||||
|
@ -24,9 +24,15 @@ int cw_ktv_write_struct(mavl_t ktv, mavl_t def, const cw_KTVStruct_t * stru, con
|
||||
else
|
||||
sprintf(key,"%s",pkey);
|
||||
|
||||
|
||||
printf("Get Key: %s\n",key);
|
||||
result = cw_ktv_get(ktv,key,NULL);
|
||||
|
||||
|
||||
if(result)
|
||||
{
|
||||
char s[129];
|
||||
result->type->to_str(result,s,128);
|
||||
printf("Content: '%s'\n",s);
|
||||
}
|
||||
|
||||
if (result == NULL && def != NULL){
|
||||
result = cw_ktv_get(def,key,NULL);
|
||||
|
@ -22,7 +22,7 @@ int cw_out_generic_indexed_enum(struct cw_ElemHandler * handler, struct cw_ElemH
|
||||
for(i=0; e[i].name!=NULL; i++) {
|
||||
sprintf(key,"%s/%s",handler->key,e[i].name);
|
||||
|
||||
printf("Her is the Key: %s - %s\n",key, );
|
||||
//printf("Her is the Key: %s - %s\n",key, );
|
||||
|
||||
result = cw_ktv_base_exists(params->local_cfg,key);
|
||||
if (result==NULL)
|
||||
|
@ -52,10 +52,12 @@ int cw_out_traverse0(struct cw_ElemHandler * handler, struct cw_ElemHandlerParam
|
||||
char key[CW_KTV_MAX_KEY_LEN];
|
||||
int len;
|
||||
len = 0;
|
||||
|
||||
|
||||
printf("Next: %s\n", next);
|
||||
|
||||
sl = strchr(next,'/');
|
||||
if (sl==NULL){
|
||||
cw_KTV_t * result;
|
||||
cw_KTV_t * result;
|
||||
sprintf(key,"%s/%s",current,next);
|
||||
result = cw_ktv_base_exists(params->local_cfg,key);
|
||||
if (result != NULL){
|
||||
@ -84,6 +86,9 @@ int cw_out_traverse0(struct cw_ElemHandler * handler, struct cw_ElemHandlerParam
|
||||
}
|
||||
|
||||
strcpy(key,current);
|
||||
|
||||
printf("current is %s\n", current);
|
||||
|
||||
if (key[0!=0])
|
||||
strcat(key,"/");
|
||||
l = sl - next;
|
||||
@ -98,6 +103,7 @@ int cw_out_traverse0(struct cw_ElemHandler * handler, struct cw_ElemHandlerParam
|
||||
cw_KTV_t * result;
|
||||
|
||||
i = cw_ktv_idx_get_next(params->local_cfg,key,i+1);
|
||||
|
||||
if (i==-1)
|
||||
break;
|
||||
sprintf(basekey,"%s.%d",key,i);
|
||||
@ -127,6 +133,8 @@ int cw_out_traverse(struct cw_ElemHandler * handler, struct cw_ElemHandlerParams
|
||||
stack[0]=0;
|
||||
|
||||
current[0]=0;
|
||||
|
||||
|
||||
|
||||
return cw_out_traverse0(handler,params,dst,-1,current,handler->key, stack);
|
||||
}
|
||||
|
Reference in New Issue
Block a user