hi
i have added a trust table like the routeing table in aodv routing protocol. by running this code i get a "segmentation error"
the code is :
Code:
trust_entry* trust_store::trust_lookup(nsaddr_t node_id)
{
trust_entry *rp=trusthead.lh_first;
for(;rp;rp=rp->trust_link.le_next){
if(rp->node_id==node_id)
break;
}
return rp;
}
this code is the same code in route table that lookup an entry in trust table. i have checked every thing and i am sure that in this case trust table is not empty , it show the 4 first entry but after that it get "segmentation error", (in this running ,before this error ,it show 4 or 5 times all entry in the table but in this time no...!!!!)
can any one help me?!!