diff mbox series

Use valid JSON key format when sending progress info message

Message ID 20201209193749.1112802-1-sava.jakovljev@teufel.de
State Accepted
Headers show
Series Use valid JSON key format when sending progress info message | expand

Commit Message

Sava Jakovljev Dec. 9, 2020, 7:37 p.m. UTC
Signed-off-by: Sava Jakovljev <sava.jakovljev@teufel.de>
---
 core/progress_thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/progress_thread.c b/core/progress_thread.c
index 24d9563..7f1c176 100644
--- a/core/progress_thread.c
+++ b/core/progress_thread.c
@@ -196,7 +196,7 @@  void swupdate_progress_info(RECOVERY_STATUS status, int cause, const char *info)
 {
 	struct swupdate_progress *pprog = &progress;
 	pthread_mutex_lock(&pprog->lock);
-	snprintf(pprog->msg.info, sizeof(pprog->msg.info), "{'%d': %s}",
+	snprintf(pprog->msg.info, sizeof(pprog->msg.info), "{\"%d\": %s}",
 			cause, info);
 	pprog->msg.infolen = strlen(pprog->msg.info);
 	pprog->msg.status = status;