]> git.rkrishnan.org Git - dttsp.git/blobdiff - jDttSP/update.c
Added leading '-' to command strings to prevent echo to log
[dttsp.git] / jDttSP / update.c
index 833366b80fdb3db269c72a3f24b49cacc68c080a..0e6ef673d0c5821d00ac9a230394133fbb54a765 100644 (file)
@@ -977,8 +977,14 @@ CTE update_cmds[] = {
 
 int
 do_update(char *str, FILE *log) {
+  BOOLEAN quiet = FALSE;
   SPLIT splt = &uni.update.splt;
 
+  if (*str == '-') {
+    quiet = TRUE;
+    str++;
+  }
+
   split(splt, str);
 
   if (NF(splt) < 1) return -1;
@@ -993,7 +999,7 @@ do_update(char *str, FILE *log) {
       val = (*thk)(NF(splt) - 1, Fptr(splt, 1));
       sem_post(&top.sync.upd.sem);
 
-      if (log) {
+      if (log && !quiet) {
        int i;
        char *s = since(&top.start_tv);
        fprintf(log, "update[%s]: returned %d from", s, val);