fix route expiration time
Change-Id: I6de07202c58d828d3564e6be3efe545ef912840f
diff --git a/ndn/apps/nfdc.py b/ndn/apps/nfdc.py
index 4b28a64..41d479f 100644
--- a/ndn/apps/nfdc.py
+++ b/ndn/apps/nfdc.py
@@ -35,8 +35,8 @@
@staticmethod
def registerRoute(node, namePrefix, remoteNode, protocol=PROTOCOL_UDP, origin=255, cost=0,
- inheritFlag=True, captureFlag=False, expirationInMillis=0):
- cmd = ("nfdc route add {} {}://{} origin {} cost {} {}{}{}").format(
+ inheritFlag=True, captureFlag=False, expirationInMillis=None):
+ cmd = ("nfdc route add {} {}://{} origin {} cost {} {}{}").format(
namePrefix,
protocol,
remoteNode,
@@ -44,8 +44,9 @@
cost,
"no-inherit " if not inheritFlag else "",
"capture " if captureFlag else "",
- "expires {}".format(expirationInMillis)
+ "expires {}".format(expirationInMillis) if expirationInMillis else ""
)
+
debug(node.cmd(cmd))
time.sleep(0.5)