Skip to content

Commit

Permalink
Merge pull request #4 from jimbao/stratosnn-patch-1
Browse files Browse the repository at this point in the history
Allow messages to flow into progress IPC
  • Loading branch information
jimbao authored Dec 9, 2020
2 parents b50d3f8 + 6459159 commit 98a10d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions core/notifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ static void process_notifier (RECOVERY_STATUS status, int event, int level, cons
{
(void)level;

/* Check just in case a process want to send an info outside */
if (status != SUBPROCESS)
return;

switch (event) {
case (CANCELUPDATE):
status = FAILURE;
Expand Down
2 changes: 1 addition & 1 deletion corelib/progress_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void swupdate_progress_info(RECOVERY_STATUS status, int cause, const char *info)
{
struct swupdate_progress *prbar = &progress;
pthread_mutex_lock(&prbar->lock);
snprintf(prbar->msg.info, sizeof(prbar->msg.info), "{\"%d\": %s}",
snprintf(prbar->msg.info, sizeof(prbar->msg.info), "{\"%d\": \"%s\"}",
cause, info);
prbar->msg.infolen = strlen(prbar->msg.info);
prbar->msg.status = status;
Expand Down

0 comments on commit 98a10d6

Please sign in to comment.