apps/dtnquery/dtnquery.c
changeset 65 333724f2f7cf
parent 64 1296a0283271
child 66 e1101c5d54a1
--- a/apps/dtnquery/dtnquery.c	Mon Oct 24 18:28:33 2011 +0100
+++ b/apps/dtnquery/dtnquery.c	Wed Oct 26 13:33:11 2011 +0100
@@ -94,7 +94,7 @@
     fprintf(stderr, " -h  help\n");
     fprintf(stderr, " -v  verbose\n");
 
-    return 0;
+    return DTN_SUCCESS;
 }
 
 /*******************************************************************************
@@ -161,7 +161,7 @@
     token = strtok (NULL, ",");
     if (token != NULL)  return 1;
 
-    return 0;
+    return DTN_SUCCESS;
 }
 
 /*******************************************************************************
@@ -374,10 +374,10 @@
     }
 
     // if no reply-to eid set, use the src eid
-    if (reply_eid_name == NULL)
+    if (*reply_eid_name == NULL)
         strncpy(reply_eid_name, src_eid_name, PATH_MAX);
     
-    return 0;
+    return DTN_SUCCESS;
 }
 
 /*******************************************************************************
@@ -436,9 +436,9 @@
     REQUIRE(matching_rule == BPQ_MATCHING_RULE_EXACT,
          "-u <matching rule> invalid rule\n");
     REQUIRE(bundle_expiry > 0, "-e <expiry> must be a positive integer\n");
+
+    return DTN_SUCCESS;
 #undef REQUIRE
-//todo: check this is ok
-    return 0;
 }
 
 /*******************************************************************************
@@ -587,7 +587,7 @@
     if (verbose) printf("%d byte file from [%s]: transit time=%d ms, written to '%s'\n",
            (int)fileinfo.st_size, bundle_spec.source.uri, 0, destination);
 
-    return 0;
+    return DTN_SUCCESS;
 }
 
 /*******************************************************************************
@@ -1240,6 +1240,6 @@
     dtn_close(handle);
     if (verbose) fprintf(stdout, "closed connection to dtn router...\n");
 
-    return 0;
+    return DTN_SUCCESS;
 }