From 7637a3dcd0cf694bc6b9daae4fea341d4ced1a5f Mon Sep 17 00:00:00 2001 From: Mr-DaveDev Date: Tue, 2 Jan 2018 17:56:36 -0700 Subject: [PATCH] Update Web Control Update the Motion webcontrol to reference the project documentation --- webhttpd.c | 51 +++++++++++++++++++++++++++++++++++++++++---------- webhttpd.h | 2 +- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/webhttpd.c b/webhttpd.c index 0984af64..acd2e064 100644 --- a/webhttpd.c +++ b/webhttpd.c @@ -444,10 +444,22 @@ static unsigned int config(char *pointer, char *res, unsigned int length_uri, { char question='\0'; char command[256] = {'\0'}; + char webparms[40]; unsigned int i; struct context **cnt = userdata; warningkill = sscanf(pointer, "%255[a-z]%c", command , &question); + + if (cnt[0]->conf.webcontrol_parms == 0){ + sprintf(webparms,"%s","No Configuration Options"); + } else if (cnt[0]->conf.webcontrol_parms == 1){ + sprintf(webparms,"%s","Limited Configuration Options"); + } else if (cnt[0]->conf.webcontrol_parms == 2){ + sprintf(webparms,"%s","Advanced Configuration Options"); + } else{ + sprintf(webparms,"%s","Restricted Configuration Options"); + } + if (!strcmp(command, "list")) { pointer = pointer + 4; length_uri = length_uri - 4; @@ -457,11 +469,14 @@ static unsigned int config(char *pointer, char *res, unsigned int length_uri, /*call list*/ if (cnt[0]->conf.webcontrol_html_output) { send_template_ini_client(client_socket, ini_template); - sprintf(res, "<– back

\nCamera %d%s%s\n