rm
authorken <ken@mihrtec.com>
Sun, 9 Oct 2016 03:40:16 +0000 (20:40 -0700)
committerken <ken@mihrtec.com>
Sun, 9 Oct 2016 03:40:16 +0000 (20:40 -0700)
src/bin/tools/ockpromo-fcgi.c [deleted file]

diff --git a/src/bin/tools/ockpromo-fcgi.c b/src/bin/tools/ockpromo-fcgi.c
deleted file mode 100644 (file)
index 9ecc790..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*!@file
-  \brief   Mail router for OCKoreanMartialArts.com
-  \details This mail routing system is intended to run as a daemon for fastcgi
-           and stores usage information in a database before sending mail to the
-           administrator
-  \author  Ken
-  \date    Sept 2016
-  ----------------------------------------------------------------------------*/
-/* Standard */
-#include <stdlib.h> //atoi
-#include <string.h> //mem
-/* Third Party */
-#include <fcgi_stdio.h>
-/* Internal */
-#include <ock/ock.h>
-
-int get_body(void);
-
-int
-main
-()
-{ if (db_init())
-    return -1;
-
-  while(FCGI_Accept() >= 0)
-    { printf("Content-type: application/json\r\n\r\n");
-      printf("{ \"submission\" : ");
-      if (!get_body())
-       printf("\"fail\"");
-      printf("\"pass\"");
-      printf(" }");
-    }
-  return 0;
-}
-
-int
-get_body
-()
-{ char *lencp;
-  int   len, i;
-
-  if ((lencp = getenv("CONTENT_LENGTH")) == NULL
-      || (len = atoi(lencp)) < 1)
-    return -1;
-  for (i = 0; i < len; i++)
-    putchar(getchar());
-
-  return 0;
-}
-