Skip to content

Commit 91ba698

Browse files
committed
WEB: updated for libmicrohttpd-0.9.72
1 parent cda6fa6 commit 91ba698

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

src/platform/web/main.cpp

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ void log(const char *format, ...) {
101101
}
102102

103103
// allow or deny access
104-
int accept_cb(void *cls,
105-
const struct sockaddr *addr,
106-
socklen_t addrlen) {
104+
MHD_Result accept_cb(void *cls, const struct sockaddr *addr, socklen_t addrlen) {
107105
return MHD_YES;
108106
}
109107

@@ -191,14 +189,14 @@ MHD_Response *get_response(struct MHD_Connection *connection, const char *path)
191189

192190
// server callback
193191
// see: /usr/share/doc/libmicrohttpd-dev/examples
194-
int access_cb(void *cls,
195-
struct MHD_Connection *connection,
196-
const char *url,
197-
const char *method,
198-
const char *version,
199-
const char *upload_data,
200-
size_t *upload_data_size,
201-
void **ptr) {
192+
MHD_Result access_cb(void *cls,
193+
struct MHD_Connection *connection,
194+
const char *url,
195+
const char *method,
196+
const char *version,
197+
const char *upload_data,
198+
size_t *upload_data_size,
199+
void **ptr) {
202200
static int dummy;
203201
if (&dummy != *ptr) {
204202
// The first time only the headers are valid,
@@ -217,7 +215,7 @@ int access_cb(void *cls,
217215
strncpy(opt_command, upload_data, size);
218216
}
219217

220-
int result;
218+
MHD_Result result;
221219
struct MHD_Response *response = get_response(connection, url + 1);
222220
if (response != NULL) {
223221
result = MHD_queue_response(connection, MHD_HTTP_OK, response);
@@ -397,10 +395,9 @@ struct ValueIteratorClosure {
397395
int _element;
398396
};
399397

400-
int valueIterator(void *cls, enum MHD_ValueKind kind,
401-
const char *key, const char *value) {
398+
MHD_Result valueIterator(void *cls, enum MHD_ValueKind kind, const char *key, const char *value) {
402399
ValueIteratorClosure *closure = (ValueIteratorClosure *)cls;
403-
int result;
400+
MHD_Result result;
404401
if (closure->_count++ == closure->_element) {
405402
closure->_result = value;
406403
result = MHD_NO;
@@ -410,8 +407,7 @@ int valueIterator(void *cls, enum MHD_ValueKind kind,
410407
return result;
411408
}
412409

413-
int countIterator(void *cls, enum MHD_ValueKind kind,
414-
const char *key, const char *value) {
410+
MHD_Result countIterator(void *cls, enum MHD_ValueKind kind, const char *key, const char *value) {
415411
return MHD_YES;
416412
}
417413

0 commit comments

Comments
 (0)