diff --git a/krivine-common.c b/krivine-common.c index 262255c0f020..b84eff694c2d 100644 --- a/krivine-common.c +++ b/krivine-common.c @@ -280,8 +280,8 @@ ccnl_nfn_local_content_search(struct ccnl_relay_s *ccnl, struct ccnl_interest_s struct ccnl_content_s *c_iter; for(c_iter = ccnl->contents; c_iter; c_iter = c_iter->next){ unsigned char *md; - md = i->prefix->compcnt - c_iter->name->compcnt == 1 ? compute_ccnx_digest(c_iter->pkt) : NULL; - if(ccnl_prefix_cmp(c_iter->name, md, i->prefix, type)){ + md = c_iter->name->compcnt; //i->prefix->compcnt - c_iter->name->compcnt == 1 ? compute_ccnx_digest(c_iter->pkt) : NULL; + if(ccnl_prefix_cmp(c_iter->name, md, i->prefix, type)){ //FIXME: discuss how to compare WHAT IS MD? return c_iter; } } @@ -397,7 +397,7 @@ ccnl_nfn_global_content_search(struct ccnl_relay_s *ccnl, struct configuration_s pthread_cond_wait(&config->thread->cond, &config->thread->mutex); //local search. look if content is now available! DEBUGMSG(99,"Got signal CONTINUE\n"); - if((c = ccnl_nfn_local_content_search(ccnl, interest, CMP_MATCH)) != NULL){ + if((c = ccnl_nfn_local_content_search(ccnl, interest, CMP_EXACT)) != NULL){ DEBUGMSG(49, "Content now available: %s\n", c->content); return c; } diff --git a/krivine.c b/krivine.c index bdd548f737fc..a591623804a2 100644 --- a/krivine.c +++ b/krivine.c @@ -338,7 +338,7 @@ ccnl_nfn_handle_network_search(struct ccnl_relay_s *ccnl, struct configuration_s //search struct ccnl_interest_s *interest = ccnl_nfn_create_interest_object(ccnl, config, out, len, namecomp[0]); //FIXME: NAMECOMP[0]??? interest->from->faceid = config->thread->id; - if((c = ccnl_nfn_local_content_search(ccnl, interest, CMP_MATCH)) != NULL){ + if((c = ccnl_nfn_local_content_search(ccnl, interest, CMP_EXACT)) != NULL){ DEBUGMSG(49, "Content locally found\n"); //ccnl_interest_remove(ccnl, interest); return c; @@ -389,10 +389,9 @@ ZAM_term(struct ccnl_relay_s *ccnl, struct configuration_s *config, char *pending, *p, *cp; int len; char *prog = config->prog; - DEBUGMSG(99, "DUMMYBUF: %s \n", dummybuf); memset(dummybuf, 0, 2000); + //pop closure - if (!prog || strlen(prog) == 0) { if(config->result_stack){ return config->result_stack->content;