Explorar el Código

Return test ID when we post a test.

Adam Ierymenko hace 9 años
padre
commit
dc3d899e70
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      controller/SqliteNetworkController.cpp

+ 5 - 0
controller/SqliteNetworkController.cpp

@@ -608,6 +608,11 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST(
 
 					_node->circuitTestBegin(test,&(SqliteNetworkController::_circuitTestCallback));
 
+					char json[1024];
+					Utils::snprintf(json,sizeof(json),"{\"testId\":\"%.16llx\"}",test->testId);
+					responseBody = json;
+					responseContentType = "application/json";
+
 					return 200;
 				} // else 404