Browse Source

[bt-6709]fix get/snmp.cgi

balbekova 5 years ago
parent
commit
0b921869d9
1 changed files with 3 additions and 11 deletions
  1. 3 11
      modules/HTTP_Server/http_server.c

+ 3 - 11
modules/HTTP_Server/http_server.c

@@ -1156,23 +1156,15 @@ char *HTTP_SnmpParam(uint32_t reqNum, char *bufIn, char *bufOut, uint16_t lenBuf
     (void)reqNum;
 
     /* В запросе нет параметров, нужно формировать JSON ответ */
-    if (strstr(tempStr, "?_") != NULL) {
+    if (strstr(tempStr, "?_") == NULL) {
         memset(bufOut, 0, SEND_BUF_MAX_LEN);
-
-        return HTTP_GetTrapAccess(bufIn, lenBufIn, bufOut, lenBufOut);
-    }
-    /* В запросе есть параметры, нужно парсить и сохранять настройки */
-    else {
-
         if (seclevel == USER) {
             return 0;
         }
         HTTP_SetNotification(bufIn, lenBufIn);
-
-        fs_open("/snmp.html", &file);
-        *lenBufOut = file.len;
-        return file.data;
     }
+
+    return HTTP_GetTrapAccess(bufIn, lenBufIn, bufOut, lenBufOut);
 }
 
 /**