--- a/apps/dtnrespond/dtnrespond.c Tue Jan 10 15:21:56 2012 +0000
+++ b/apps/dtnrespond/dtnrespond.c Tue Jan 10 15:42:32 2012 +0000
@@ -522,10 +522,8 @@
// match query
if (atoi(matching_rule) != (int)bpq->matching_rule ||
BPQ_MATCHING_RULE_EXACT != bpq->matching_rule ||
- strlen(query) != bpq->query.query_len ||
- strncmp(query, bpq->query.query_val, bpq->query.query_len) != 0) {
-
- if (verbose) fprintf(stdout, "Line [%s] does not match\n",line);
+ strlen(query) != strlen(bpq->query.query_val) ||
+ strncmp(query, bpq->query.query_val, strlen(query)) != 0) {
continue;
}
@@ -535,7 +533,7 @@
trim_whitespace(path, trim_path, PATH_MAX);
// make sure the file exists
- if (response_path_exists(trim_path)) {
+ if (response_path_exists(trim_path) == DTN_SUCCESS) {
*found = 1;
*response_kind = (u_int) atoi(kind);
*response_expiry = (dtn_timeval_t) atoi(expiry);