You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.5 KiB

  1. --- a/src/ulfius.c
  2. +++ b/src/ulfius.c
  3. @@ -61,7 +61,7 @@ int y_close_logs() {
  4. /**
  5. * Fill a map with the key/values specified
  6. */
  7. -static int ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
  8. +static enum MHD_Result ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
  9. char * tmp;
  10. int res;
  11. UNUSED(kind);
  12. @@ -94,7 +94,7 @@ static int ulfius_fill_map_check_utf8(void * cls, enum MHD_ValueKind kind, const
  13. /**
  14. * Fill a map with the key/values specified
  15. */
  16. -static int ulfius_fill_map(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
  17. +static enum MHD_Result ulfius_fill_map(void * cls, enum MHD_ValueKind kind, const char * key, const char * value) {
  18. char * tmp;
  19. int res;
  20. UNUSED(kind);
  21. @@ -290,7 +290,7 @@ void mhd_request_completed (void *cls, struct MHD_Connection *connection,
  22. * if a parameter is larger than max_post_param_size, truncate it
  23. * return MHD_NO on error
  24. */
  25. -static int mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const char * key,
  26. +static enum MHD_Result mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, const char * key,
  27. const char * filename, const char * content_type,
  28. const char * transfer_encoding, const char * data, uint64_t off, size_t size) {
  29. @@ -352,7 +352,7 @@ static int mhd_iterate_post_data (void * coninfo_cls, enum MHD_ValueKind kind, c
  30. * function executed by libmicrohttpd every time an HTTP call is made
  31. * return MHD_NO on error
  32. */
  33. -static int ulfius_webservice_dispatcher (void * cls,
  34. +static enum MHD_Result ulfius_webservice_dispatcher (void * cls,
  35. struct MHD_Connection * connection,
  36. const char * url,
  37. const char * method,
  38. @@ -363,7 +363,8 @@ static int ulfius_webservice_dispatcher (void * cls,
  39. struct _u_endpoint * endpoint_list = ((struct _u_instance *)cls)->endpoint_list, ** current_endpoint_list = NULL, * current_endpoint = NULL;
  40. struct connection_info_struct * con_info = * con_cls;
  41. - int mhd_ret = MHD_NO, callback_ret = U_OK, i, close_loop = 0, inner_error = U_OK, mhd_response_flag;
  42. + enum MHD_Result mhd_ret = MHD_NO;
  43. + int callback_ret = U_OK, i, close_loop = 0, inner_error = U_OK, mhd_response_flag;
  44. #ifndef U_DISABLE_WEBSOCKET
  45. // Websocket variables
  46. int upgrade_protocol = 0;