summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-02-03 21:40:34 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-02-03 21:40:34 +0100
commit775d0e5de4b99dbcf6dbd243bfc6c0c4660b4b5b (patch)
treed45b20ade48b18b9137276d440415f7a837213f7
parent069b5cac49980f9ff2bb6eaa27a9a91ccfbc7b2f (diff)
downloadrvnit-775d0e5de4b99dbcf6dbd243bfc6c0c4660b4b5b.tar.gz
rvnit-775d0e5de4b99dbcf6dbd243bfc6c0c4660b4b5b.tar.xz
rvnit-775d0e5de4b99dbcf6dbd243bfc6c0c4660b4b5b.zip
logging tweaks
-rw-r--r--rvnit.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/rvnit.c b/rvnit.c
index 52ba9ec..c7b9038 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -343,26 +343,23 @@ socket_loop(void* ignored)
 
 		if ((cmd == 'd' || cmd == 'u' || charsig(cmd)) && rd > 1) {
 			buf[rd] = 0;
-			printf("got %c|%s|\n", cmd, buf+1);
 
 			pthread_mutex_lock(&services_lock);
 			for (int i = 0; i < MAX_SV; i++) {
 				if (strcmp(services[i].name, buf+1) == 0) {
 					write(connfd, "ok\n", 3);
 					if (cmd == 'd') {
-						printf("setting %s down\n",
-						    services[i].name);
+						LOG("setting %s down", services[i].name);
 						services[i].state = DOWN;
 						want_rescan = 1;
 						pthread_kill(main_thread, SIGCONT);
 					} else if (cmd == 'u') {
-						printf("setting %s up\n",
-						    services[i].name);
+						LOG("setting %s up", services[i].name);
 						services[i].state = UP;
 						want_rescan = 1;
 						pthread_kill(main_thread, SIGCONT);
 					} else if (charsig(cmd) && services[i].pid > 0) {
-						printf("sending signal %d to %s\n", charsig(cmd), services[i].name);
+						LOG("sending signal %d to %s", charsig(cmd), services[i].name);
 						kill(services[i].pid, charsig(cmd));
 					}
 				}
@@ -908,7 +905,6 @@ cont1:
 		}
 
 		if (want_rescan) {
-			printf("rescanning state\n");
 			for (i = 0; i < MAX_SV; i++) {
 				if (services[i].name[2] == 'L') {
 					if (services[i].state == UP &&