From 0d0af07ce969c9dd5a416c3b9f466ab0139a57e3 Mon Sep 17 00:00:00 2001 From: Kees Bos Date: Thu, 11 Jun 2015 11:49:13 +0200 Subject: Get deletion of networks in controller going Multiple statements in a sqlite3_prepare_v2 is not usable. Only the first statement will be executed. Since the schema now uses 'ON DELETE CASCADE', there's only one statement needed. If multiple statements are needed, there should be either multiple sqlite3_prepare_v2 calls be used or the sqlite3_exec function. --- service/ControlPlane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'service/ControlPlane.cpp') diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index 71b3fd3f..3ff9b7a2 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -525,7 +525,7 @@ unsigned int ControlPlane::handleRequest( } else { #ifdef ZT_ENABLE_NETWORK_CONTROLLER if (_controller) - _controller->handleControlPlaneHttpDELETE(std::vector(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType); + scode = _controller->handleControlPlaneHttpDELETE(std::vector(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType); else scode = 404; #else scode = 404; -- cgit v1.2.3