diff options
author | horchi <vdr@jwendel.de> | 2020-07-27 15:44:12 +0200 |
---|---|---|
committer | horchi <vdr@jwendel.de> | 2020-07-27 15:44:12 +0200 |
commit | 8d38dfabb114d8a93c34ce1258d97e389f5645d9 (patch) | |
tree | 25cf5fc66b907d86890daaa6121c2803c941982d | |
parent | 528e74b41c1ec5012554decc3e88b787ceb2fa95 (diff) | |
download | vdr-epg-daemon-8d38dfabb114d8a93c34ce1258d97e389f5645d9.tar.gz vdr-epg-daemon-8d38dfabb114d8a93c34ce1258d97e389f5645d9.tar.bz2 |
2020-07-27: version 1.1.161 (Alexander Grothe, horchi)\n - change: Porting to new libmicrohttpd\n\n1.1.161
-rw-r--r-- | HISTORY.h | 5 | ||||
-rw-r--r-- | httpd.c | 14 | ||||
-rw-r--r-- | httpd.h | 14 | ||||
-rw-r--r-- | webauth.c | 4 |
4 files changed, 22 insertions, 15 deletions
@@ -4,7 +4,7 @@ * ----------------------------------- */ -#define _VERSION "1.1.160" +#define _VERSION "1.1.161" #define VERSION_DATE "27.07.2020" #define DB_API 7 @@ -19,6 +19,9 @@ * * +2020-07-27: version 1.1.161 (Alexander Grothe, horchi) + - change: Porting to new libmicrohttpd + 2020-07-27: version 1.1.160 (horchi) - change: Minor change of README @@ -1712,7 +1712,7 @@ int cEpgHttpd::performPostData(const char* url, MemoryStruct* data) // Debug ... //*************************************************************************** -int debugPrint(void *cls, enum MHD_ValueKind kind, const char *key, const char *value) +MHD_Result debugPrint(void *cls, enum MHD_ValueKind kind, const char *key, const char *value) { if (kind == MHD_GET_ARGUMENT_KIND) tell(0, "Parameter: '%s' - '%s'", key, value); @@ -1722,7 +1722,7 @@ int debugPrint(void *cls, enum MHD_ValueKind kind, const char *key, const char * return MHD_YES; } -int parameterInfo(void* cls, enum MHD_ValueKind kind, const char* key, const char* value) +MHD_Result parameterInfo(void* cls, enum MHD_ValueKind kind, const char* key, const char* value) { if (strlen((char*)cls) < 1000 - strlen(notNull(value)) - strlen(notNull(key)) - 10) sprintf(eos((char*)cls), "%s:%s;", notNull(key), notNull(value)); @@ -1734,10 +1734,10 @@ int parameterInfo(void* cls, enum MHD_ValueKind kind, const char* key, const cha // Dispatcher //*************************************************************************** -int cEpgHttpd::dispatcher(void* cls, MHD_Connection* tcp, - const char* url, const char* method, - const char* version, const char* upload_data, - size_t* upload_data_size, void** con_cls) +MHD_Result cEpgHttpd::dispatcher(void* cls, MHD_Connection* tcp, + const char* url, const char* method, + const char* version, const char* upload_data, + size_t* upload_data_size, void** con_cls) { const char* contentNotFound = "<html><body>Page not found</body></html>"; unsigned int statusCode = MHD_HTTP_OK; @@ -1746,7 +1746,7 @@ int cEpgHttpd::dispatcher(void* cls, MHD_Connection* tcp, double requestStartAt = cMyTimeMs::Now(); // int acceptRequest = no; - int state; + MHD_Result state; // reset session @@ -16,6 +16,10 @@ #include <microhttpd.h> +#if MHD_VERSION < 0x00097002 +# define MHD_Result int +#endif + #include "lib/epgservice.h" #include "lib/json.h" #include "lib/configuration.h" @@ -198,12 +202,12 @@ class cEpgHttpd : public cFrame, public cWebTools, public cSystemNotification // static - static int dispatcher(void* cls, struct MHD_Connection* connection, - const char* url, const char* method, - const char* version, const char* upload_data, - size_t* upload_data_size, void** con_cls); + static MHD_Result dispatcher(void* cls, struct MHD_Connection* connection, + const char* url, const char* method, + const char* version, const char* upload_data, + size_t* upload_data_size, void** con_cls); - static int askForAuthentication(struct MHD_Connection* connection, const char* realm); + static MHD_Result askForAuthentication(struct MHD_Connection* connection, const char* realm); static int isAuthenticated(struct MHD_Connection* connection, const char* username, const char* password); @@ -54,9 +54,9 @@ char* string2base64(const char* message) // Ask For Authentication //*************************************************************************** -int cEpgHttpd::askForAuthentication(struct MHD_Connection* connection, const char* realm) +MHD_Result cEpgHttpd::askForAuthentication(struct MHD_Connection* connection, const char* realm) { - int status; + MHD_Result status; struct MHD_Response* response; char* headervalue = 0; |