encoding+mgmt: fix definition of INVALID_FACE_ID

Change-Id: I220b183a6f1d007d2c71fcb6491a2c4a487b7673
Refs: #3172
diff --git a/src/mgmt/nfd/control-command.cpp b/src/mgmt/nfd/control-command.cpp
index 2a6eda7..96bba6c 100644
--- a/src/mgmt/nfd/control-command.cpp
+++ b/src/mgmt/nfd/control-command.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -82,13 +82,11 @@
     bool isPresent = presentFields[i];
     if (m_required[i]) {
       if (!isPresent) {
-        BOOST_THROW_EXCEPTION(ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is required but "
-                                            "missing"));
+        BOOST_THROW_EXCEPTION(ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is required but missing"));
       }
     }
     else if (isPresent && !m_optional[i]) {
-      BOOST_THROW_EXCEPTION(ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is forbidden but "
-                                          "present"));
+      BOOST_THROW_EXCEPTION(ArgumentError(CONTROL_PARAMETER_FIELD[i] + " is forbidden but present"));
     }
   }
 }
@@ -111,8 +109,6 @@
 void
 FaceCreateCommand::applyDefaultsToRequest(ControlParameters& parameters) const
 {
-  parameters.setFaceId(0);
-
   if (!parameters.hasFacePersistency()) {
     parameters.setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT);
   }
@@ -133,8 +129,8 @@
 {
   this->ControlCommand::validateResponse(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }
 
@@ -175,8 +171,8 @@
 {
   this->ControlCommand::validateResponse(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }
 
@@ -193,8 +189,8 @@
 {
   this->ControlCommand::validateRequest(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }
 
@@ -271,8 +267,8 @@
 {
   this->ControlCommand::validateResponse(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }
 
@@ -300,8 +296,8 @@
 {
   this->ControlCommand::validateResponse(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }
 
@@ -379,8 +375,8 @@
 {
   this->ControlCommand::validateResponse(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }
 
@@ -413,8 +409,8 @@
 {
   this->ControlCommand::validateResponse(parameters);
 
-  if (parameters.getFaceId() == 0) {
-    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must not be zero"));
+  if (parameters.getFaceId() == INVALID_FACE_ID) {
+    BOOST_THROW_EXCEPTION(ArgumentError("FaceId must be valid"));
   }
 }