From bd63d69bb0728f6416f7f910f2909ec86d970b87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 20 Feb 2025 14:36:43 -0500
Subject: [PATCH] opendht: log push notification handling result

Change-Id: I6d88519a637c876848407b1e7b59e746b895c185
---
 contrib/src/opendht/SHA512SUMS   | 2 +-
 contrib/src/opendht/package.json | 2 +-
 contrib/src/opendht/rules.mak    | 2 +-
 src/jamidht/jamiaccount.cpp      | 6 ++++--
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/contrib/src/opendht/SHA512SUMS b/contrib/src/opendht/SHA512SUMS
index 8945ad3f3..aaa6212e3 100644
--- a/contrib/src/opendht/SHA512SUMS
+++ b/contrib/src/opendht/SHA512SUMS
@@ -1 +1 @@
-614bed3cee2eda0cfa5d2e132b9bf3c8d7676f80b30121e34b2ae00cdc4bf9958f3d0ebb10092646a69fbceff9c2d5f531b1ff92d0804e74a6e57429d6a004af  opendht-5237f0a3b3eb8965f294de706ad73596569ae1dd.tar.gz
+d6927667242ab5ca80f04995c4ba9c4f8fa24a2ff1dea5b3d4afa2943077c94ce0f97ad9b7c269cfe58df32709acc89ba648faff0a43ed0099b5a8c857e25d87  opendht-b0fa19d6f8a5f6af884b278f4351e5733c6a99e2.tar.gz
diff --git a/contrib/src/opendht/package.json b/contrib/src/opendht/package.json
index d0fac965a..afadf0296 100644
--- a/contrib/src/opendht/package.json
+++ b/contrib/src/opendht/package.json
@@ -1,6 +1,6 @@
 {
     "name": "opendht",
-    "version": "7c184e1c8cbdd87d88912831eb0b845eb427fdfb",
+    "version": "b0fa19d6f8a5f6af884b278f4351e5733c6a99e2",
     "url": "https://github.com/savoirfairelinux/opendht/archive/__VERSION__.tar.gz",
     "deps": [
         "argon2",
diff --git a/contrib/src/opendht/rules.mak b/contrib/src/opendht/rules.mak
index 04c64f451..1cb36b5ec 100644
--- a/contrib/src/opendht/rules.mak
+++ b/contrib/src/opendht/rules.mak
@@ -1,5 +1,5 @@
 # OPENDHT
-OPENDHT_VERSION := 5237f0a3b3eb8965f294de706ad73596569ae1dd
+OPENDHT_VERSION := b0fa19d6f8a5f6af884b278f4351e5733c6a99e2
 OPENDHT_URL := https://github.com/savoirfairelinux/opendht/archive/$(OPENDHT_VERSION).tar.gz
 
 PKGS += opendht
diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp
index 75ac0eba9..7170476d4 100644
--- a/src/jamidht/jamiaccount.cpp
+++ b/src/jamidht/jamiaccount.cpp
@@ -3299,8 +3299,10 @@ void
 JamiAccount::pushNotificationReceived(const std::string& from,
                                       const std::map<std::string, std::string>& data)
 {
-    JAMI_WARNING("[Account {:s}] pushNotificationReceived: {:s}", getAccountID(), from);
-    dht_->pushNotificationReceived(data);
+    auto ret_future = dht_->pushNotificationReceived(data);
+    dht::ThreadPool::computation().run([id = getAccountID(), ret_future = ret_future.share()] {
+        JAMI_WARNING("[Account {:s}] pushNotificationReceived: {}", id, (uint8_t)ret_future.get());
+    });
 }
 
 std::string
-- 
GitLab