spacing
[iotcloud.git] / src / server / iotcloud.cpp
index 2f82674b0071e66508123181bf77beea11aa6bf9..e7eb2d3cc941f055c066d70ce1e44d2017cdfff2 100644 (file)
@@ -5,34 +5,34 @@ using namespace std;
 
 
 int main(void) {
-    // Backup the stdio streambufs
-    streambuf * cin_streambuf  = cin.rdbuf();
-    streambuf * cout_streambuf = cout.rdbuf();
-    streambuf * cerr_streambuf = cerr.rdbuf();
-
-    FCGX_Request request;
-
-    FCGX_Init();
-    FCGX_InitRequest(&request, 0, 0);
-
-    while (FCGX_Accept_r(&request) == 0) {
-      fcgi_streambuf cin_fcgi_streambuf(request.in);
-      fcgi_streambuf cout_fcgi_streambuf(request.out);
-      fcgi_streambuf cerr_fcgi_streambuf(request.err);
-      
-      cin.rdbuf(&cin_fcgi_streambuf);
-      cout.rdbuf(&cout_fcgi_streambuf);
-      cerr.rdbuf(&cerr_fcgi_streambuf);
-      IoTQuery * iotquery=new IoTQuery(&request);
-      iotquery->processQuery();
-      delete iotquery;
-    } 
-
-    // restore stdio streambufs
-    cin.rdbuf(cin_streambuf);
-    cout.rdbuf(cout_streambuf);
-    cerr.rdbuf(cerr_streambuf);
-
-    return 0;
+       // Backup the stdio streambufs
+       streambuf * cin_streambuf  = cin.rdbuf();
+       streambuf * cout_streambuf = cout.rdbuf();
+       streambuf * cerr_streambuf = cerr.rdbuf();
+
+       FCGX_Request request;
+
+       FCGX_Init();
+       FCGX_InitRequest(&request, 0, 0);
+
+       while (FCGX_Accept_r(&request) == 0) {
+               fcgi_streambuf cin_fcgi_streambuf(request.in);
+               fcgi_streambuf cout_fcgi_streambuf(request.out);
+               fcgi_streambuf cerr_fcgi_streambuf(request.err);
+
+               cin.rdbuf(&cin_fcgi_streambuf);
+               cout.rdbuf(&cout_fcgi_streambuf);
+               cerr.rdbuf(&cerr_fcgi_streambuf);
+               IoTQuery * iotquery=new IoTQuery(&request);
+               iotquery->processQuery();
+               delete iotquery;
+       }
+
+       // restore stdio streambufs
+       cin.rdbuf(cin_streambuf);
+       cout.rdbuf(cout_streambuf);
+       cerr.rdbuf(cerr_streambuf);
+
+       return 0;
 }