apps/dtnrespond/dtnrespond.c
changeset 71 fdb6e00dacc9
parent 70 51693ac735a5
child 76 aeabfd54d3b6
equal deleted inserted replaced
70:51693ac735a5 71:fdb6e00dacc9
   520 
   520 
   521 
   521 
   522     	// match query
   522     	// match query
   523         if (atoi(matching_rule) != (int)bpq->matching_rule		||
   523         if (atoi(matching_rule) != (int)bpq->matching_rule		||
   524 			BPQ_MATCHING_RULE_EXACT != bpq->matching_rule		||
   524 			BPQ_MATCHING_RULE_EXACT != bpq->matching_rule		||
   525 			strlen(query) != bpq->query.query_len 				||
   525 			strlen(query) != strlen(bpq->query.query_val)		||
   526         	strncmp(query, bpq->query.query_val, bpq->query.query_len) != 0) {
   526         	strncmp(query, bpq->query.query_val, strlen(query)) != 0) {
   527 
       
   528             if (verbose) fprintf(stdout, "Line [%s] does not match\n",line);
       
   529 
   527 
   530         	continue;
   528         	continue;
   531         }
   529         }
   532 
   530 
   533 
   531 
   534         // trim whitespace from response path
   532         // trim whitespace from response path
   535         trim_whitespace(path, trim_path, PATH_MAX);
   533         trim_whitespace(path, trim_path, PATH_MAX);
   536 
   534 
   537         // make sure the file exists
   535         // make sure the file exists
   538         if (response_path_exists(trim_path)) {
   536         if (response_path_exists(trim_path) == DTN_SUCCESS) {
   539         	*found = 1;
   537         	*found = 1;
   540         	*response_kind = (u_int) atoi(kind);
   538         	*response_kind = (u_int) atoi(kind);
   541         	*response_expiry = (dtn_timeval_t) atoi(expiry);
   539         	*response_expiry = (dtn_timeval_t) atoi(expiry);
   542         	strncpy(response_path, trim_path, response_path_len);
   540         	strncpy(response_path, trim_path, response_path_len);
   543 
   541