Browse Source

Don't send send_mail header if it is not required

This preserves backwards compatibility
mario forzanini 2 years ago
parent
commit
be5cdd44b4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lcmlog

+ 2 - 2
lcmlog

@@ -292,7 +292,7 @@ method_post()
 		read TAGS
 	done
 
-	SEND_MAIL="NOMAIL"
+	SEND_MAIL=""
 	ask "Send the log via email? [default: y]" "y" && SEND_MAIL="MAIL"
 
 	# Update of the pipe
@@ -300,7 +300,7 @@ method_post()
 	printf "%s\n" "${KIND}" >> $pipe
 	printf "%s\n" "${DATE}" >> $pipe
 	printf "%s\n" "${TAGS}" >> $pipe
-	printf "%s\n" "${SEND_MAIL}" >> $pipe
+	[ -z "$SEND_MAIL" ] || printf "%s\n" "${SEND_MAIL}" >> $pipe
 
 
 	# Write log