Re: [PATCH] /test/ - /checks/ - v2
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Vincent, thanks for the patch, but ;) Please split patch into 3 patches: 1) test, 2) checks, 3) the rest Otherwise it's hard to read :) Please don't downcrease (it should be increased? or use lockfile) sleep time: - sleep 2 + sleep 1 This is also one of your points: > - make check may fail if the computer is too slow. > (i'm working on a better solution than the sleep function) Thanks, Alex Am 10.02.2009 um 15:48 schrieb Vincent CHAVANIS: > This patch fixes: > > - remove logfiles after test program are set with -f flags (most > bashs are interactive now) > - fixes pids variables (typo errors), string contents, white spaces > - fixes pids that were not shutdown. > - changed config ports that are usually used by common services (eg: > 8080 for proxies) > - commented wdp-interface-name=* (bus error) > - fixes decode_emimsg.c segfaults and print new types operation > - fixes /test/ programs segfaults and using the panic() function for > args checks > - fixes WSP_HEADER_* by using wsp_pack_quoted_text() > - make check is now working. > > Known limitations: > - make check cannot be run if the wap kannel daemon is running > (UDP port 9201/9202 already opened) > - make check may fail if the computer is too slow. > (i'm working on a better solution than the sleep function) > > Unknown limitations: > - Does the wsp_pack_quoted_text() is breaking something into wapbox ? > > > Vincent. > > > -- > Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR) > Service Technique/Reseau - NOC > Direction du Developpement xMS+ > http://www.telemaque.fr/ > [email protected] > Tel : +33 4 92 90 99 84 (fax 9142) > diff -rauw /gateway-cvs/checks/check_compiler.sh /gateway/checks/ > check_compiler.sh > --- /gateway-cvs/checks/check_compiler.sh 2001-03-19 > 19:30:53.000000000 +0100 > +++ /gateway/checks/check_compiler.sh 2009-02-09 16:05:59.000000000 > +0100 > @@ -14,4 +14,4 @@ > exit 1 > fi > > -rm check_compiler.log > +rm -f check_compiler.log > diff -rauw /gateway-cvs/checks/check_fakesmsc.sh /gateway/checks/ > check_fakesmsc.sh > --- /gateway-cvs/checks/check_fakesmsc.sh 2006-01-09 > 21:42:08.000000000 +0100 > +++ /gateway/checks/check_fakesmsc.sh 2009-02-10 02:37:03.000000000 > +0100 > @@ -12,23 +12,21 @@ > > gw/bearerbox -v $loglevel gw/smskannel.conf > check_fakesmsc_bb.log > 2>&1 & > bbpid=$! > - > sleep 2 > > -test/fakesmsc -H $host -i $interval -m $times '123 234 text nop' \ > +test/fakesmsc -H $host -r 20000 -i $interval -m $times '123 234 > text nop' \ >> check_fakesmsc.log 2>&1 & > - > sleep 1 > > gw/smsbox -v $loglevel gw/smskannel.conf > check_fakesmsc_sms.log > 2>&1 & > > -running=yes > -while [ $running = yes ] > +running="yes" > +while [ $running = "yes" ] > do > sleep 2 > if grep "Got message $times" check_fakesmsc.log >/dev/null > then > - running=no > + running="no" > fi > done > > @@ -42,6 +40,5 @@ > exit 1 > fi > > -rm check_fakesmsc*.log > - > +rm -f check_fakesmsc*.log > exit 0 > > diff -rauw /gateway-cvs/checks/check_fakewap.sh /gateway/checks/ > check_fakewap.sh > --- /gateway-cvs/checks/check_fakewap.sh 2009-02-09 > 18:18:01.000000000 +0100 > +++ /gateway/checks/check_fakewap.sh 2009-02-10 02:47:29.000000000 > +0100 > @@ -6,7 +6,7 @@ > #set -x > > host=127.0.0.1 > -times=10 > +times=2 > port=8040 > url="http://$host:$port/hello.wml" > loglevel=0 > @@ -14,23 +14,23 @@ > test/test_http_server -f test/hello.wml -p $port > check_http.log > 2>&1 & > httppid=$! > > -sleep 1 > - > gw/bearerbox -v $loglevel gw/wapkannel.conf > check_bb.log 2>&1 & > bbpid=$! > > -sleep 2 > +sleep 1 > > gw/wapbox -v $loglevel gw/wapkannel.conf > check_wap.log 2>&1 & > wappid=$! > > -sleep 2 > +sleep 1 > > test/fakewap -g $host -m $times $url > check_fake.log 2>&1 > ret=$? > > test/test_http -qv 4 http://$host:$port/quit > + > kill -INT $bbpid > +kill -INT $wappid > wait > > if [ "$ret" != 0 ] > @@ -41,8 +41,6 @@ > exit 1 > fi > > -rm check_bb.log check_wap.log check_fake.log check_http.log > +rm -f check_bb.log check_wap.log check_fake.log check_http.log > > exit 0 > - > - > diff -rauw /gateway-cvs/checks/check_headers.sh /gateway/checks/ > check_headers.sh > --- /gateway-cvs/checks/check_headers.sh 2004-07-09 > 01:41:15.000000000 +0200 > +++ /gateway/checks/check_headers.sh 2009-02-10 12:28:01.000000000 > +0100 > @@ -3,6 +3,7 @@ > # Use `test/test_headers' to test gw/wsp_headers.c > > set -e > +#set -x > > loglevel=1 > > @@ -17,4 +18,4 @@ > exit 1 > fi > > -rm check_headers.log > +rm -f check_headers.log > diff -rauw /gateway-cvs/checks/check_http.sh /gateway/checks/ > check_http.sh > --- /gateway-cvs/checks/check_http.sh 2006-01-12 03:40:39.000000000 > +0100 > +++ /gateway/checks/check_http.sh 2009-02-10 02:41:15.000000000 +0100 > @@ -19,18 +19,16 @@ > ssl_key="gw/key.pem" > ssl_clientcert="/tmp/clientcert.pem" > loglevel=0 > -ssl_enabled=yes > +ssl_enabled="yes" > > cat $ssl_cert $ssl_key > $ssl_clientcert > > test/test_http_server -p $port -v $loglevel > check_http_server.log > 2>&1 & > serverpid=$! > - > sleep 1 > > test/test_http_server -p $port_ssl -v $loglevel -s -c $ssl_cert -k > $ssl_key > check_https_server.log 2>&1 & > serverpid_ssl=$! > - > sleep 1 > > test/test_http -r $times $url > check_http.log 2>&1 > @@ -42,7 +40,7 @@ > if grep 'SSL not compiled in' check_https.log > /dev/null > then > echo 'do not check SSL, SSL not compiled in' > - ssl_enabled=no > + ssl_enabled="no" > fi > > if test "$ssl_enabled" = "yes" > @@ -53,15 +51,17 @@ > else > test/test_http -r 1 -s -c $ssl_clientcert $quiturl_ssl >> > check_https.log 2>&1 > rm -f check_https.log > + sleep 1 > fi > > test/test_http -r 1 $quiturl >> check_http.log 2>&1 > if test "$ssl_enabled" = "yes" > then > test/test_http -r 1 -s -c $ssl_clientcert $quiturl_ssl >> > check_https.log 2>&1 > + sleep 1 > fi > > -sleep 2 > +sleep 1 > if grep 'ERROR:|PANIC:' check_http.log check_http_server.log > /dev/ > null > then > echo check_http failed 1>&2 > @@ -79,8 +79,8 @@ > fi > fi > > -rm check_http*.log > -rm $ssl_clientcert > +rm -f check_http*.log > +rm -f $ssl_clientcert > exit 0 > > > diff -rauw /gateway-cvs/checks/check_httpsmsc_kannel.sh /gateway/ > checks/check_httpsmsc_kannel.sh > --- /gateway-cvs/checks/check_httpsmsc_kannel.sh 2006-01-09 > 21:42:08.000000000 +0100 > +++ /gateway/checks/check_httpsmsc_kannel.sh 2009-02-10 > 02:44:08.000000000 +0100 > @@ -3,6 +3,7 @@ > # Use `test/fakesmsc' to test the bearerbox and the smsbox. > > set -e > +#set -x > > times=10 > interval=0 > @@ -11,27 +12,26 @@ > > gw/bearerbox -v $loglevel gw/smskannel.conf > > check_httpsmsc_kannel_sbb.log 2>&1 & > sbbpid=$! > +sleep 1 > > gw/bearerbox -v $loglevel gw/other_smskannel.conf > > check_httpsmsc_kannel_cbb.log 2>&1 & > cbbpid=$! > - > -sleep 2 > +sleep 1 > > test/fakesmsc -H $host -i $interval -m $times '123 234 text relay > nop' \ >> check_httpsmsc_kannel_fake.log 2>&1 & > - > sleep 1 > > gw/smsbox -v $loglevel gw/smskannel.conf > > check_httpsmsc_kannel_ssb.log 2>&1 & > gw/smsbox -v $loglevel gw/other_smskannel.conf > > check_httpsmsc_kannel_csb.log 2>&1 & > > -running=yes > -while [ $running = yes ] > +running="yes" > +while [ $running = "yes" ] > do > sleep 1 > if grep -v "fakesmsc: terminating" > check_httpsmsc_kannel_fake.log >/dev/null > then > - running=no > + running="no" > fi > done > > @@ -46,4 +46,4 @@ > exit 1 > fi > > -rm check_httpsmsc_kannel_*.log > +rm -f check_httpsmsc_kannel_*.log > diff -rauw /gateway-cvs/checks/check_ppg.sh /gateway/checks/ > check_ppg.sh > --- /gateway-cvs/checks/check_ppg.sh 2006-01-09 21:42:08.000000000 > +0100 > +++ /gateway/checks/check_ppg.sh 2009-02-10 14:13:47.000000000 +0100 > @@ -12,9 +12,9 @@ > #set -x > > host=127.0.0.1 > -list_port=8082 > -server_port=8081 > -push_port=8080 > +list_port=18082 > +server_port=18081 > +push_port=18080 > loglevel=0 > username="foo" > password="bar" > @@ -37,7 +37,8 @@ > # File containing the whitelist > whitelist="$prefix/whitelist.txt" > > -test/test_http_server -p $list_port -w $whitelist -b $blacklist > > check_http_list.log 2>&1 & listid=$ > +sleep 1 > +test/test_http_server -p $list_port -w $whitelist -b $blacklist > > check_http_list.log 2>&1 & listid=$! > error=no > > # ok control files requesting an ip bearer. Names contain string > 'ip'. Bearer- > @@ -59,7 +60,7 @@ > if ! grep "and type push response" check_ppg.tmp > /dev/ > null > then > cat check_ppg.tmp >> check_ppg.log 2>&1 > - error=yes > + error="yes" > echo "ppg failed with control file $control_file" > fi > > @@ -73,12 +74,12 @@ > if ! grep "got wdp from wapbox" check_bb.tmp > /dev/null > then > cat check_bb.tmp >> check_bb.log 2>&1 > - error=yes > + error="yes" > echo "bb failed with control file $control_file" > fi > > kill -INT $wappid > - sleep 2 > + sleep 1 > kill -INT $bbpid > sleep 2 > > @@ -132,7 +133,7 @@ > ! grep "and type bad message response" check_ppg.tmp > > /dev/null > then > cat check_ppg.tmp >> check_ppg.log 2>&1 > - error=yes > + error="yes" > echo "ppg failed when control file $control_file" > fi > > @@ -147,12 +148,12 @@ > if grep "got wdp from wapbox" check_bb.tmp > /dev/null > then > cat check_bb.tmp >> check_bb.log 2>&1 > - error=yes > + error="yes" > echo "bb failed when control file $control_file" > fi > > kill -INT $wappid > - sleep 2 > + sleep 1 > kill -INT $bbpid > sleep 2 > > @@ -192,7 +193,7 @@ > do > if [ -f $control_file ] > then > - test/test_http_server -p $server_port > > check_http_sim.tmp 2>&1 & simid=$ > + test/test_http_server -p $server_port > > check_http_sim.tmp 2>&1 & simid=$! > sleep 1 > gw/bearerbox -v $loglevel $conf_file > check_bb.tmp 2>&1 > & bbpid=$! > sleep 2 > @@ -204,7 +205,7 @@ > if ! grep "and type push response" check_ppg.tmp > /dev/ > null > then > cat check_ppg.tmp >> check_ppg.log 2>&1 > - error=yes > + error="yes" > echo "ppg failed with control file $control_file" > fi > > @@ -218,15 +219,16 @@ > if ! grep "got sms from wapbox" check_bb.tmp > /dev/null > then > cat check_bb.tmp >> check_bb.log 2>&1 > - error=yes > + error="yes" > echo "bb failed with control file $control_file" > fi > > kill -INT $wappid > + sleep 1 > kill -INT $bbpid > sleep 2 > test/test_http -qv 4 http://$host:$server_port/quit > - sleep 1 > + sleep 2 > # We can panic when we are going down, too > if test "$error" != "yes" > then > @@ -285,7 +287,7 @@ > ! grep "and type bad message response" check_ppg.tmp > > /dev/null > then > cat check_ppg.tmp >> check_ppg.log 2>&1 > - error=yes > + error="yes" > echo "ppg failed, going down with control file > $control_file" > fi > > @@ -300,16 +302,16 @@ > if grep "got sms from wapbox" check_bb.tmp > /dev/null > then > cat check_bb.tmp >> check_bb.log 2>&1 > - error=yes > + error="yes" > echo "bb failed, going down with control file > $control_file" > fi > > kill -INT $wappid > - sleep 2 > + sleep 1 > kill -INT $bbpid > - sleep 2 > - test/test_http -qv 4 http://$host:$server_port/quit > sleep 1 > + test/test_http -qv 4 http://$host:$server_port/quit > + sleep 2 > > # We can panic when we are going down, too > if test "$error" != "yes" > @@ -338,7 +340,7 @@ > if grep 'ERROR:|PANIC:' check_http_sim.tmp > /dev/null > then > cat check_http_sim.tmp >> check_http_sim.log 2>&1 > - error=yes > + error="yes" > echo "got errors in http_sim when ending tests" > fi > fi > @@ -347,6 +349,8 @@ > fi; > done > > +kill -INT $listid > +sleep 1 > test/test_http -qv 4 http://$host:$list_port/quit > wait > > @@ -362,9 +366,3 @@ > > exit 0 > > - > - > - > - > - > - > diff -rauw /gateway-cvs/checks/check_sendsms.sh /gateway/checks/ > check_sendsms.sh > --- /gateway-cvs/checks/check_sendsms.sh 2006-01-12 > 03:40:39.000000000 +0100 > +++ /gateway/checks/check_sendsms.sh 2009-02-09 17:41:10.000000000 > +0100 > @@ -22,7 +22,7 @@ > > sleep 2 > > -test/fakesmsc -H $host -i $interval -m $times '123 234 text nop' \ > +test/fakesmsc -H $host -r 20000 -i $interval -m $times '123 234 > text nop' \ >> check_sendsms_smsc.log 2>&1 & > > sleep 1 > @@ -59,9 +59,7 @@ > test/test_http $url >> check_sendsms.log 2>&1 > sleep 1 > > -if grep 'WARNING:|ERROR:|PANIC:' check_sendsms*.log >/dev/null || > - [ 1 -ne `grep -c '<123 234 text <Empty reply from service > provider>' \ > - check_sendsms_smsc.log` ] > +if grep 'WARNING:|ERROR:|PANIC:' check_sendsms*.log >/dev/null > then > echo check_sendsms.sh failed with empty message 1>&2 > echo See check_sendsms*.log for info 1>&2 > @@ -138,7 +136,7 @@ > exit 1 > fi > > -rm check_sendsms*.log > +rm -f check_sendsms*.log > > exit 0 > > diff -rauw /gateway-cvs/checks/check_smpp.sh /gateway/checks/ > check_smpp.sh > --- /gateway-cvs/checks/check_smpp.sh 2003-02-13 11:35:26.000000000 > +0100 > +++ /gateway/checks/check_smpp.sh 2009-02-09 17:41:05.000000000 +0100 > @@ -7,10 +7,10 @@ > > times=10 > > -test/drive_smpp -v 0 -m $times 2> check_smpp_drive.log & > +test/drive_smpp -v 0 -m $times 2> check_smpp_drive.log 1>&2 & > sleep 1 > > -gw/bearerbox -v 0 test/drive_smpp.conf 2> check_smpp_bb.log & > +gw/bearerbox -v 0 test/drive_smpp.conf 2> check_smpp_bb.log 1>&2 & > bbpid=$! > > running=yes > diff -rauw /gateway-cvs/gw/pushkannel.conf /gateway/gw/pushkannel.conf > --- /gateway-cvs/gw/pushkannel.conf 2006-02-04 15:37:57.000000000 > +0100 > +++ /gateway/gw/pushkannel.conf 2009-02-10 12:35:09.000000000 +0100 > @@ -21,7 +21,7 @@ > #status-password = foo > #admin-deny-ip = "" > #admin-allow-ip = "" > -wdp-interface-name = "*" > +#wdp-interface-name = "*" > #log-file = "/tmp/bearerbox.log" > #log-level = 0 > box-deny-ip = "*.*.*.*" > @@ -45,8 +45,8 @@ > > group = ppg > ppg-url = /cgi-bin/wap-push.cgi > -ppg-port = 8080 > -#ppg-ssl-port = 8081 > +ppg-port = 18080 > +#ppg-ssl-port = 18081 > concurrent-pushes = 100 > trusted-pi = false > users = 1024 > @@ -74,7 +74,7 @@ > group = smsc > smsc = fake > smsc-id = FAKE > -port = 10000 > +port = 10010 > connect-allow-ip = 127.0.0.1 > > # SMSBOX SETUP (a kludge!) > diff -rauw /gateway-cvs/gw/smskannel.conf /gateway/gw/smskannel.conf > --- /gateway-cvs/gw/smskannel.conf 2006-01-09 21:42:08.000000000 +0100 > +++ /gateway/gw/smskannel.conf 2009-02-06 17:24:55.000000000 +0100 > @@ -66,7 +66,7 @@ > group = smsc > smsc = fake > smsc-id = FAKE > -port = 10000 > +port = 20000 > connect-allow-ip = 127.0.0.1 > > #--------------------------------------------- > diff -rauw /gateway-cvs/gw/wapkannel.conf /gateway/gw/wapkannel.conf > --- /gateway-cvs/gw/wapkannel.conf 2006-01-09 21:42:08.000000000 +0100 > +++ /gateway/gw/wapkannel.conf 2009-02-09 19:08:59.000000000 +0100 > @@ -27,7 +27,7 @@ > #status-password = foo > #admin-deny-ip = "" > #admin-allow-ip = "" > -wdp-interface-name = "*" > +wdp-interface-name = "127.0.0.1" > #log-file = "/tmp/bearerbox.log" > #log-level = 0 > box-deny-ip = "*.*.*.*" > @@ -45,4 +45,3 @@ > syslog-level = none > #access-log = "/tmp/wapaccess.log" > > - > diff -rauw /gateway-cvs/test/decode_emimsg.c /gateway/test/ > decode_emimsg.c > --- /gateway-cvs/test/decode_emimsg.c 2009-01-14 10:24:19.000000000 > +0100 > +++ /gateway/test/decode_emimsg.c 2009-02-09 12:41:28.000000000 +0100 > @@ -55,7 +55,7 @@ > */ > > /* > - * decode_emimsg.c - Decoding an EMI message. <[email protected]> > + * decode_emimsg.c - Decoding an UCP/EMI packet. <[email protected] > > > * > */ > > @@ -104,22 +104,20 @@ > > gwlib_init(); > > - if (argc < 2) { > - printf("Syntax: %s <msg>\n", argv[0]); > - return -1; > - } > + if (argc < 2) > + panic(0, "Syntax: %s <packet_without_STX/ETX>\n", argv[0]); > > message = octstr_format("\02%s\03", argv[1]); // fit the UCP > specs. > whoami = octstr_create("DECODE"); > > - printf(" /* decode_emimsg - Decoding an EMI message. <[email protected] > > */ \n\n"); > + printf(" /* decode_emimsg - Decoding an UCP/EMI packet. <[email protected] > > */ \n\n"); > > emimsg = get_fields(message, whoami); > > if (emimsg != NULL) { > printf("\n"); > printf("TRN \t%d\n", emimsg->trn); > - printf("TYPE \t%c\n", emimsg->or); > + printf("TYPE \t%c (%s)\n", emimsg->or, emimsg->or == > 'R' ? "Result" : "Operation"); > printf("OPERATION\t%d (%s)\n", emimsg->ot, emi_typeop > (emimsg->ot)); > > if (emimsg->ot == 01) { > @@ -140,13 +138,13 @@ > octstr_get_cstr(emimsg->fields[E01_AMSG])); > } > > - if ((emimsg->ot == 31 || (emimsg->ot >= 50 && emimsg->ot <= > 59)) && > - emimsg->or == 'R' && > + if ((emimsg->ot == 31 || (emimsg->ot >= 50 && emimsg->ot <= > 60)) > + && emimsg->or == 'R' && > (octstr_get_char(emimsg->fields[E50_ADC], 0) == 'A' || > octstr_get_char(emimsg->fields[E50_ADC], 0) == 'N')) { > - printf("E50_ACK \t%s\n", > + printf("E?0_ACK \t%s\n", > octstr_get_cstr(emimsg->fields[E50_ADC])); > - printf("E50_SM \t%s\n", > + printf("E?0_SM \t%s\n", > octstr_get_cstr(emimsg->fields[E50_OADC])); > } > > @@ -238,7 +236,9 @@ > octstr_get_cstr(emimsg->fields[E50_RES5])); > } > > - if (emimsg->ot == 60 || emimsg->ot == 61 || emimsg->ot == > 62) { > + if ((emimsg->ot == 60 || emimsg->ot == 61) && > + (octstr_get_char(emimsg->fields[E50_ADC], 0) != 'A' > && > + octstr_get_char(emimsg->fields[E50_ADC], 0) != > 'N')) { > printf("E60_OADC \t%s\n", > octstr_get_cstr(emimsg->fields[E60_OADC])); > printf("E60_OTON \t%s\n", > diff -rauw /gateway-cvs/test/test_cfg.c /gateway/test/test_cfg.c > --- /gateway-cvs/test/test_cfg.c 2009-01-14 10:24:20.000000000 +0100 > +++ /gateway/test/test_cfg.c 2009-02-10 14:34:21.000000000 +0100 > @@ -65,6 +65,11 @@ > > gwlib_init(); > > + get_and_set_debugs(argc, argv, NULL); > + > + if (argc < 2) > + panic(0, "Syntax: %s <config_file>\n", argv[0]); > + > for (i = 1; i < argc; ++i) { > name = octstr_create(argv[i]); > cfg = cfg_create(name); > diff -rauw /gateway-cvs/test/test_conn.c /gateway/test/test_conn.c > --- /gateway-cvs/test/test_conn.c 2009-01-14 10:24:20.000000000 +0100 > +++ /gateway/test/test_conn.c 2009-02-10 14:30:11.000000000 +0100 > @@ -77,6 +77,9 @@ > > get_and_set_debugs(argc, argv, NULL); > > + if (argc < 3) > + panic(0, "Syntax: %s <host> <port>\n", argv[0]); > + > host = octstr_create(argv[1]); > port = atoi(argv[2]); > i = 50; > diff -rauw /gateway-cvs/test/test_hmac.c /gateway/test/test_hmac.c > --- /gateway-cvs/test/test_hmac.c 2009-02-06 15:01:24.000000000 +0100 > +++ /gateway/test/test_hmac.c 2009-02-10 14:23:48.000000000 +0100 > @@ -95,10 +95,8 @@ > > get_and_set_debugs(argc, argv, NULL); > > - if (argc < 3) { > - printf("Syntax: %s <file>\n", argv[0]); > - return -1; > - } > + if (argc < 3) > + panic(0, "Syntax: %s <key> <file>\n", argv[0]); > > key = octstr_create(argv[1]); > filename = octstr_create(argv[2]); > diff -rauw /gateway-cvs/test/test_md5.c /gateway/test/test_md5.c > --- /gateway-cvs/test/test_md5.c 2009-02-06 15:01:24.000000000 +0100 > +++ /gateway/test/test_md5.c 2009-02-09 13:09:59.000000000 +0100 > @@ -74,10 +74,8 @@ > > get_and_set_debugs(argc, argv, NULL); > > - if (argc < 2) { > - printf("Syntax: %s <txt>\n", argv[0]); > - return -1; > - } > + if (argc < 2) > + panic(0, "Syntax: %s <txt>\n", argv[0]); > > data = octstr_create(argv[1]); > enc = md5(data); > diff -rauw /gateway-cvs/test/test_octstr_dump.c /gateway/test/ > test_octstr_dump.c > --- /gateway-cvs/test/test_octstr_dump.c 2009-02-06 > 15:01:24.000000000 +0100 > +++ /gateway/test/test_octstr_dump.c 2009-02-09 13:12:19.000000000 > +0100 > @@ -74,10 +74,8 @@ > > get_and_set_debugs(argc, argv, NULL); > > - if (argc < 2) { > - printf("Syntax: %s <file>\n", argv[0]); > - return -1; > - } > + if (argc < 2) > + panic(0, "Syntax: %s <file>\n", argv[0]); > > filename = octstr_create(argv[1]); > data = octstr_read_file(octstr_get_cstr(filename)); > diff -rauw /gateway-cvs/test/test_regex.c /gateway/test/test_regex.c > --- /gateway-cvs/test/test_regex.c 2009-02-06 15:01:24.000000000 +0100 > +++ /gateway/test/test_regex.c 2009-02-09 13:12:38.000000000 +0100 > @@ -81,10 +81,8 @@ > > get_and_set_debugs(argc, argv, NULL); > > - if (argc < 4) { > - printf("Syntax: %s <os> <re> <sub>\n", argv[0]); > - return -1; > - } > + if (argc < 4) > + panic(0, "Syntax: %s <os> <re> <sub>\n", argv[0]); > > os = octstr_create(argv[1]); > re = octstr_create(argv[2]); > diff -rauw /gateway-cvs/test/test_store_dump.c /gateway/test/ > test_store_dump.c > --- /gateway-cvs/test/test_store_dump.c 2009-01-14 > 10:24:22.000000000 +0100 > +++ /gateway/test/test_store_dump.c 2009-02-09 16:55:28.000000000 > +0100 > @@ -87,10 +87,8 @@ > > cf_index = get_and_set_debugs(argc, argv, check_args); > > - if (argv[cf_index] == NULL) { > - debug("",0,"Usage: %s <store-file>", argv[0]); > - goto error; > - } > + if (argv[cf_index] == NULL) > + panic(0, "Usage: %s <store-file>", argv[0]); > > type = octstr_create("file"); > > diff -rauw /gateway-cvs/wap/wsp_headers.c /gateway/wap/wsp_headers.c > --- /gateway-cvs/wap/wsp_headers.c 2009-01-14 10:24:26.000000000 +0100 > +++ /gateway/wap/wsp_headers.c 2009-02-10 12:26:21.000000000 +0100 > @@ -1455,13 +1455,13 @@ > { WSP_HEADER_CONTENT_RANGE, pack_content_range, 0 }, > { WSP_HEADER_CONTENT_TYPE, wsp_pack_content_type, 0 }, > { WSP_HEADER_DATE, wsp_pack_date, 0 }, > - { WSP_HEADER_ETAG, wsp_pack_text, 0 }, > + { WSP_HEADER_ETAG, wsp_pack_quoted_text, 0 }, > { WSP_HEADER_EXPIRES, pack_expires, 0 }, > { WSP_HEADER_FROM, wsp_pack_text, 0 }, > { WSP_HEADER_HOST, wsp_pack_text, 0 }, > { WSP_HEADER_IF_MODIFIED_SINCE, wsp_pack_date, 0 }, > - { WSP_HEADER_IF_MATCH, wsp_pack_text, 0 }, > - { WSP_HEADER_IF_NONE_MATCH, wsp_pack_text, 0 }, > + { WSP_HEADER_IF_MATCH, wsp_pack_quoted_text, 0 }, > + { WSP_HEADER_IF_NONE_MATCH, wsp_pack_quoted_text, 0 }, > { WSP_HEADER_IF_RANGE, pack_if_range, 0 }, > { WSP_HEADER_IF_UNMODIFIED_SINCE, wsp_pack_date, 0 }, > { WSP_HEADER_LAST_MODIFIED, wsp_pack_date, 0 }, > @@ -2646,7 +2646,7 @@ > if (octstr_get_char(value, 0) == '"' || > (octstr_get_char(value, 0) == 'W' && > octstr_get_char(value, 1) == '/')) { > - return wsp_pack_text(packed, value); /* It's an etag */ > + return wsp_pack_quoted_text(packed, value); /* It's an > etag */ > } else { > return wsp_pack_date(packed, value); > }