[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: add stopping state
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: add stopping state |
Date: |
Tue, 24 Sep 2019 18:24:00 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new d07beeb53 add stopping state
d07beeb53 is described below
commit d07beeb5398659712e370a977ade6d9a27b84522
Author: Florian Dold <address@hidden>
AuthorDate: Tue Sep 24 18:21:53 2019 +0200
add stopping state
---
src/arm/gnunet-arm.c | 26 +++++++++++++++-----------
src/arm/gnunet-service-arm.c | 4 ++++
src/include/gnunet_arm_service.h | 6 ++++++
3 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c
index fcbff2331..954d31cfb 100644
--- a/src/arm/gnunet-arm.c
+++ b/src/arm/gnunet-arm.c
@@ -561,20 +561,24 @@ list_callback(void *cls,
fprintf(stdout, "%s (binary='%s', status=stopped)\n", list[i].name,
list[i].binary);
break;
case GNUNET_ARM_SERVICE_STATUS_FAILED:
- restart_in = GNUNET_TIME_absolute_get_remaining (list[i].restart_at);
- fprintf(stdout, "%s (binary='%s', status=failed, exit_status=%d,
restart_delay='%s')\n",
- list[i].name,
- list[i].binary,
- list[i].last_exit_status,
- GNUNET_STRINGS_relative_time_to_string (restart_in,
GNUNET_YES));
- break;
+ restart_in = GNUNET_TIME_absolute_get_remaining (list[i].restart_at);
+ fprintf(stdout, "%s (binary='%s', status=failed, exit_status=%d,
restart_delay='%s')\n",
+ list[i].name,
+ list[i].binary,
+ list[i].last_exit_status,
+ GNUNET_STRINGS_relative_time_to_string (restart_in,
GNUNET_YES));
+ break;
case GNUNET_ARM_SERVICE_STATUS_FINISHED:
- fprintf(stdout, "%s (binary='%s', status=finished)\n", list[i].name,
list[i].binary);
- break;
+ fprintf(stdout, "%s (binary='%s', status=finished)\n", list[i].name,
list[i].binary);
+ break;
case GNUNET_ARM_SERVICE_STATUS_STARTED:
- fprintf(stdout, "%s (binary='%s', status=started)\n", list[i].name,
list[i].binary);
- break;
+ fprintf(stdout, "%s (binary='%s', status=started)\n", list[i].name,
list[i].binary);
+ break;
+ case GNUNET_ARM_SERVICE_STATUS_STOPPING:
+ fprintf(stdout, "%s (binary='%s', status=stopping)\n", list[i].name,
list[i].binary);
+ break;
default:
+ GNUNET_break_op (0);
fprintf(stdout, "%s (binary='%s', status=unknown)\n", list[i].name,
list[i].binary);
break;
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index b30ae518e..65404bbed 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -1400,6 +1400,10 @@ handle_list(void *cls, const struct GNUNET_ARM_Message
*request)
ssm->last_exit_status = htons (sl->last_exit_status);
}
}
+ else if ((NULL != sl->killing_client) || (GNUNET_YES == in_shutdown))
+ {
+ ssm->status = htonl (GNUNET_ARM_SERVICE_STATUS_STOPPING);
+ }
else
{
ssm->status = htonl (GNUNET_ARM_SERVICE_STATUS_STARTED);
diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h
index 9e79c26e7..32355a3e5 100644
--- a/src/include/gnunet_arm_service.h
+++ b/src/include/gnunet_arm_service.h
@@ -174,6 +174,12 @@ enum GNUNET_ARM_ServiceStatus
* The service was started, but then exited normally.
*/
GNUNET_ARM_SERVICE_STATUS_FINISHED = 3,
+
+ /**
+ * The service was started, and we're currently waiting
+ * for it to be stopped.
+ */
+ GNUNET_ARM_SERVICE_STATUS_STOPPING = 4,
};
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: add stopping state,
gnunet <=