Browse Source

notify: Add start/stop events.

Georgi Chorbadzhiyski 12 years ago
parent
commit
8ce734802c
2 changed files with 3 additions and 0 deletions
  1. 1
    0
      ChangeLog
  2. 2
    0
      tsdecrypt.c

+ 1
- 0
ChangeLog View File

@@ -1,4 +1,5 @@
1 1
 xxxx-xx-xx : Version -next
2
+ * notify: Added start/stop events.
2 3
  * notify: Added option to execute external script on event.
3 4
 
4 5
 2011-11-14 : Version 3.2

+ 2
- 0
tsdecrypt.c View File

@@ -540,6 +540,7 @@ int main(int argc, char **argv) {
540 540
 	ts.notify = notify_alloc(&ts);
541 541
 
542 542
 	ts_LOGf("Start %s\n", program_id);
543
+	notify(&ts, "START", "Starting %s", program_id);
543 544
 
544 545
 	if (ts.input.type == NET_IO && udp_connect_input(&ts.input) < 1)
545 546
 		goto EXIT;
@@ -608,6 +609,7 @@ EXIT:
608 609
 			pthread_join(ts.write_thread, NULL);
609 610
 	}
610 611
 
612
+	notify(&ts, "STOP", "Stopping %s", program_id);
611 613
 	ts_LOGf("Stop %s\n", program_id);
612 614
 
613 615
 	if (ts.syslog_active)

Loading…
Cancel
Save