From: ken Date: Sun, 9 Oct 2016 03:40:16 +0000 (-0700) Subject: rm X-Git-Url: https://git.kengrimes.com/?p=henge%2Fwebcc.git;a=commitdiff_plain;h=0b3add55627e67ea616621c34a0c41908d953c8e rm --- diff --git a/src/bin/tools/ockpromo-fcgi.c b/src/bin/tools/ockpromo-fcgi.c deleted file mode 100644 index 9ecc790..0000000 --- a/src/bin/tools/ockpromo-fcgi.c +++ /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 //atoi -#include //mem -/* Third Party */ -#include -/* Internal */ -#include - -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; -} -