diff Platforms/Wasm/WasmWebService.cpp @ 940:861c080ef47b

handling httpStatus in WebService error messages
author Alain Mazy <alain@mazy.be>
date Fri, 02 Aug 2019 17:38:31 +0200
parents 4f2416d519b4
children 8a0a62189f46
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.cpp	Mon Jul 22 14:29:23 2019 +0200
+++ b/Platforms/Wasm/WasmWebService.cpp	Fri Aug 02 17:38:31 2019 +0200
@@ -43,12 +43,13 @@
 
   void EMSCRIPTEN_KEEPALIVE WasmWebService_NotifyError(void* failureCallable,
                                                        const char* uri,
+                                                       unsigned int httpStatus,
                                                        void* payload)
   {
     if (failureCallable != NULL)
     {
       reinterpret_cast<OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestErrorMessage>*>(failureCallable)->
-        Apply(Deprecated::IWebService::HttpRequestErrorMessage(uri, reinterpret_cast<Orthanc::IDynamicObject*>(payload)));
+        Apply(Deprecated::IWebService::HttpRequestErrorMessage(uri, static_cast<Orthanc::HttpStatus>(httpStatus), reinterpret_cast<Orthanc::IDynamicObject*>(payload)));
     }
   }