Mercurial > hgrepos > hgweb.cgi > s4
comparison s4-funcs.sh @ 721:fce9d5977822
Put strings before hexizing to smail_queue log
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 31 May 2020 10:42:15 +0900 |
parents | 093be7d30a6e |
children | 78cc4ba7bf42 |
comparison
equal
deleted
inserted
replaced
720:f92df08e64ef | 721:fce9d5977822 |
---|---|
1262 now=`query "SELECT datetime('now', 'localtime');"` | 1262 now=`query "SELECT datetime('now', 'localtime');"` |
1263 if [ $? -eq 0 ]; then | 1263 if [ $? -eq 0 ]; then |
1264 rcpts="X'"`echo "$1"|hexize`"'" | 1264 rcpts="X'"`echo "$1"|hexize`"'" |
1265 subj="X'"`echo "$2"|hexize`"'" | 1265 subj="X'"`echo "$2"|hexize`"'" |
1266 text="X'"`cat | hexize`"'" | 1266 text="X'"`cat | hexize`"'" |
1267 err "rcpts=[$rcpts] s=[$subj] t=[$text]" | 1267 err "smail_queue: rcpts=[$1] s=[$2] t:hex=[$text]" |
1268 mintime=$(cat <<-EOF | sq $workdb | 1268 mintime=$(cat <<-EOF | sq $workdb |
1269 CREATE TABLE IF NOT EXISTS smailq(rcpts, subj, text, time); | 1269 CREATE TABLE IF NOT EXISTS smailq(rcpts, subj, text, time); |
1270 INSERT INTO smailq VALUES($rcpts, $subj, $text, '$now'); | 1270 INSERT INTO smailq VALUES($rcpts, $subj, $text, '$now'); |
1271 SELECT min(time) FROM smailq WHERE rcpts=$rcpts AND subj=$subj; | 1271 SELECT min(time) FROM smailq WHERE rcpts=$rcpts AND subj=$subj; |
1272 EOF | 1272 EOF |