Przeglądaj źródła

1、移除appweb
2、添加文件导出接口
3、将web和ws的绑定ip改为0.0.0.0

guohui 2 lat temu
rodzic
commit
c99dbfe759
46 zmienionych plików z 139 dodań i 68183 usunięć
  1. 0 43
      output/t113i/root/run/app/appweb.conf
  2. BIN
      output/t113i/root/run/app/lib/libappweb.so
  3. BIN
      output/t113i/root/run/app/lib/libesp.so
  4. BIN
      output/t113i/root/run/app/lib/libhttp.so
  5. BIN
      output/t113i/root/run/app/lib/libmpr.so
  6. 3 2
      pro/CMakeLists.txt
  7. 0 304
      pro/appweb/inc/appweb.h
  8. 0 16
      pro/appweb/inc/customize.h
  9. 0 193
      pro/appweb/inc/embedtls.h
  10. 0 4435
      pro/appweb/inc/esp.h
  11. 0 9013
      pro/appweb/inc/http.h
  12. 0 36842
      pro/appweb/inc/mbedtls.h
  13. 0 387
      pro/appweb/inc/me.h
  14. 0 63
      pro/appweb/inc/mpr-version.h
  15. 0 10679
      pro/appweb/inc/mpr.h
  16. 0 1424
      pro/appweb/inc/osdep.h
  17. 0 348
      pro/appweb/inc/pcre.h
  18. BIN
      pro/appweb/lib/appman
  19. BIN
      pro/appweb/lib/appweb
  20. BIN
      pro/appweb/lib/appweb-esp
  21. BIN
      pro/appweb/lib/authpass
  22. 0 28
      pro/appweb/lib/ca.crt
  23. 0 27
      pro/appweb/lib/ca.key
  24. 0 16
      pro/appweb/lib/ec.crt
  25. 0 8
      pro/appweb/lib/ec.key
  26. 0 50
      pro/appweb/lib/esp-compile.json
  27. BIN
      pro/appweb/lib/http
  28. BIN
      pro/appweb/lib/libappweb.so
  29. BIN
      pro/appweb/lib/libesp.so
  30. BIN
      pro/appweb/lib/libhttp.so
  31. BIN
      pro/appweb/lib/libmbedtls.a
  32. BIN
      pro/appweb/lib/libmpr-mbedtls.a
  33. BIN
      pro/appweb/lib/libmpr-version.a
  34. BIN
      pro/appweb/lib/libmpr.so
  35. BIN
      pro/appweb/lib/libpcre.so
  36. BIN
      pro/appweb/lib/makerom
  37. 0 3952
      pro/appweb/lib/roots.crt
  38. 0 24
      pro/appweb/lib/self.crt
  39. 0 27
      pro/appweb/lib/self.key
  40. BIN
      pro/appweb/lib/server
  41. 0 24
      pro/appweb/lib/test.crt
  42. 0 27
      pro/appweb/lib/test.key
  43. 0 3
      pro/appweb/lib/vcvars.bat
  44. 81 211
      pro/src/appweb_handle.c
  45. 20 16
      pro/src/snmp_nms.c
  46. 35 21
      pro/src/websocket_handle.c

+ 0 - 43
output/t113i/root/run/app/appweb.conf

@@ -1,43 +0,0 @@
-#
-#   appweb.conf - Configuration for simple action sample
-#
-
-Listen 80
-AddHandler fileHandler
-# AddHandler espHandler esp
-
-Documents ../web
-UploadDir /root/dl
-LimitUpload 100MB
-
-<Route ^/action/>
-    SetHandler actionHandler
-</Route>
-
-
-# <Route /systemConfiguration>
-#     SetHandler actionHandler
-# </Route>
-
-<Route /login>
-    SetHandler actionHandler
-</Route>
-
-<Route /logout>
-    SetHandler actionHandler
-</Route>
-
-<Route /getInfo>
-    SetHandler actionHandler
-</Route>
-
-<Route /getRouters>
-    SetHandler actionHandler
-</Route>
-
-<Route ^/pdu/>
-    SetHandler actionHandler
-</Route>
-
-
-

BIN
output/t113i/root/run/app/lib/libappweb.so


BIN
output/t113i/root/run/app/lib/libesp.so


BIN
output/t113i/root/run/app/lib/libhttp.so


BIN
output/t113i/root/run/app/lib/libmpr.so


+ 3 - 2
pro/CMakeLists.txt

@@ -12,7 +12,7 @@ project (pdu_ctrl_app)
 
 add_definitions(-DSHELL_CFG_USER="shell_cfg_user.h")
 
-include_directories (${PROJECT_SOURCE_DIR}/modbus/inc ${PROJECT_SOURCE_DIR}/sqlite/inc ${PROJECT_SOURCE_DIR}/appweb/inc)
+include_directories (${PROJECT_SOURCE_DIR}/modbus/inc ${PROJECT_SOURCE_DIR}/sqlite/inc)
 
 include_directories (${PROJECT_SOURCE_DIR}/easylogger/os/inc)
 include_directories (${PROJECT_SOURCE_DIR}/easylogger/inc)
@@ -75,6 +75,7 @@ set(PDU_SRC_LIST
     ${PROJECT_SOURCE_DIR}/src/cascade_slave.c
 	${PROJECT_SOURCE_DIR}/src/upg.c
 	${PROJECT_SOURCE_DIR}/src/file.c
+#	${PROJECT_SOURCE_DIR}/src/snmp_nms.c
 	${PROJECT_SOURCE_DIR}/src/main.c
 
 	${PROJECT_SOURCE_DIR}/src/language_hashmap.c
@@ -93,7 +94,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NO_WARNNING_FLAGS} -Werror")
 
 
 add_executable(smartPDU ${PDU_SRC_LIST})
-target_link_libraries(smartPDU -lappweb -lesp -lhttp -lmpr -lpcre -lsqlite3 -lmodbus -lc -ldl -lpthread -lnetsnmp -lnetsnmpagent -lrt)
+target_link_libraries(smartPDU -lpcre -lsqlite3 -lmodbus -lc -ldl -lpthread -lnetsnmp -lnetsnmpagent -lrt)
 
 
 set(SRC_DIR  ${PROJECT_BINARY_DIR})

+ 0 - 304
pro/appweb/inc/appweb.h

@@ -1,304 +0,0 @@
-/*
-    appweb.h -- Embedthis Appweb HTTP Web Server header
-
-    Copyright (c) All Rights Reserved. See details at the end of the file.
- */
-
-#ifndef _h_APPWEB
-#define _h_APPWEB 1
-
-/********************************* Includes ***********************************/
-
-#include    "osdep.h"
-#include    "mpr.h"
-#include    "http.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/********************************* Tunables ***********************************/
-
-#define MA_UNLOAD_TIMEOUT       "5mins"     /**< Default module inactivity timeout */
-
-/********************************** Defines ***********************************/
-/*
-    Pack defaults
- */
-#ifndef ME_COM_CGI
-    #define ME_COM_CGI 0
-#endif
-#ifndef ME_COM_EJSCRIPT
-    #define ME_COM_EJSCRIPT 0
-#endif
-#ifndef ME_COM_ESP
-    #define ME_COM_ESP 0
-#endif
-#ifndef ME_COM_FAST
-    #define ME_COM_FAST 0
-#endif
-#ifndef ME_COM_MDB
-    #define ME_COM_MDB 0
-#endif
-#ifndef ME_COM_PHP
-    #define ME_COM_PHP 0
-#endif
-#ifndef ME_COM_PROXY
-    #define ME_COM_PROXY 0
-#endif
-#ifndef ME_COM_SDB
-    #define ME_COM_SDB 0
-#endif
-#ifndef ME_COM_SSL
-    #define ME_COM_SSL 0
-#endif
-#ifndef ME_COM_TEST
-    #define ME_COM_TEST 0
-#endif
-
-/******************************************************************************/
-/*
-    State flags
- */
-#define MA_PARSE_NON_SERVER     0x1     /**< Command file being parsed by a utility program */
-
-/**
-    Current configuration parse state
-    @stability Evolving
-    @defgroup MaState MaState
-    @see MaDirective MaState maAddDirective maArchiveLog maPopState maPushState maTokenize
-    @stability Evolving
- */
-typedef struct MaState {
-    HttpHost    *host;                  /**< Current host */
-    HttpAuth    *auth;                  /**< Quick alias for route->auth */
-    HttpRoute   *route;                 /**< Current route */
-    MprFile     *file;                  /**< Config file handle */
-    char        *key;                   /**< Current directive being parsed */
-    char        *configDir;             /**< Directory containing config file */
-    char        *filename;              /**< Config file name */
-    char        *endpoints;             /**< Virtual host endpoints */
-    char        *data;                  /**< Config data (managed) */
-    int         lineNumber;             /**< Current line number */
-    int         enabled;                /**< True if the current block is enabled */
-    int         flags;                  /**< Parsing flags */
-    struct MaState *prev;               /**< Previous (inherited) state */
-    struct MaState *top;                /**< Top level state */
-    struct MaState *current;            /**< Current state */
-} MaState;
-
-/**
-    Appweb configuration file directive parsing callback function
-    @description Directive callbacks are invoked to parse a directive. Directive callbacks are registered using
-        #maAddDirective.
-    @param state Current config parse state.
-    @param key Directive key name
-    @param value Directive key value
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Evolving
- */
-typedef int (MaDirective)(MaState *state, cchar *key, cchar *value);
-
-/**
-    Define a new appweb configuration file directive
-    @description The appweb configuration file parse is extensible. New directives can be registered by this call. When
-        encountered in the config file, the given callback proc will be invoked to parse.
-    @param directive Directive name
-    @param proc Directive callback procedure of the type #MaDirective.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC void maAddDirective(cchar *directive, MaDirective proc);
-
-/**
-    Configure a web server
-    @description This will configure a web server based on either a configuration file or using the supplied
-        IP address and port.
-    @param configFile File name of the Appweb configuration file (appweb.conf) that defines the web server configuration.
-    @param home Admin directory for the server. This overrides the value in the config file.
-    @param documents Default directory for web documents to serve. This overrides the value in the config file.
-    @param ip IP address to listen on. This overrides the value specified in the config file.
-    @param port Port address to listen on. This overrides the value specified in the config file.
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC int maConfigureServer(cchar *configFile, cchar *home, cchar *documents, cchar *ip, int port);
-
-/**
-    Get the argument in a directive
-    @description Break into arguments. Args may be quoted. An outer quoting of the entire arg is removed.
-    @param s String to examine
-    @param tok Next token reference
-    @return Reference to the next token. (Not allocate
-    @ingroup MaState
-    @stability Evolving
-*/
-PUBLIC char *maGetNextArg(char *s, char **tok);
-
-/**
-    Load an appweb module
-    @description Load an appweb module. If the module is already loaded, this call will return successfully without
-        reloading. Modules can be dynamically loaded or may also be pre-loaded using static linking.
-    @param name User name. Must be defined in the system password file.
-    @param libname Library path name
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC int maLoadModule(cchar *name, cchar *libname);
-
-/**
-    Load default modules
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Prototype
- */
-PUBLIC int maLoadModules(void);
-
-/**
-    Parse an Appweb configuration file
-    @description Parse the configuration file and configure the server. This creates a default host and route
-        and then configures the server based on config file directives.
-    @param path Configuration file pathname.
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC int maParseConfig(cchar *path);
-
-/**
-    Parse a configuration file
-    @param state Current state level object
-    @param path Filename to parse
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Prototype
- */
-PUBLIC int maParseFile(MaState *state, cchar *path);
-
-/**
-    Pop the state
-    @description This is used when parsing config files to handle nested include files and block level directives
-    @param state Current state
-    @return The next lower level state object
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC MaState *maPopState(MaState *state);
-
-/**
-    Push the state
-    @description This is used when parsing config files to handle nested include files and block level directives
-    @param state Current state
-    @return The state passed as a parameter which becomes the new top level state
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC MaState *maPushState(MaState *state);
-
-/**
-    Tokenize a string based on route data
-    @description This is a utility routine to parse a string into tokens given a format specifier.
-    Mandatory tokens can be specified with "%" format specifier. Optional tokens are specified with "?" format.
-    Values wrapped in quotes will have the outermost quotes trimmed.
-    @param state Current config parsing state
-    @param str String to expand
-    @param fmt Format string specifier
-    Supported tokens:
-    <ul>
-    <li>%B - Boolean. Parses: on/off, true/false, yes/no.</li>
-    <li>%N - Number. Parses numbers in base 10.</li>
-    <li>%S - String. Removes quotes.</li>
-    <li>%P - Path string. Removes quotes and expands ${PathVars}. Resolved relative to host->dir (ServerRoot).</li>
-    <li>%W - Parse words into a list</li>
-    <li>%! - Optional negate. Set value to HTTP_ROUTE_NOT present, otherwise zero.</li>
-    </ul>
-    @return True if the string can be successfully parsed.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC bool maTokenize(MaState *state, cchar *str, cchar *fmt, ...);
-
-/**
-    Create and run a simple web server listening on a single IP address.
-    @description Create a simple web server without using a configuration file. The server is created to listen on
-        the specified IP address and port. This routine provides a one-line embedding of Appweb. If you want to
-        use a config file, try the #maRunWebServer instead.
-    @param ip IP address on which to listen. Set to "0.0.0.0" to listen on all interfaces.
-    @param port Port number to listen to
-    @param home Home directory for the web server
-    @param documents Directory containing the documents to serve.
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC int maRunSimpleWebServer(cchar *ip, int port, cchar *home, cchar *documents);
-
-/**
-    Create and run a web server based on a configuration file
-    @description Create a web server configuration based on the supplied config file. This routine provides
-        a one-line embedding of Appweb. If you don't want to use a config file, try the #maRunSimpleWebServer
-        instead.
-    @param configFile File name of the Appweb configuration file (appweb.conf) that defines the web server configuration.
-    @return Zero if successful, otherwise a negative Mpr error code. See the Appweb log for diagnostics.
-    @ingroup MaState
-    @stability Evolving
- */
-PUBLIC int maRunWebServer(cchar *configFile);
-
-/**
-    Save the authorization configuration to a file
-    AuthFile schema:
-        User name password abilities...
-        Role name abilities...
-    @param auth Auth object allocated by #httpCreateAuth.
-    @param path Path name of file
-    @return "Zero" if successful, otherwise a negative MPR error code
-    @ingroup HttpAuth
-    @stability Internal
-    @internal
- */
-PUBLIC int maWriteAuthFile(HttpAuth *auth, char *path);
-
-/*
-    Internal
- */
-#if ME_COM_CGI
-    PUBLIC int httpCgiInit(Http *http, MprModule *mp);
-#endif
-#if ME_COM_FAST
-    PUBLIC int httpFastInit(Http *http, MprModule *mp);
-#endif
-#if ME_COM_ESP
-    PUBLIC int httpEspInit(Http *http, MprModule *mp);
-#endif
-#if ME_COM_PROXY
-    PUBLIC int httpProxyInit(Http *http, MprModule *mp);
-#endif
-#if ME_COM_TEST
-    PUBLIC int httpTestInit(Http *http, MprModule *mp);
-#endif
-
-PUBLIC int maTraceDirective(MaState *state, HttpTrace *trace, cchar *key, cchar *value);
-PUBLIC int maTraceLogDirective(MaState *state, HttpTrace *trace, cchar *key, cchar *value);
-
-#ifdef __cplusplus
-} /* extern C */
-#endif
-
-/*
-    Permit overrides
- */
-#if ME_CUSTOMIZE
- #include "customize.h"
-#endif
-
-#endif /* _h_APPWEB */
-
-/*
-    Copyright (c) Embedthis Software. All Rights Reserved.
-    This software is distributed under a commercial license. Consult the LICENSE.md
-    distributed with this software for full details and copyrights.
- */

+ 0 - 16
pro/appweb/inc/customize.h

@@ -1,16 +0,0 @@
-/*
-    customize.h -- Place to override standard product defintions
- */
-
-#ifndef _h_CUSTOMIZE_h
-#define _h_CUSTOMIZE_h 1
-
-/*
-    Override definitions here. This file is included after all other headers are parsed.
-
-    If you require function name remapping in ESP, do so here. Change the "xx_" to any 
-    unique prefix you require. Then use that name in ESP pages and controllers.
-
-    #define script xx_script
- */
-#endif /* _h_CUSTOMIZE_h */

+ 0 - 193
pro/appweb/inc/embedtls.h

@@ -1,193 +0,0 @@
-/*
-    embedtls.h - MbedTLS customization Header
-
-    Override mbedtls-config.h settings
- */
-
-#ifndef _h_EMBEDTLS
-#define _h_EMBEDTLS 1
-
-#include "osdep.h"
-
-#if ME_UNIX_LIKE
-    #define MBEDTLS_DEPRECATED_WARNING
-#endif
-#define MBEDTLS_DEPRECATED_REMOVED
-#undef  MBEDTLS_SELF_TEST
-
-#if ME_COM_MPR || ME_MPR_PRODUCT || ME_MULTITHREAD
-    #define MBEDTLS_THREADING_C
-    #define MBEDTLS_THREADING_ALT
-    typedef struct MprMutex* mbedtls_threading_mutex_t;
-#endif
-
-#if ME_DEBUG
-    #define MBEDTLS_SSL_DEBUG_ALL
-    #define MBEDTLS_DEBUG_C
-#endif
-#if ME_CPU_ARCH == ME_CPU_X86 || ME_CPU_ARCH == ME_CPU_X64
-    #define MBEDTLS_HAVE_SSE2
-#endif
-
-/*
-    Map MakeMe configuration into MbedTLS defines.
-    If mbedtls.NAME is defined, then override the MbedTLS definition from config.h
-    mbedtls.compact defines an optimized general compact/embedded configuration.
- */
-#if ME_MBEDTLS_COMPACT
-    #undef MBEDTLS_ARC4_C
-    #undef MBEDTLS_AES_ROM_TABLES
-    #undef MBEDTLS_BLOWFISH_C
-    #undef MBEDTLS_CAMELLIA_C
-    #undef MBEDTLS_DES_C
-    #undef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
-    #undef MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-    #undef MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
-    #undef MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-    #undef MBEDTLS_PADLOCK_C
-    #undef MBEDTLS_PEM_WRITE_C
-    #undef MBEDTLS_RIPEMD160_C
-    #undef MBEDTLS_SSL3
-    #undef MBEDTLS_SSL_PROTO_DTLS
-    #undef MBEDTLS_SSL_DTLS_ANTI_REPLAY
-    #undef MBEDTLS_SSL_DTLS_HELLO_VERIFY
-    #undef MBEDTLS_SSL_DTLS_BADMAC_LIMIT
-    #undef MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
-    #undef MBEDTLS_TIMING_C
-    #undef MBEDTLS_VERSION_C
-    #undef MBEDTLS_VERSION_FEATURES
-    #undef MBEDTLS_XTEA_C
-    #undef MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
-    #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
-#endif
-
-/*
-    Feature selection based on main.me settings.mbedtls configuration.
- */
-#if ME_MBEDTLS_AES_ROM_TABLES
-    #define MBEDTLS_AES_ROM_TABLES
-#elif defined(ME_MBEDTLS_AES_ROM_TABLES) && ME_MBEDTLS_AES_ROM_TABLES == 0
-    #undef MBEDTLS_AES_ROM_TABLES
-#endif
-
-#if ME_MBEDTLS_ARC4
-    #define MBEDTLS_ARC4_C
-#elif defined(ME_MBEDTLS_ARC4) && ME_MBEDTLS_ARC4 == 0
-    #undef MBEDTLS_ARC4_C
-    #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
-#endif
-
-#if ME_MBEDTLS_CAMELLIA
-    #define MBEDTLS_CAMELLIA_C
-#elif defined(ME_MBEDTLS_CAMELLIA) && ME_MBEDTLS_CAMELLIA == 0
-    #undef MBEDTLS_CAMELLIA_C
-#endif
-
-#if ME_MBEDTLS_CBC
-    #define MBEDTLS_CIPHER_MODE_CBC
-#elif defined(ME_MBEDTLS_CBC) && ME_MBEDTLS_CBC == 0
-    #undef MBEDTLS_CIPHER_MODE_CBC
-#endif
-
-#if ME_MBEDTLS_CCM
-    #define MBEDTLS_CCM_C
-#elif defined(ME_MBEDTLS_CCM) && ME_MBEDTLS_CCM == 0
-    #undef MBEDTLS_CCM_C
-#endif
-
-#if ME_MBEDTLS_DES
-    #define MBEDTLS_DES_C
-#elif defined(ME_MBEDTLS_DES) && ME_MBEDTLS_DES == 0
-    #undef MBEDTLS_DES_C
-#endif
-
-#if ME_MBEDTLS_PADLOCK
-    #define MBEDTLS_PADLOCK_C
-#elif defined(ME_MBEDTLS_PADLOCK) && ME_MBEDTLS_PADLOCK == 0
-    #undef MBEDTLS_PADLOCK_C
-#endif
-
-#if ME_MBEDTLS_PSK
-    #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
-    #define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-    #define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
-    #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-#elif defined(ME_MBEDTLS_PSK) && ME_MBEDTLS_PSK == 0
-    #undef MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
-    #undef MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-    #undef MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
-    #undef MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-#endif
-
-#if ME_MBEDTLS_XTEA
-    #define MBEDTLS_XTEA_C
-#elif defined(ME_MBEDTLS_XTEA) && ME_MBEDTLS_XTEA == 0
-    #undef MBEDTLS_XTEA_C
-#endif
-
-#ifndef MBEDTLS_SSL_CIPHERSUITES
-    /*
-        Modified to push down to remove obsolete SHA-1 ciphers
-     */
-    #define MBEDTLS_SSL_CIPHERSUITES \
-    \
-    /* All AES-256 ephemeral suites */ \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \
-    MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, \
-    MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, \
-    \
-    /* All AES-128 ephemeral suites */ \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, \
-    MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, \
-    MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, \
-    \
-    /* All AES-256 suites */ \
-    MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, \
-    MBEDTLS_TLS_RSA_WITH_AES_256_CCM, \
-    MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, \
-    MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, \
-    MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, \
-    MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, \
-    MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, \
-    MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, \
-    \
-    /* All AES-128 suites */ \
-    MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, \
-    MBEDTLS_TLS_RSA_WITH_AES_128_CCM, \
-    MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, \
-    MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, \
-    MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, \
-    MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, \
-    MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, \
-    MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, \
-    \
-    /* Obsolete Compatibility suites  */ \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, \
-    MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, \
-    MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, \
-    MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, \
-    MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, \
-    MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, \
-    MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, \
-    MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, \
-    MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, \
-    MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, \
-    MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
-#endif
-
-#endif /* _h_EMBEDTLS */

Plik diff jest za duży
+ 0 - 4435
pro/appweb/inc/esp.h


Plik diff jest za duży
+ 0 - 9013
pro/appweb/inc/http.h


Plik diff jest za duży
+ 0 - 36842
pro/appweb/inc/mbedtls.h


+ 0 - 387
pro/appweb/inc/me.h

@@ -1,387 +0,0 @@
-/*
-    me.h -- MakeMe Configure Header for linux-x86-default
-
-    This header is created by Me during configuration. To change settings, re-run
-    configure or define variables in your Makefile to override these default values.
- */
-
-/* Settings */
-#ifndef ME_AUTHOR
-    #define ME_AUTHOR "Embedthis Software"
-#endif
-#ifndef ME_CERTS_BITS
-    #define ME_CERTS_BITS 2048
-#endif
-#ifndef ME_CERTS_DAYS
-    #define ME_CERTS_DAYS 3650
-#endif
-#ifndef ME_CERTS_GENDH
-    #define ME_CERTS_GENDH 1
-#endif
-#ifndef ME_COMPANY
-    #define ME_COMPANY "embedthis"
-#endif
-#ifndef ME_COMPAT
-    #define ME_COMPAT 1
-#endif
-#ifndef ME_COMPATIBLE
-    #define ME_COMPATIBLE "8.3"
-#endif
-#ifndef ME_COMPILER_FORTIFY
-    #define ME_COMPILER_FORTIFY 1
-#endif
-#ifndef ME_COMPILER_HAS_ATOMIC
-    #define ME_COMPILER_HAS_ATOMIC 0
-#endif
-#ifndef ME_COMPILER_HAS_ATOMIC64
-    #define ME_COMPILER_HAS_ATOMIC64 0
-#endif
-#ifndef ME_COMPILER_HAS_DOUBLE_BRACES
-    #define ME_COMPILER_HAS_DOUBLE_BRACES 0
-#endif
-#ifndef ME_COMPILER_HAS_DYN_LOAD
-    #define ME_COMPILER_HAS_DYN_LOAD 1
-#endif
-#ifndef ME_COMPILER_HAS_LIB_EDIT
-    #define ME_COMPILER_HAS_LIB_EDIT 0
-#endif
-#ifndef ME_COMPILER_HAS_LIB_RT
-    #define ME_COMPILER_HAS_LIB_RT 1
-#endif
-#ifndef ME_COMPILER_HAS_MMU
-    #define ME_COMPILER_HAS_MMU 1
-#endif
-#ifndef ME_COMPILER_HAS_MTUNE
-    #define ME_COMPILER_HAS_MTUNE 1
-#endif
-#ifndef ME_COMPILER_HAS_PAM
-    #define ME_COMPILER_HAS_PAM 0
-#endif
-#ifndef ME_COMPILER_HAS_STACK_PROTECTOR
-    #define ME_COMPILER_HAS_STACK_PROTECTOR 1
-#endif
-#ifndef ME_COMPILER_HAS_SYNC
-    #define ME_COMPILER_HAS_SYNC 1
-#endif
-#ifndef ME_COMPILER_HAS_SYNC64
-    #define ME_COMPILER_HAS_SYNC64 1
-#endif
-#ifndef ME_COMPILER_HAS_SYNC_CAS
-    #define ME_COMPILER_HAS_SYNC_CAS 0
-#endif
-#ifndef ME_COMPILER_HAS_UNNAMED_UNIONS
-    #define ME_COMPILER_HAS_UNNAMED_UNIONS 1
-#endif
-#ifndef ME_COMPILER_WARN64TO32
-    #define ME_COMPILER_WARN64TO32 0
-#endif
-#ifndef ME_COMPILER_WARN_UNUSED
-    #define ME_COMPILER_WARN_UNUSED 1
-#endif
-#ifndef ME_CONFIG_FILE
-    #define ME_CONFIG_FILE "appweb.conf"
-#endif
-#ifndef ME_DEBUG
-    #define ME_DEBUG 1
-#endif
-#ifndef ME_DEPRECATED_WARNINGS
-    #define ME_DEPRECATED_WARNINGS 0
-#endif
-#ifndef ME_DEPTH
-    #define ME_DEPTH 1
-#endif
-#ifndef ME_DESCRIPTION
-    #define ME_DESCRIPTION "Embedthis Appweb"
-#endif
-#ifndef ME_ESP_CMD
-    #define ME_ESP_CMD 1
-#endif
-#ifndef ME_ESP_LEGACY
-    #define ME_ESP_LEGACY 0
-#endif
-#ifndef ME_ESP_MODULE
-    #define ME_ESP_MODULE 0
-#endif
-#ifndef ME_ESP_NAME
-    #define ME_ESP_NAME "appweb-esp"
-#endif
-#ifndef ME_HTTP_BASIC
-    #define ME_HTTP_BASIC 1
-#endif
-#ifndef ME_HTTP_CACHE
-    #define ME_HTTP_CACHE 1
-#endif
-#ifndef ME_HTTP_CMD
-    #define ME_HTTP_CMD 1
-#endif
-#ifndef ME_HTTP_DEFENSE
-    #define ME_HTTP_DEFENSE 1
-#endif
-#ifndef ME_HTTP_DIGEST
-    #define ME_HTTP_DIGEST 1
-#endif
-#ifndef ME_HTTP_DIR
-    #define ME_HTTP_DIR 1
-#endif
-#ifndef ME_HTTP_HTTP2
-    #define ME_HTTP_HTTP2 1
-#endif
-#ifndef ME_HTTP_PAM
-    #define ME_HTTP_PAM 1
-#endif
-#ifndef ME_HTTP_SENDFILE
-    #define ME_HTTP_SENDFILE 1
-#endif
-#ifndef ME_HTTP_UPLOAD
-    #define ME_HTTP_UPLOAD 1
-#endif
-#ifndef ME_HTTP_WEB_SOCKETS
-    #define ME_HTTP_WEB_SOCKETS 1
-#endif
-#ifndef ME_INTEGRATE
-    #define ME_INTEGRATE 1
-#endif
-#ifndef ME_MANIFEST
-    #define ME_MANIFEST "installs/manifest.me"
-#endif
-#ifndef ME_MBEDTLS_COMPACT
-    #define ME_MBEDTLS_COMPACT 1
-#endif
-#ifndef ME_MPR_LOGGING
-    #define ME_MPR_LOGGING 1
-#endif
-#ifndef ME_MPR_OSLOG
-    #define ME_MPR_OSLOG 0
-#endif
-#ifndef ME_MPR_ROM_MOUNT
-    #define ME_MPR_ROM_MOUNT "/rom"
-#endif
-#ifndef ME_MPR_SSL_CACHE
-    #define ME_MPR_SSL_CACHE 512
-#endif
-#ifndef ME_MPR_SSL_HANDSHAKES
-    #define ME_MPR_SSL_HANDSHAKES 3
-#endif
-#ifndef ME_MPR_SSL_LOG_LEVEL
-    #define ME_MPR_SSL_LOG_LEVEL 6
-#endif
-#ifndef ME_MPR_SSL_TICKET
-    #define ME_MPR_SSL_TICKET 1
-#endif
-#ifndef ME_MPR_SSL_TIMEOUT
-    #define ME_MPR_SSL_TIMEOUT 86400
-#endif
-#ifndef ME_MPR_THREAD_LIMIT_BY_CORES
-    #define ME_MPR_THREAD_LIMIT_BY_CORES 1
-#endif
-#ifndef ME_MPR_THREAD_STACK
-    #define ME_MPR_THREAD_STACK 0
-#endif
-#ifndef ME_NAME
-    #define ME_NAME "appweb"
-#endif
-#ifndef ME_OPENSSL_VERSION
-    #define ME_OPENSSL_VERSION "1.0"
-#endif
-#ifndef ME_PARTS
-    #define ME_PARTS "undefined"
-#endif
-#ifndef ME_PLATFORMS
-    #define ME_PLATFORMS "local"
-#endif
-#ifndef ME_PREFIXES
-    #define ME_PREFIXES "install-prefixes"
-#endif
-#ifndef ME_PROFILE
-    #define ME_PROFILE "undefined"
-#endif
-#ifndef ME_ROM
-    #define ME_ROM 0
-#endif
-#ifndef ME_SERVER_ROOT
-    #define ME_SERVER_ROOT "."
-#endif
-#ifndef ME_TITLE
-    #define ME_TITLE "Embedthis Appweb"
-#endif
-#ifndef ME_TUNE
-    #define ME_TUNE "size"
-#endif
-#ifndef ME_VERSION
-    #define ME_VERSION "8.3.0"
-#endif
-#ifndef ME_WATCHDOG_NAME
-    #define ME_WATCHDOG_NAME "appman"
-#endif
-#ifndef ME_WEB_GROUP
-    #define ME_WEB_GROUP "nogroup"
-#endif
-#ifndef ME_WEB_USER
-    #define ME_WEB_USER "nobody"
-#endif
-
-/* Prefixes */
-#ifndef ME_ROOT_PREFIX
-    #define ME_ROOT_PREFIX "/"
-#endif
-#ifndef ME_BASE_PREFIX
-    #define ME_BASE_PREFIX "/usr/local"
-#endif
-#ifndef ME_DATA_PREFIX
-    #define ME_DATA_PREFIX "/"
-#endif
-#ifndef ME_STATE_PREFIX
-    #define ME_STATE_PREFIX "/var"
-#endif
-#ifndef ME_APP_PREFIX
-    #define ME_APP_PREFIX "/usr/local/lib/appweb"
-#endif
-#ifndef ME_VAPP_PREFIX
-    #define ME_VAPP_PREFIX "/usr/local/lib/appweb/8.3.0"
-#endif
-#ifndef ME_BIN_PREFIX
-    #define ME_BIN_PREFIX "/usr/local/bin"
-#endif
-#ifndef ME_INC_PREFIX
-    #define ME_INC_PREFIX "/usr/local/include"
-#endif
-#ifndef ME_LIB_PREFIX
-    #define ME_LIB_PREFIX "/usr/local/lib"
-#endif
-#ifndef ME_MAN_PREFIX
-    #define ME_MAN_PREFIX "/usr/local/share/man"
-#endif
-#ifndef ME_SBIN_PREFIX
-    #define ME_SBIN_PREFIX "/usr/local/sbin"
-#endif
-#ifndef ME_ETC_PREFIX
-    #define ME_ETC_PREFIX "/etc/appweb"
-#endif
-#ifndef ME_WEB_PREFIX
-    #define ME_WEB_PREFIX "/var/www/appweb"
-#endif
-#ifndef ME_LOG_PREFIX
-    #define ME_LOG_PREFIX "/var/log/appweb"
-#endif
-#ifndef ME_SPOOL_PREFIX
-    #define ME_SPOOL_PREFIX "/var/spool/appweb"
-#endif
-#ifndef ME_CACHE_PREFIX
-    #define ME_CACHE_PREFIX "/var/spool/appweb/cache"
-#endif
-#ifndef ME_SRC_PREFIX
-    #define ME_SRC_PREFIX "appweb-8.3.0"
-#endif
-
-/* Suffixes */
-#ifndef ME_EXE
-    #define ME_EXE ""
-#endif
-#ifndef ME_SHLIB
-    #define ME_SHLIB ".so"
-#endif
-#ifndef ME_SHOBJ
-    #define ME_SHOBJ ".so"
-#endif
-#ifndef ME_LIB
-    #define ME_LIB ".a"
-#endif
-#ifndef ME_OBJ
-    #define ME_OBJ ".o"
-#endif
-
-/* Profile */
-#ifndef ME_CONFIG_CMD
-    #define ME_CONFIG_CMD "me -d -q -platform linux-x86-default -configure . --with esp --with fast -with proxy -gen make"
-#endif
-#ifndef ME_APPWEB_PRODUCT
-    #define ME_APPWEB_PRODUCT 1
-#endif
-#ifndef ME_PROFILE
-    #define ME_PROFILE "default"
-#endif
-#ifndef ME_TUNE_SIZE
-    #define ME_TUNE_SIZE 1
-#endif
-
-/* Miscellaneous */
-#ifndef ME_MAJOR_VERSION
-    #define ME_MAJOR_VERSION 8
-#endif
-#ifndef ME_MINOR_VERSION
-    #define ME_MINOR_VERSION 3
-#endif
-#ifndef ME_PATCH_VERSION
-    #define ME_PATCH_VERSION 0
-#endif
-#ifndef ME_VNUM
-    #define ME_VNUM 800030000
-#endif
-
-/* Components */
-#ifndef ME_COM_CGI
-    #define ME_COM_CGI 0
-#endif
-#ifndef ME_COM_CC
-    #define ME_COM_CC 1
-#endif
-#ifndef ME_COM_DIR
-    #define ME_COM_DIR 0
-#endif
-#ifndef ME_COM_EJS
-    #define ME_COM_EJS 0
-#endif
-#ifndef ME_COM_ESP
-    #define ME_COM_ESP 1
-#endif
-#ifndef ME_COM_FAST
-    #define ME_COM_FAST 1
-#endif
-#ifndef ME_COM_HTTP
-    #define ME_COM_HTTP 1
-#endif
-#ifndef ME_COM_LIB
-    #define ME_COM_LIB 1
-#endif
-#ifndef ME_COM_MATRIXSSL
-    #define ME_COM_MATRIXSSL 0
-#endif
-#ifndef ME_COM_MBEDTLS
-    #define ME_COM_MBEDTLS 1
-#endif
-#ifndef ME_COM_MDB
-    #define ME_COM_MDB 1
-#endif
-#ifndef ME_COM_MPR
-    #define ME_COM_MPR 1
-#endif
-#ifndef ME_COM_NANOSSL
-    #define ME_COM_NANOSSL 0
-#endif
-#ifndef ME_COM_OPENSSL
-    #define ME_COM_OPENSSL 0
-#endif
-#ifndef ME_COM_OSDEP
-    #define ME_COM_OSDEP 1
-#endif
-#ifndef ME_COM_PCRE
-    #define ME_COM_PCRE 1
-#endif
-#ifndef ME_COM_PHP
-    #define ME_COM_PHP 0
-#endif
-#ifndef ME_COM_PROXY
-    #define ME_COM_PROXY 1
-#endif
-#ifndef ME_COM_SQLITE
-    #define ME_COM_SQLITE 0
-#endif
-#ifndef ME_COM_SSL
-    #define ME_COM_SSL 1
-#endif
-#ifndef ME_COM_VXWORKS
-    #define ME_COM_VXWORKS 0
-#endif
-#ifndef ME_COM_WATCHDOG
-    #define ME_COM_WATCHDOG 1
-#endif

+ 0 - 63
pro/appweb/inc/mpr-version.h

@@ -1,63 +0,0 @@
-/*
-    mpr-version.h -- Header for the Embedthis Version Library
-
-    Copyright (c) All Rights Reserved. See copyright notice at the bottom of the file.
- */
-
-#ifndef _h_VERSION
-#define _h_VERSION 1
-
-/********************************* Includes ***********************************/
-
-#include    "mpr.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/********************************** Defines ***********************************/
-/**
-    Version object
-    @description The Version class provides the ability to manage SemVer version numbers
-    @defgroup Version Version
-    @stability Prototype
- */
-typedef struct MprVersion {
-    cchar   *full;              /**< Original version string */
-    cchar   *baseVersion;       /**< Base version portion without pre-release suffix */
-    cchar   *preVersion;        /**< Pre-release version suffix */
-    uint64  numberVersion;      /**< Version string as a number (excludes prerelease suffix) */
-    int     major;
-    int     minor;
-    int     patch;
-    bool    ok;                 /**< Version is a valid a SemVer */
-} MprVersion;
-
-
-PUBLIC cchar *mprBumpVersion(cchar *version);
-MprVersion *mprCreateVersion(cchar *version);
-PUBLIC cchar *mprGetCompatibleVersion(cchar *version);
-PUBLIC int mprGetMajorVersion(cchar *version);
-PUBLIC int mprGetMinorVersion(cchar *version);
-PUBLIC int mprGetPatchVersion(cchar *version);
-PUBLIC cchar *mprGetPrereleaseVersion(cchar *version);
-PUBLIC cchar *mprGetVersionBase(cchar *version);
-PUBLIC int64 mprGetVersionNumber(cchar *version);
-PUBLIC bool mprIsVersionAcceptable(cchar *version, cchar *criteria);
-PUBLIC bool mprIsVersionSame(cchar *version, cchar *other);
-PUBLIC bool mprIsVersionValid(cchar *version);
-PUBLIC void mprSortVersions(MprVersion **versions, ssize nelt, int direction);
-
-PUBLIC bool mprIsVersionObjAcceptable(MprVersion *vp, cchar *criteria);
-
-#ifdef __cplusplus
-} /* extern C */
-#endif
-
-#endif /* _h_VERSION */
-
-/*
-    Copyright (c) Embedthis Software. All Rights Reserved.
-    This software is distributed under a commercial license. Consult the LICENSE.md
-    distributed with this software for full details and copyrights.
- */

Plik diff jest za duży
+ 0 - 10679
pro/appweb/inc/mpr.h


Plik diff jest za duży
+ 0 - 1424
pro/appweb/inc/osdep.h


+ 0 - 348
pro/appweb/inc/pcre.h

@@ -1,348 +0,0 @@
-/*************************************************
-*       Perl-Compatible Regular Expressions      *
-*************************************************/
-
-/* This is the public header file for the PCRE library, to be #included by
-applications that call the PCRE functions.
-
-           Copyright (c) 1997-2008 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-#ifndef _PCRE_H
-#define _PCRE_H
-
-#ifndef ME_COM_PCRE
-    #define ME_COM_PCRE 1
-#endif
-
-/* The current PCRE version information. */
-
-#define PCRE_MAJOR          7
-#define PCRE_MINOR          7
-#define PCRE_PRERELEASE     
-#define PCRE_DATE           2008-05-07
-
-/* When an application links to a PCRE DLL in Windows, the symbols that are
-imported have to be identified as such. When building PCRE, the appropriate
-export setting is defined in pcre_internal.h, which includes this file. So we
-don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
-
-/* EMBEDTHIS */
-#ifndef _VSB_CONFIG_FILE
-    #define _VSB_CONFIG_FILE "vsbConfig.h"
-#endif
-
-#if ALL_IN_ONE || 1
-    /*
-     *  When building all-in-one, we must use internal definitions
-     */
-    #ifndef PCRE_EXP_DECL
-    #  ifdef _WIN32
-    #    ifndef PCRE_STATIC
-    #      define PCRE_EXP_DECL       extern __declspec(dllexport)
-    #      define PCRE_EXP_DEFN       __declspec(dllexport)
-    #      define PCRE_EXP_DATA_DEFN  __declspec(dllexport)
-    #    else
-    #      define PCRE_EXP_DECL       extern
-    #      define PCRE_EXP_DEFN
-    #      define PCRE_EXP_DATA_DEFN
-    #    endif
-    #  else
-    #    ifdef __cplusplus
-    #      define PCRE_EXP_DECL       extern "C"
-    #    else
-    #      define PCRE_EXP_DECL       extern
-    #    endif
-    #    ifndef PCRE_EXP_DEFN
-    #      define PCRE_EXP_DEFN       PCRE_EXP_DECL
-    #    endif
-    #    ifndef PCRE_EXP_DATA_DEFN
-    #      define PCRE_EXP_DATA_DEFN
-    #    endif
-    #  endif
-    #endif
-#else
-    #if defined(_WIN32) && !defined(PCRE_STATIC)
-    #  ifndef PCRE_EXP_DECL
-    #    define PCRE_EXP_DECL  extern __declspec(dllimport)
-    #  endif
-    #  ifdef __cplusplus
-    #    ifndef PCRECPP_EXP_DECL
-    #      define PCRECPP_EXP_DECL  extern __declspec(dllimport)
-    #    endif
-    #    ifndef PCRECPP_EXP_DEFN
-    #      define PCRECPP_EXP_DEFN  __declspec(dllimport)
-    #    endif
-    #  endif
-    #endif
-    
-    /* By default, we use the standard "extern" declarations. */
-    
-    #ifndef PCRE_EXP_DECL
-    #  ifdef __cplusplus
-    #    define PCRE_EXP_DECL  extern "C"
-    #  else
-    #    define PCRE_EXP_DECL  extern
-    #  endif
-    #endif
-    
-    #ifdef __cplusplus
-    #  ifndef PCRECPP_EXP_DECL
-    #    define PCRECPP_EXP_DECL  extern
-    #  endif
-    #  ifndef PCRECPP_EXP_DEFN
-    #    define PCRECPP_EXP_DEFN
-    #  endif
-    #endif
-#endif
-
-/* Have to include stdlib.h in order to ensure that size_t is defined;
-it is needed here for malloc. */
-
-#include <stdlib.h>
-
-/* Allow for C++ users */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Options */
-
-#define PCRE_CASELESS           0x00000001
-#define PCRE_MULTILINE          0x00000002
-#define PCRE_DOTALL             0x00000004
-#define PCRE_EXTENDED           0x00000008
-#define PCRE_ANCHORED           0x00000010
-#define PCRE_DOLLAR_ENDONLY     0x00000020
-#define PCRE_EXTRA              0x00000040
-#define PCRE_NOTBOL             0x00000080
-#define PCRE_NOTEOL             0x00000100
-#define PCRE_UNGREEDY           0x00000200
-#define PCRE_NOTEMPTY           0x00000400
-#define PCRE_UTF8               0x00000800
-#define PCRE_NO_AUTO_CAPTURE    0x00001000
-#define PCRE_NO_UTF8_CHECK      0x00002000
-#define PCRE_AUTO_CALLOUT       0x00004000
-#define PCRE_PARTIAL            0x00008000
-#define PCRE_DFA_SHORTEST       0x00010000
-#define PCRE_DFA_RESTART        0x00020000
-#define PCRE_FIRSTLINE          0x00040000
-#define PCRE_DUPNAMES           0x00080000
-#define PCRE_NEWLINE_CR         0x00100000
-#define PCRE_NEWLINE_LF         0x00200000
-#define PCRE_NEWLINE_CRLF       0x00300000
-#define PCRE_NEWLINE_ANY        0x00400000
-#define PCRE_NEWLINE_ANYCRLF    0x00500000
-#define PCRE_BSR_ANYCRLF        0x00800000
-#define PCRE_BSR_UNICODE        0x01000000
-#define PCRE_JAVASCRIPT_COMPAT  0x02000000
-
-/* Exec-time and get/set-time error codes */
-
-#define PCRE_ERROR_NOMATCH         (-1)
-#define PCRE_ERROR_NULL            (-2)
-#define PCRE_ERROR_BADOPTION       (-3)
-#define PCRE_ERROR_BADMAGIC        (-4)
-#define PCRE_ERROR_UNKNOWN_OPCODE  (-5)
-#define PCRE_ERROR_UNKNOWN_NODE    (-5)  /* For backward compatibility */
-#define PCRE_ERROR_NOMEMORY        (-6)
-#define PCRE_ERROR_NOSUBSTRING     (-7)
-#define PCRE_ERROR_MATCHLIMIT      (-8)
-#define PCRE_ERROR_CALLOUT         (-9)  /* Never used by PCRE itself */
-#define PCRE_ERROR_BADUTF8        (-10)
-#define PCRE_ERROR_BADUTF8_OFFSET (-11)
-#define PCRE_ERROR_PARTIAL        (-12)
-#define PCRE_ERROR_BADPARTIAL     (-13)
-#define PCRE_ERROR_INTERNAL       (-14)
-#define PCRE_ERROR_BADCOUNT       (-15)
-#define PCRE_ERROR_DFA_UITEM      (-16)
-#define PCRE_ERROR_DFA_UCOND      (-17)
-#define PCRE_ERROR_DFA_UMLIMIT    (-18)
-#define PCRE_ERROR_DFA_WSSIZE     (-19)
-#define PCRE_ERROR_DFA_RECURSE    (-20)
-#define PCRE_ERROR_RECURSIONLIMIT (-21)
-#define PCRE_ERROR_NULLWSLIMIT    (-22)  /* No longer actually used */
-#define PCRE_ERROR_BADNEWLINE     (-23)
-
-/* Request types for pcre_fullinfo() */
-
-#define PCRE_INFO_OPTIONS            0
-#define PCRE_INFO_SIZE               1
-#define PCRE_INFO_CAPTURECOUNT       2
-#define PCRE_INFO_BACKREFMAX         3
-#define PCRE_INFO_FIRSTBYTE          4
-#define PCRE_INFO_FIRSTCHAR          4  /* For backwards compatibility */
-#define PCRE_INFO_FIRSTTABLE         5
-#define PCRE_INFO_LASTLITERAL        6
-#define PCRE_INFO_NAMEENTRYSIZE      7
-#define PCRE_INFO_NAMECOUNT          8
-#define PCRE_INFO_NAMETABLE          9
-#define PCRE_INFO_STUDYSIZE         10
-#define PCRE_INFO_DEFAULT_TABLES    11
-#define PCRE_INFO_OKPARTIAL         12
-#define PCRE_INFO_JCHANGED          13
-#define PCRE_INFO_HASCRORLF         14
-
-/* Request types for pcre_config(). Do not re-arrange, in order to remain
-compatible. */
-
-#define PCRE_CONFIG_UTF8                    0
-#define PCRE_CONFIG_NEWLINE                 1
-#define PCRE_CONFIG_LINK_SIZE               2
-#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD  3
-#define PCRE_CONFIG_MATCH_LIMIT             4
-#define PCRE_CONFIG_STACKRECURSE            5
-#define PCRE_CONFIG_UNICODE_PROPERTIES      6
-#define PCRE_CONFIG_MATCH_LIMIT_RECURSION   7
-#define PCRE_CONFIG_BSR                     8
-
-/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine
-these bits, just add new ones on the end, in order to remain compatible. */
-
-#define PCRE_EXTRA_STUDY_DATA             0x0001
-#define PCRE_EXTRA_MATCH_LIMIT            0x0002
-#define PCRE_EXTRA_CALLOUT_DATA           0x0004
-#define PCRE_EXTRA_TABLES                 0x0008
-#define PCRE_EXTRA_MATCH_LIMIT_RECURSION  0x0010
-
-/* Types */
-
-struct real_pcre;                 /* declaration; the definition is private  */
-typedef struct real_pcre pcre;
-
-/* When PCRE is compiled as a C++ library, the subject pointer type can be
-replaced with a custom type. For conventional use, the public interface is a
-const char *. */
-
-#ifdef ME_CHAR
-#define PCRE_SPTR const ME_CHAR *
-#else
-#ifndef PCRE_SPTR
-#define PCRE_SPTR const char *
-#endif
-#endif
-
-/* The structure for passing additional data to pcre_exec(). This is defined in
-such as way as to be extensible. Always add new fields at the end, in order to
-remain compatible. */
-
-typedef struct pcre_extra {
-  unsigned long int flags;        /* Bits for which fields are set */
-  void *study_data;               /* Opaque data from pcre_study() */
-  unsigned long int match_limit;  /* Maximum number of calls to match() */
-  void *callout_data;             /* Data passed back in callouts */
-  const unsigned char *tables;    /* Pointer to character tables */
-  unsigned long int match_limit_recursion; /* Max recursive calls to match() */
-} pcre_extra;
-
-/* The structure for passing out data via the pcre_callout_function. We use a
-structure so that new fields can be added on the end in future versions,
-without changing the API of the function, thereby allowing old clients to work
-without modification. */
-
-typedef struct pcre_callout_block {
-  int          version;           /* Identifies version of block */
-  /* ------------------------ Version 0 ------------------------------- */
-  int          callout_number;    /* Number compiled into pattern */
-  int         *offset_vector;     /* The offset vector */
-  PCRE_SPTR    subject;           /* The subject being matched */
-  int          subject_length;    /* The length of the subject */
-  int          start_match;       /* Offset to start of this match attempt */
-  int          current_position;  /* Where we currently are in the subject */
-  int          capture_top;       /* Max current capture */
-  int          capture_last;      /* Most recently closed capture */
-  void        *callout_data;      /* Data passed in with the call */
-  /* ------------------- Added for Version 1 -------------------------- */
-  int          pattern_position;  /* Offset to next item in the pattern */
-  int          next_item_length;  /* Length of next item in the pattern */
-  /* ------------------------------------------------------------------ */
-} pcre_callout_block;
-
-/* Indirection for store get and free functions. These can be set to
-alternative malloc/free functions if required. Special ones are used in the
-non-recursive case for "frames". There is also an optional callout function
-that is triggered by the (?) regex item. For Virtual Pascal, these definitions
-have to take another form. */
-
-#ifndef VPCOMPAT
-PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre_free)(void *);
-PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre_stack_free)(void *);
-PCRE_EXP_DECL int   (*pcre_callout)(pcre_callout_block *);
-#else   /* VPCOMPAT */
-PCRE_EXP_DECL void *pcre_malloc(size_t);
-PCRE_EXP_DECL void  pcre_free(void *);
-PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
-PCRE_EXP_DECL void  pcre_stack_free(void *);
-PCRE_EXP_DECL int   pcre_callout(pcre_callout_block *);
-#endif  /* VPCOMPAT */
-
-/* Exported PCRE functions */
-
-PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
-                  const unsigned char *);
-PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
-                  int *, const unsigned char *);
-PCRE_EXP_DECL int  pcre_config(int, void *);
-PCRE_EXP_DECL int  pcre_copy_named_substring(const pcre *, const char *,
-                  int *, int, const char *, char *, int);
-PCRE_EXP_DECL int  pcre_copy_substring(const char *, int *, int, int, char *,
-                  int);
-PCRE_EXP_DECL int  pcre_dfa_exec(const pcre *, const pcre_extra *,
-                  const char *, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int  pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
-                   int, int, int, int *, int);
-PCRE_EXP_DECL void pcre_free_substring(const char *);
-PCRE_EXP_DECL void pcre_free_substring_list(const char **);
-PCRE_EXP_DECL int  pcre_fullinfo(const pcre *, const pcre_extra *, int,
-                  void *);
-PCRE_EXP_DECL int  pcre_get_named_substring(const pcre *, const char *,
-                  int *, int, const char *, const char **);
-PCRE_EXP_DECL int  pcre_get_stringnumber(const pcre *, const char *);
-PCRE_EXP_DECL int  pcre_get_stringtable_entries(const pcre *, const char *,
-                  char **, char **);
-PCRE_EXP_DECL int  pcre_get_substring(const char *, int *, int, int,
-                  const char **);
-PCRE_EXP_DECL int  pcre_get_substring_list(const char *, int *, int,
-                  const char ***);
-PCRE_EXP_DECL int  pcre_info(const pcre *, int *, int *);
-PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
-PCRE_EXP_DECL int  pcre_refcount(pcre *, int);
-PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
-PCRE_EXP_DECL const char *pcre_version(void);
-
-#ifdef __cplusplus
-}  /* extern "C" */
-#endif
-
-#endif /* End of pcre.h */

BIN
pro/appweb/lib/appman


BIN
pro/appweb/lib/appweb


BIN
pro/appweb/lib/appweb-esp


BIN
pro/appweb/lib/authpass


+ 0 - 28
pro/appweb/lib/ca.crt

@@ -1,28 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEyzCCA7OgAwIBAgIJAIhf5Ee36rfMMA0GCSqGSIb3DQEBCwUAMIGaMQswCQYD
-VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEU
-MBIGA1UECgwLRXhhbXBsZS5jb20xEjAQBgNVBAsMCUxpY2Vuc2luZzEUMBIGA1UE
-AwwLZXhhbXBsZS5jb20xJDAiBgkqhkiG9w0BCQEWFWxpY2Vuc2luZ0BleGFtcGxl
-LmNvbTAeFw0xNTEwMjkwMDU3MTVaFw0yNTEwMjYwMDU3MTVaMIGaMQswCQYDVQQG
-EwJVUzETMBEGA1UECAwKV2FzaGlu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2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEUMBIG
-A1UECgwLRXhhbXBsZS5jb20xEzARBgNVBAsMClByb2R1Y3Rpb24xEjAQBgNVBAMM
-CWxvY2FsaG9zdDElMCMGCSqGSIb3DQEJARYWcHJvZHVjdGlvbkBleGFtcGxlLmNv
-bTAeFw0xNTEwMjkwMDU3MTVaFw0xNjEwMjgwMDU3MTVaMIGaMQswCQYDVQQGEwJV
-UzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEUMBIGA1UE
-CgwLRXhhbXBsZS5jb20xEzARBgNVBAsMClByb2R1Y3Rpb24xEjAQBgNVBAMMCWxv
-Y2FsaG9zdDElMCMGCSqGSIb3DQEJARYWcHJvZHVjdGlvbkBleGFtcGxlLmNvbTBZ
-MBMGByqGSM49AgEGCCqGSM49AwEHA0IABKlg8+cq5+191gf/0mowhlYLxKJt7/Sk
-QmRZrTkwG22CDRuawW3SRfdcjcdr9W4IVKM9nmEgjp1rh2uZSU6hzy2jUDBOMB0G
-A1UdDgQWBBSaTOE9vYYp1G8fZWyHyPK2PxovkTAfBgNVHSMEGDAWgBSaTOE9vYYp
-1G8fZWyHyPK2PxovkTAMBgNVHRMEBTADAQH/MAoGCCqGSM49BAMCA0kAMEYCIQCD
-NqOdm1VEJX0aKSx8XcpQeZZkuMSHNVM0OeSqNYIMXQIhAOCzEi58magO9u14IyuB
-XDTbrbVixn+zqeX44Qjl9j4M
------END CERTIFICATE-----

+ 0 - 8
pro/appweb/lib/ec.key

@@ -1,8 +0,0 @@
------BEGIN EC PARAMETERS-----
-BggqhkjOPQMBBw==
------END EC PARAMETERS-----
------BEGIN EC PRIVATE KEY-----
-MHcCAQEEIJO+2klurU7Bk5PVdQwhJXEkGbRGKUaPBvzJ+0WwL70OoAoGCCqGSM49
-AwEHoUQDQgAEqWDz5yrn7X3WB//SajCGVgvEom3v9KRCZFmtOTAbbYING5rBbdJF
-91yNx2v1bghUoz2eYSCOnWuHa5lJTqHPLQ==
------END EC PRIVATE KEY-----

+ 0 - 50
pro/appweb/lib/esp-compile.json

@@ -1,50 +0,0 @@
-/*
-    esp.json - ESP build rules
- */
-
-{
-    esp: {
-        build: {
-            rules: {
-                dynamic: {
-                    macosx: {
-                        compile: '${CC} -c ${DEBUG} ${CFLAGS} -Wall -DPIC -fPIC -arch ${GCC_ARCH} -I. -I${APPINC} -I${INC} ${SRC} -o ${OBJ}',
-                        link: '${CC} -dynamiclib ${DEBUG} -arch ${GCC_ARCH} -L${LIBPATH} -Wl,-rpath,@executable_path/ -Wl,-rpath,@loader_path/ ${CFLAGS} ${LIBS} ${LDFLAGS} -o ${MOD}${SHOBJ} ${OBJ}',
-                    },
-                    windows: {
-                        env: {
-                            set: 'VisualStudio',
-                        },
-                        compile: '"${CC}" -LD ${DEBUG} -D_REENTRANT -D_MT -nologo -GR- -W3 -MDd -I. -I${APPINC} "-I${INC}" "-Fo${MOD}.obj" "-Fd${MOD}.pdb" "-Fe${MOD}${SHOBJ}" "${SRC}" ${CFLAGS} ${LIBS} ${LDFLAGS} ws2_32.lib'
-                    },
-                    vxworks: {
-                        compile: '"${WIND_GNU_PATH}/${WIND_HOST_TYPE}/bin/${WIND_CCNAME}" -c ${DEBUG} -DVXWORKS -DRW_MULTI_THREAD -D_REENTRANT -D_GNU_TOOL -DCPU=${VXCPU} -Wall -fno-builtin -fno-defer-pop -fvolatile "-I." "-I${APPINC}" "-I${WIND_BASE}/target/h" "-I${WIND_BASE}/target/h/wrn/coreip" -I${INC} ${CFLAGS} ${LDFLAGS} -o ${MOD}${SHOBJ} ${SRC}'
-                    },
-                    cygwin: {
-                        compile: '${CC} -shared ${DEBUG} -Wall -Wno-unused-result -DPIC -fPIC -I. -I${APPINC} -I${INC} -L${LIBPATH} -Wl,-rpath,$ORIGIN/ ${CFLAGS} ${LIBS} ${LDFLAGS} -o ${MOD}${SHOBJ} ${SRC}'
-                    },
-                    default: {
-                        compile: '${CC} -shared ${DEBUG} -Wall -Wno-unused-result -DPIC -fPIC -I. -I${APPINC} -I${INC} -L${LIBPATH} -Wl,--enable-new-dtags -Wl,-rpath,$ORIGIN/ ${CFLAGS} ${LIBS} ${LDFLAGS} -o ${MOD}${SHOBJ} ${SRC}'
-                    }
-                },
-                static: {
-                    macosx: {
-                        compile: '${CC} -c ${DEBUG} -Wall -DPIC -fPIC -arch ${GCC_ARCH} -I. -I${APPINC} -I${INC} -c ${SRC} -o ${OBJ}',
-                        link: '${AR} -cr ${MOD}${ARLIB} ${OBJ}'
-                    },
-                    windows: {
-                        env: {
-                            set: 'VisualStudio',
-                        },
-                        compile: '"${CC}" -LD ${DEBUG} -D_REENTRANT -D_MT -nologo -GR- -W3 -MDd -I. -I${APPINC} -I"${INC}" -Fd"${MOD}.pdb" -Fe"${MOD}${SHOBJ}" "${SRC}"',
-                        link: '${AR} -nologo cr ${MOD}${ARLIB} ${OBJ}'
-                    },
-                    vxworks: {
-                        compile: '"${WIND_GNU_PATH}/${WIND_HOST_TYPE}/bin/${WIND_CCNAME}" -c ${DEBUG} -DVXWORKS -DRW_MULTI_THREAD -D_REENTRANT -D_GNU_TOOL -DCPU=${VXCPU} -Wall -fno-builtin -fno-defer-pop -fvolatile "-I." "-I${APPINC}" "-I${WIND_BASE}/target/h" -I${WIND_BASE}/target/h/wrn/coreip" -I${INC} -o ${MOD}${SHOBJ} ${SRC}',
-                        link: '"${WIND_GNU_PATH}/${WIND_HOST_TYPE}/bin/${WIND_ARNAME}" ${DEBUG} -cr ${MOD}${ARLIB} ${OBJ}'
-                    }
-                }
-            }
-        }
-    }
-}

BIN
pro/appweb/lib/http


BIN
pro/appweb/lib/libappweb.so


BIN
pro/appweb/lib/libesp.so


BIN
pro/appweb/lib/libhttp.so


BIN
pro/appweb/lib/libmbedtls.a


BIN
pro/appweb/lib/libmpr-mbedtls.a


BIN
pro/appweb/lib/libmpr-version.a


BIN
pro/appweb/lib/libmpr.so


BIN
pro/appweb/lib/libpcre.so


BIN
pro/appweb/lib/makerom


Plik diff jest za duży
+ 0 - 3952
pro/appweb/lib/roots.crt


+ 0 - 24
pro/appweb/lib/self.crt

@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIID/TCCAuWgAwIBAgIJANVDnGA7wE2uMA0GCSqGSIb3DQEBCwUAMIGUMQswCQYD
-VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEU
-MBIGA1UECgwLRXhhbXBsZS5jb20xFDASBgNVBAsMC0RldmVsb3BtZW50MRIwEAYD
-VQQDDAlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD2RldkBleGFtcGxlLmNvbTAe
-Fw0xNTEwMjkwMDU3MTVaFw0yNTEwMjYwMDU3MTVaMIGUMQswCQYDVQQGEwJVUzET
-MBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEUMBIGA1UECgwL
-RXhhbXBsZS5jb20xFDASBgNVBAsMC0RldmVsb3BtZW50MRIwEAYDVQQDDAlsb2Nh
-bGhvc3QxHjAcBgkqhkiG9w0BCQEWD2RldkBleGFtcGxlLmNvbTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAK2UM+JaGgEetPeaI8JG4Qbyyv0CzXzpMetj
-K0xjvi5/EaRVyQgvsUDuYiytZS0hsFK0zf0Wvrum+mZNwx7Vzbd0wSTA/1SLfirz
-mTZoKr7hBSlsXUDZP62UUqXebmf17om/AUhiS+3iPDUY5HOQxDic65P/KIveu/pG
-GJJqrqAPL1M+kpv3FKqIJzEVXc+RCCbTdCEPvM/ujOJWxa34uGB/FfgSPzliqLaB
-rYSlrahNlS5R3L2MyC+80IITSmU8pAIsWaJgyCOqIOfQc6ugETIUNusj6olKmivs
-Qnco9akXUTE2j5XvRaAoCYXZ+8kIY+JJLXI++R2S+zCk46bevvUCAwEAAaNQME4w
-HQYDVR0OBBYEFDrTAkmdc2nKfDYOL2VPw8jQrn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TPZKSVacK7bFu1xE2NM+KjcgK0lSXzSN9XiD8qTi5W/Q==
------END RSA PRIVATE KEY-----

+ 0 - 3
pro/appweb/lib/vcvars.bat

@@ -1,3 +0,0 @@
-@echo off 
-call %1 %2
-set

+ 81 - 211
pro/src/appweb_handle.c

@@ -1,4 +1,3 @@
-#include "http.h"
 #include "cJSON.h"
 #include "common.h"
 #include "json_handle.h"
@@ -9,22 +8,15 @@
 #include "thread.h"
 #include "cfg.h"
 #include "cascade.h"
-#include "appweb.h"
 #include "upg.h"
 #include "file.h"
+#include "mongoose.h"
 #include "language_common.h"
 #include "websocket_handle.h"
 
 
-
-typedef void (*http_fn_t)(void *arg);
-
-
-#ifdef USE_WEBAPP
-#include "http.h"
-#else
-#include "mongoose.h"
 #define FN_MAX  30
+typedef void (*http_fn_t)(void *arg);
 
 typedef struct {
     struct mg_connection *c;
@@ -42,29 +34,27 @@ typedef struct {
 
     pthread_t  tid;
 }mg_handle_t;
-#endif
 typedef struct {
-#ifndef USE_WEBAPP
-    mg_handle_t mg;
-#endif
+    _OverAllPwrAckInfo all;
+    _OverChnPwrAckInfo chn;
+}status_data_t;
+typedef struct {
+    mg_handle_t     mg;
+    pthread_t       tid;
 
-    pthread_t  tid;
+    status_data_t   stt;
 }web_handle_t;
-static web_handle_t webHandle;
-
 
 static char* g_product_board_cpu[] = {
     "xxx",
     "T113"
 };
-
 static char* g_product_type_str[] = {
     "SmartPdu(DC)",
     "SmartPdu(AC)",
     "SmartPdu(Tree_AC_Tree)",
     "SmartPdu(Tree_AC_One)",
 };
-
 static char* g_product_pwr_type_str[] = {
     "xxx",
     "直流",
@@ -72,86 +62,64 @@ static char* g_product_pwr_type_str[] = {
     "交流三相三出",
     "交流三相单出",
 };
+static web_handle_t webHandle;
 static int webSetCallback(void);
 
+///////////////////////////////////////////////////
 
 static int http_reply(void *conn, int status, char *ack)
 {
      int r=0;
-     
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    httpSetStatus(s, status);
-    if(ack && strlen(ack)>0) {
-        httpWrite(s->writeq, ack);
-    }
-    httpFinalize(s);
-#else
+
     mg_stream_t *s=(mg_stream_t*)conn;
     r = mg_http_reply2(s->c, status, "",  ack);
-#endif
 
     return r;
 }
-
 static void httpAddCallback(char *uri, http_fn_t f)
 {
-#ifdef USE_WEBAPP
-    httpDefineAction(uri, (HttpAction)f);
-#else
     mg_handle_t *h=&webHandle.mg;
     if(h->cnt<FN_MAX-1) {
         h->fn[h->cnt].uri = uri;
         h->fn[h->cnt].f   = f;
         h->cnt++;
     }
-
-#endif
 }
-
-
-#ifdef USE_WEBAPP
-static void *web_thread(void *arg)
+static int save_to_csv(char *path, status_data_t *data)
 {
-    Mpr  *mpr;
-    int  rc;
-    char path[MG_PATH_MAX];
-    thread_handle_t *h=(thread_handle_t*)arg;
-    
-    rc = MPR_ERR_CANT_CREATE;
-    if ((mpr = mprCreate(0, NULL, MPR_USER_EVENTS_THREAD)) == 0) {
-        mprError("Cannot create runtime");
-        return NULL;
-    }
-    if (httpCreate(HTTP_CLIENT_SIDE | HTTP_SERVER_SIDE) == 0) {
-        mprError("Cannot create the HTTP services");
-        return NULL;
-    }
-    
-    mprStart();
+    int tlen=0;
+    FILE *fp=NULL;
     
-    sys_get_path(path, ME_CONFIG_FILE);
-    log_d("____ web root: %s\n", path);
-    if (maParseConfig(path) < 0) {
-        mprError("Cannot parse the config file %s", ME_CONFIG_FILE);
-        return NULL;
+    fp = fopen(path, "wt");
+    if(!fp) {
+        return -1;
     }
 
-    webSetCallback();
-    //httpAddFileHandler(host);
-    
-    if (httpStartEndpoints() < 0) {
-        mprError("Cannot start the web server");
-        return NULL;
+    fprintf(fp, "hello world");
+
+    fclose(fp);
+    return 0;
+}
+static int download_handle(void *conn, int flag)
+{
+    int r;
+    char path[100];
+    web_handle_t *wh=&webHandle;
+    mg_stream_t *s=(mg_stream_t*)conn;
+    struct mg_http_message *hm = (struct mg_http_message *)s->ev_data;
+
+    sprintf(path, "/tmp/%s_history.csv", (flag==0)?"overall":"channel");
+    r = save_to_csv(path, &wh->stt);
+    if(r==0) {
+        struct mg_http_serve_opts opts = {.root_dir = NULL};
+        mg_http_serve_file(s->c, hm, path, &opts);
+        file_remove(path);
     }
-    mprServiceEvents(-1, 0);
-    mprDestroy();
-    
-    pthread_exit(NULL);
+
+    return r;
 }
 
-#else
-static int upload_handle(void *conn, char *upload_path)
+static int upload_handle(void *conn, char *path)
 {
     int r=-1;
     struct mg_http_part part;
@@ -162,8 +130,8 @@ static int upload_handle(void *conn, char *upload_path)
     while ((pos = mg_http_next_multipart(hm->body, pos, &part)) > 0) {
         printf("filename: %s length: %lu bytes", part.filename.buf, (unsigned long) part.body.len);
 
-        if (mg_path_is_sane(mg_str(upload_path))) {
-            mg_file_write(&mg_fs_posix, upload_path, part.body.buf, part.body.len);
+        if (mg_path_is_sane(mg_str(path))) {
+            mg_file_write(&mg_fs_posix, path, part.body.buf, part.body.len);
             total_bytes += part.body.len;
         }
     }
@@ -217,7 +185,7 @@ static void *web_thread(void *arg)
         
     pthread_exit(NULL);
 }
-#endif
+
 
 
 /// @brief 系统信息
@@ -225,18 +193,10 @@ static void *web_thread(void *arg)
 static void systemConfiguration(void* conn)
 {
     char *ack_str = NULL;
-    char* rx_Head_buf = NULL;
     char *g_token = NULL;
-
-#ifdef USE_WEBAPP
-    HttpStream *s = (HttpStream *)conn;
-    rx_Head_buf = (char *)httpGetHeader(s, "Authorization");
-    usleep(500000);
-#else
     mg_stream_t *s = (mg_stream_t *)conn;
     struct mg_http_message *msg = s->ev_data;
-    rx_Head_buf = (char *)msg->head.buf;
-#endif
+    char* rx_Head_buf = (char *)msg->head.buf;
 
     g_token = json_to_Token_info(rx_Head_buf);
     // 检查token是否有效
@@ -262,16 +222,10 @@ static void systemConfiguration(void* conn)
 static void changeLanguages(void* conn)
 {
     char* ack_str = NULL;
-    char* rx_body_buf = NULL;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char* rx_body_buf = (char*)msg->body.buf;
+
     json_to_switch_language(rx_body_buf);
     dev_update_device_genera_info(__globalDeviceManage.db,__globalDeviceManage._global_device_info);
     ack_str = ctrl_sts_ack_to_json();
@@ -285,15 +239,9 @@ static void loginFunc(void* conn)
 {
     char* ack_str = NULL ;
     char g_token[64] = {0};
-    cchar* rx_body_buf = NULL;
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = msg->body.buf;
-#endif
+    char *rx_body_buf = msg->body.buf;
 
     //用户信息创建-未析构
     _User_Log *_newUserLogin = (_User_Log *)malloc(sizeof(_User_Log));
@@ -302,9 +250,8 @@ static void loginFunc(void* conn)
         //转换json参数
     if(json_to_User_login_info(rx_body_buf,_newUserLogin)!=0)
     {
-        httpSetStatus(stream, 400);
-        httpFinalize(stream);
-        return ;        
+        http_reply(conn, 400, NULL);
+        return;        
     }
 
     bool LoginFlag = false;
@@ -365,17 +312,10 @@ static void loginOutFunc(void* conn)
 {
     __globalDeviceManage.view_page=-1;
 	char* ack_str = NULL ;
-    char* rx_body_buf = NULL;
     char* g_token;
-	
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char *rx_body_buf = (char*)msg->body.buf;
 
     //转换json参数
     if(json_to_User_loginOut_info(rx_body_buf,&g_token)!=0)
@@ -411,18 +351,10 @@ static void getUserInfo(void* conn)
 static void getUserRouters(void* conn)
 {
     char* ack_str = NULL ;
-    char* rx_Head_buf = NULL;
     char* g_token=NULL;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_Head_buf = (char*)httpGetHeader(s,"Authorization");
-    usleep(500000);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_Head_buf = (char*)msg->head.buf;
-#endif
+    char *rx_Head_buf = (char*)msg->head.buf;
 
     // 查询用户信息
     UserInfo User_list;
@@ -466,25 +398,24 @@ static void overallStatusMonitoring(void* conn)
     _Over_All_Sts_Monitor _over_all_sts_monitor={0};
     _OverBackStsInfo _over_back_sts_info;       //设备总体状态信息
     _OverAllPwrAckInfo _over_all_pwr_back_info; //设备电源信息
-    char* rx_body_buf = NULL;
     char* ack_str=NULL;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-    usleep(500000);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char *rx_body_buf = (char*)msg->body.buf;
 
     //转换json参数
     cjson = json_to_overall_status_monitor(rx_body_buf,&_over_all_sts_monitor);
     if(cjson==NULL)
     {
-        http_reply(conn, 400, NULL);
-        return ;        
+        if (strstr(rx_body_buf,"type=export")) {
+            download_handle(conn, 0);
+
+            http_reply(conn, 200, ack_str);
+        }
+        else {
+            http_reply(conn, 400, NULL);
+        }
+        return;
     }
 
     //总电压电流信息
@@ -904,29 +835,27 @@ static void channelStatusMonitoring(void* conn)
     cmd_data_t cmd;
     _OverChnPwrRequest _over_chn_pwr_request;
     _OverAllPwrAckInfo _over_all_pwr_back_info; //设备电源信息
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf=(char*)msg->body.buf;
-#endif
+    char *rx_body_buf=(char*)msg->body.buf;
 
     //转换json参数
     memset(&_over_chn_pwr_request,0,sizeof(_OverChnPwrRequest));
     cjson = json_to_chn_pwr_status_monitor(rx_body_buf,&_over_chn_pwr_request);
     if(cjson==NULL)
     {
-        http_reply(conn, 400, NULL);
-        return ;        
+        if (strstr(rx_body_buf,"type=export")) {
+            download_handle(conn, 1);
+
+            http_reply(conn, 200, ack_str);
+        }
+        else {
+            http_reply(conn, 400, NULL);
+        }
+        return;     
     }
 
-    #if(1)
-    //查询
     if(strcmp(_over_chn_pwr_request.type,"listQuery")==0||strcmp(_over_chn_pwr_request.type,"resetChannel")==0)
     {
         //log_i("channel status request:listQuery");
@@ -1399,7 +1328,6 @@ static void channelStatusMonitoring(void* conn)
             }
         }
     }
-    #endif
 
 quit:
     cJSON_Delete(cjson);
@@ -1419,17 +1347,11 @@ static void sensorStatusMonitoring(void* conn)
     _OverSensorBackInfo _over_all_sensor_back_info;
     GlobalSensorManger _globalSensorMangerTemp ;
     GlobalSensorInfo _globalSensorInfo;
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf=(char*)msg->body.buf;
-#endif
+    char *rx_body_buf=(char*)msg->body.buf;
+
     //转换json参数
     cjson = json_to_sensor_manage(rx_body_buf,&_over_all_sensor_request);
     if(cjson==NULL)
@@ -1921,19 +1843,11 @@ static void alarmProtect(void *conn)
     cJSON *cjson;
     _AlarmRequestInfo _alarm_request_info;
     _AlarmAckInfo _alarm_ack_info; //填充数据
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
     int nAlarmNumber=0;
-    
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-    usleep(100000);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf=(char*)msg->body.buf;
-#endif
+    char *rx_body_buf=(char*)msg->body.buf;
 
     memset(&_alarm_request_info, 0, sizeof(_alarm_request_info));
     //转换json参数
@@ -2196,21 +2110,14 @@ static void alarmProtect(void *conn)
 static void logInformation(void *conn)
 {
     int ret = -1 ;
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
     int nAlarmNum = 0;
     cJSON *cjson;
     _LogInformationRequestInfo __logInformationRequestInfo;
     _AlarmAckInfo _alarm_ack_info; //填充数据
-    
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf=(char*)msg->body.buf;
-#endif
+    char *rx_body_buf=(char*)msg->body.buf;
     
     memset(&__logInformationRequestInfo,0,sizeof(_LogInformationRequestInfo));
     cjson = json_to_loginformation_manage(rx_body_buf,&__logInformationRequestInfo);
@@ -2390,22 +2297,14 @@ static void logInformation(void *conn)
 static void communicationManagement(void *conn)
 {
     int r = -1 ;
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
     cJSON *cjson;
     _CommunicationManageRequestInfo _communicationManageRequestInfo;
 	_CommunicationManageRequestInfo reqInfo;
     GlobalDeviceInfo *devInfo=__globalDeviceManage._global_device_info;
-    
-#ifdef USE_WEBAPP
-    usleep(100000);
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf=(char*)msg->body.buf;
-#endif
+    char *rx_body_buf=(char*)msg->body.buf;
 
     //转换json参数
     cjson = json_to_communication_manage(rx_body_buf,&reqInfo);
@@ -2508,19 +2407,12 @@ static void serviceManagement(void *conn)
 {
     __globalDeviceManage.view_page=-1;
     int ret = -1 ;
-    char* rx_body_buf = NULL;
     cJSON *cjson;
     _ServiceManageRequestInfo _serviceManageRequestInfo;
     char* ack_str = NULL ;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char *rx_body_buf = (char*)msg->body.buf;
 
     //转换json参数
     memset(&_serviceManageRequestInfo, 0, sizeof(_serviceManageRequestInfo));
@@ -3271,19 +3163,12 @@ static void systemManagent(void *conn)
 {
     __globalDeviceManage.view_page=-1;
     int ret = -1 ;
-    char* rx_body_buf = NULL;
     cJSON *cjson;
     _UserRoleManageInfo _UserRoleManageRequestInfo;
     char* ack_str = NULL ;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char *rx_body_buf = (char*)msg->body.buf;
 
     //转换json参数
     cjson = json_to_user_manage(rx_body_buf,&_UserRoleManageRequestInfo);
@@ -3450,21 +3335,13 @@ static void systemManagent(void *conn)
 static void equipmentMintenance(void *conn)
 {
     int ret = -1 ;
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
     cJSON *cjson;
      _OverBackStsInfo _over_back_sts_info;       //设备总体状态信息
     _Equipment_Mintenance _Over_equipment_mintenance;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    rx_body_buf = (char*)httpGetBodyInput(s); 
-    usleep(500000);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char *rx_body_buf = (char*)msg->body.buf;
 
     //转换json参数
     cjson = json_to_over_equipment_mintenance(rx_body_buf,&_Over_equipment_mintenance);
@@ -3570,17 +3447,10 @@ static void equipmentMintenance(void *conn)
 static void equipmentMintenanceUpload(void *conn)
 {
     int r = -1 ;
-    char* rx_body_buf = NULL;
     char* ack_str = NULL ;
-
-#ifdef USE_WEBAPP
-    HttpStream *s=(HttpStream*)conn;
-    http_reply(conn, 200, NULL);
-#else
     mg_stream_t *s=(mg_stream_t*)conn;
     struct mg_http_message *msg=s->ev_data;
-    rx_body_buf = (char*)msg->body.buf;
-#endif
+    char *rx_body_buf = (char*)msg->body.buf;
     char path[200];
     
     if(strstr(msg->uri.buf, "uploadType=gjsj")) {        //firmware upload
@@ -3596,7 +3466,7 @@ static void equipmentMintenanceUpload(void *conn)
         upload_handle(conn, path);
     }
 
-    http_reply(conn, 200, "");
+    http_reply(conn, 200, "操作成功");
 }
 
 static int webSetCallback(void)

+ 20 - 16
pro/src/snmp_nms.c

@@ -1,14 +1,14 @@
-#include "snmpget.h"
-#include "sys.h"
 
-#include <net-snmp/utilities.h>
 #include <net-snmp/net-snmp-config.h>
 #include <net-snmp/net-snmp-includes.h>
+//#include <net-snmp/varbind.h>
+#include "snmp_nms.h"
+#include "sys.h"
 
-
+#define NETSNMP_DS_APP_DONT_FIX_PDUS 0
 
 typedef struct {
-    
+    int  flag;
 }snmp_handle_t;
 static snmp_handle_t snHandle;
 
@@ -23,17 +23,17 @@ int snmp_nms_init(void)
 
 
 //snmp_get("public","192.168.1.133","1.3.6.1.2.1.1.1.0");
-static char* snmp_get(char *community, char *ip, char *oid, int msgtype)
+static char* snmp_get(char *community, char *ip, char *oid_array, int msgtype)
 {
     int             count;
     int             current_name = 0;
-    char           *names[SNMP_MAX_CMDLINE_OIDS];
+    char            *names[SNMP_MAX_CMDLINE_OIDS];
     oid             name[MAX_OID_LEN];
     size_t          name_length;
     int             status;
-    int             failures = 0;
     int             exitval = 0;
-    netsnmp_pdu    *response;
+     netsnmp_pdu    *pdu;
+    netsnmp_pdu     *response;
     netsnmp_variable_list *vars=NULL;
     
     netsnmp_session  *ss;
@@ -47,18 +47,22 @@ static char* snmp_get(char *community, char *ip, char *oid, int msgtype)
     
     ss = snmp_open(&session);
     if (ss == NULL) {
-        return -1;
+        return NULL;
     }
     
-    names[0] = oid;
+    names[0] = oid_array;
     current_name = 1;
     
     pdu = snmp_pdu_create(msgtype);
-    for (count = 0; count < current_name; count++) {
+    if(msgtype==SNMP_MSG_GETBULK) {
+        pdu->non_repeaters = non_repeaters;
+        pdu->max_repetitions = max_repetitions;
+        snmp_add_null_var(pdu, names[0].name, names[0].name_len);
+    }
+    else {
         name_length = MAX_OID_LEN;
-        if (!snmp_parse_oid(names[count], name, &name_length)) {
-            snmp_perror(names[count]);
-            failures++;
+        if (!snmp_parse_oid(oid_array, name, &name_length)) {
+            //failures++;
         }
         else {
             snmp_add_null_var(pdu, name, name_length);
@@ -118,7 +122,7 @@ static char* snmp_get(char *community, char *ip, char *oid, int msgtype)
     snmp_close(ss);
     netsnmp_cleanup_session(&session);
     
-    return 0;
+    return NULL;
 }
 
 //SNMP_VERSION_1 SNMP_VERSION_2c SNMP_VERSION_3

+ 35 - 21
pro/src/websocket_handle.c

@@ -10,7 +10,7 @@
 #include "cascade.h"
 
 
-//#define USE_BROADCAST
+#define USE_ONE_CONN
 
 #define WS_MAX    10
 
@@ -31,25 +31,42 @@ typedef struct {
 }ws_handle_t;
 static ws_handle_t wsHandle;
 
-static int ws_broadcast(ws_handle_t *wh, void *data, int len) 
+static int ws_is_online(ws_handle_t *wh) 
+{
+#ifdef USE_ONE_CONN
+    return (wh->c)?1:0;
+#else
+    return (wh->ws_cnt>0)?1:0;
+#endif
+}
+static int ws_send(ws_handle_t *wh, void *data, int len, int isBinary) 
+{
+    if(!wh->c) {
+        return -1;
+    }
+    mg_ws_send(wh->c, data, len, isBinary?WEBSOCKET_OP_BINARY:WEBSOCKET_OP_TEXT);
+    return 0;
+}
+static int ws_broadcast(ws_handle_t *wh, void *data, int len, int isBinary) 
 {
     int r=-1;
     mg_conn_t *c;
 
-#ifdef USE_BROADCAST
     for (c=wh->mgr.conns; c!=NULL; c=c->next) {
-        mg_ws_send(c, data, len, WEBSOCKET_OP_TEXT);
-        r = 0;
-    }
-#else
-    if(wh->c) {
-        mg_ws_send(wh->c, data, len, WEBSOCKET_OP_TEXT);
+        mg_ws_send(c, data, len, isBinary?WEBSOCKET_OP_BINARY:WEBSOCKET_OP_TEXT);
         r = 0;
     }
-#endif
 
     return r;
 }
+static int ws_send_data(ws_handle_t *wh, void *data, int len)
+{
+#ifdef USE_ONE_CONN
+    return ws_send(wh, data, len, 0);
+#else
+    return ws_broadcast(wh, data, len, 0);
+#endif
+}
 
 
 static void read_ipaddr(ws_handle_t *h)
@@ -73,11 +90,7 @@ static void web_update(ws_handle_t *wh)
     GlobalDeviceManager* gdm= &__globalDeviceManage;
     GlobalDeviceManager* gdm2=&__globalDeviceManage2;
 
-#ifdef USE_BROADCAST
-    if(wh->ws_cnt>0)
-#else
-    if(wh->c!=NULL)
-#endif
+    if(ws_is_online(wh))
     {
         //overall info
         if(gdm->_global_device_info->product_pwr_type==SmartPDU_Tree_AC_Tree ||
@@ -108,7 +121,7 @@ static void web_update(ws_handle_t *wh)
             {
                 json_str = over_all_pwr_monitor_Tree_AC_to_json(&l1, &l2, &l3);
 
-                ws_broadcast(wh, json_str, strlen(json_str));
+                ws_send_data(wh, json_str, strlen(json_str));
                 cJSON_free((void *)json_str);
             }
         }
@@ -128,7 +141,7 @@ static void web_update(ws_handle_t *wh)
             if (0==nRetTotal)
             {
                 json_str = ws_over_status_ack_to_json(0, &allInfo);
-                ws_broadcast(wh, json_str, strlen(json_str));
+                ws_send_data(wh, json_str, strlen(json_str));
                 cJSON_free(json_str);
             }
         }
@@ -151,7 +164,7 @@ static void web_update(ws_handle_t *wh)
             if (0 == nRetCh)
             {
                 json_str = ws_chn_status_ack_to_json(1, &chInfo);
-                ws_broadcast(wh, json_str, strlen(json_str));
+                ws_send_data(wh, json_str, strlen(json_str));
                 cJSON_free((void *)json_str);
             }
             _OverChnPwrAckInfo *node, *next;
@@ -165,7 +178,7 @@ static void web_update(ws_handle_t *wh)
         //sensor info
         {
             json_str = ws_sensor_status_ack_to_json(&gdm->_globalSensorManger);
-            ws_broadcast(wh, json_str, strlen(json_str));
+            ws_send_data(wh, json_str, strlen(json_str));
             cJSON_free(json_str);
         }
     }
@@ -231,9 +244,10 @@ void* websocket_thread(void* arg)
     int r;
     thread_handle_t *h=(thread_handle_t*)arg;
     ws_handle_t *wh=(ws_handle_t*)h->arg;
+    const char *listen_addr="ws://0.0.0.0:6785";
 
     mg_mgr_init(&wh->mgr);  // Initialise event manager
-    mg_http_listen(&wh->mgr, wh->wpath, fn, NULL);  // Create HTTP listener
+    mg_http_listen(&wh->mgr, listen_addr, fn, NULL);  // Create HTTP listener
     wh->inited = 1;
 
     while(h->quit==0) {
@@ -257,7 +271,7 @@ int websocket_init(void)
     ws_handle_t *wh=&wsHandle;
 
     memset(wh, 0, sizeof(ws_handle_t));
-    read_ipaddr(wh);
+    //read_ipaddr(wh);
 
     thread_start(THREAD_ID_WS, websocket_thread, wh, 30*MB, 0);
     return 0;