added reply-to option to dtnrespond
authoraidan
Wed, 29 Jun 2011 12:44:26 +0100
changeset 20 7fd5f0de6c59
parent 19 ce4cfc1cb1b6
child 21 ea3d443fb6bc
added reply-to option to dtnrespond
apps/dtnquery/dtnquery.c
apps/dtnrespond/dtnrespond.c
--- a/apps/dtnquery/dtnquery.c	Wed Jun 29 12:23:07 2011 +0100
+++ b/apps/dtnquery/dtnquery.c	Wed Jun 29 12:44:26 2011 +0100
@@ -381,7 +381,7 @@
     }
 
     // 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;
--- a/apps/dtnrespond/dtnrespond.c	Wed Jun 29 12:23:07 2011 +0100
+++ b/apps/dtnrespond/dtnrespond.c	Wed Jun 29 12:44:26 2011 +0100
@@ -120,7 +120,7 @@
 
     while( !done )
     {
-        c = getopt(argc, argv, "l:f:n:e:i:E:A:S:P:DXFRcC1NWvhH");
+        c = getopt(argc, argv, "l:f:n:r:e:i:E:A:S:P:DXFRcC1NWvhH");
         switch(c)
         {
         case 'l':
@@ -223,7 +223,7 @@
     }
 
     // if no reply-to eid set, use the local eid
-    if (reply_eid_name == NULL)
+    if (*reply_eid_name == NULL)
         strncpy(reply_eid_name, local_eid_name, PATH_MAX);
 
     return 0;