Commit e2ad881d authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Log a message when a conference (or person) is deleted.

* src/server/conference.c (delete_conf): Log a message when a
conference is deleted, which includes the name of the conference
and the user ID of the person that performs the deletion.
* src/server/testsuite/config/prot-a.exp (kom_delete_conf): Expect
the above message.
* src/server/testsuite/lyskomd.0/03.exp: Ditto.
* src/server/testsuite/lyskomd.0/13.exp: Ditto.
* src/server/testsuite/lyskomd.0/32.exp: Ditto.
* src/server/testsuite/lyskomd.0/conference-cov.exp: Ditto.
* src/server/testsuite/lyskomd.0/person-cov.exp: Ditto.
parent e869405e
2006-07-26 Per Cederqvist <ceder@lysator.liu.se>
Log a message when a conference (or person) is deleted.
* src/server/conference.c (delete_conf): Log a message when a
conference is deleted, which includes the name of the conference
and the user ID of the person that performs the deletion.
* src/server/testsuite/config/prot-a.exp (kom_delete_conf): Expect
the above message.
* src/server/testsuite/lyskomd.0/03.exp: Ditto.
* src/server/testsuite/lyskomd.0/13.exp: Ditto.
* src/server/testsuite/lyskomd.0/32.exp: Ditto.
* src/server/testsuite/lyskomd.0/conference-cov.exp: Ditto.
* src/server/testsuite/lyskomd.0/person-cov.exp: Ditto.
2006-04-24 Per Cederqvist <ceder@lysator.liu.se>
 
Tell svn to ignore core files.
......
......@@ -574,6 +574,7 @@ delete_conf (Conf_no conf_no )
{
Conference * conf_c;
enum access acc;
char *name;
CHK_CONNECTION(FAILURE);
CHK_LOGIN(FAILURE);
......@@ -588,6 +589,15 @@ delete_conf (Conf_no conf_no )
return FAILURE;
}
kom_log("User %ld deleted conference %ld.\n",
(long)ACTPERS, (long)conf_no);
name = s_crea_c_str(conf_c->name);
if (name != NULL)
{
kom_log("Conference %ld was named '%s'.\n", (long)conf_no, name);
string_free(name);
}
if ( conf_c->type.letter_box )
{
/* Make sure the person that is deleted is not logged in. */
......
......@@ -248,12 +248,15 @@ proc kom_lookup_z_name { name want_pers want_conf { result "" } { testname "" }
}
proc kom_delete_conf { conf_no { result "" } { testname "" } } {
global ref_no;
global ref_no
global any_num
kom_next_call
send "$ref_no 11 $conf_no\n"
set result [cres $result "=$ref_no"]
simple_expect $result $testname
lyskomd_expect "User $any_num deleted conference $conf_no\\."
lyskomd_expect "Conference $conf_no was named '.*'\\."
}
proc kom_delete_text { text_no { result "" } { testname "" } } {
......
......@@ -428,6 +428,8 @@ simple_expect "=1082 [holl "Temporary Sanctuary"] 10101000 0 77"
# test call 11 (delete-conf)
send "1083 11 9\n"
simple_expect "=1083"
lyskomd_expect "User 6 deleted conference 9\\."
lyskomd_expect "Conference 9 was named 'Temporary Sanctuary'\\."
send "1084 78 9\n"
simple_expect "%1084 9 9"
......
......@@ -70,12 +70,16 @@ simple_expect "=1008 4 { [holl "Junk 6"] 0000 6 [holl "Junk 7"] 0000 7 [holl "Ju
send "1009 11 6\n"
simple_expect "=1009"
lyskomd_expect "User 5 deleted conference 6\\."
lyskomd_expect "Conference 6 was named 'Junk 6'\\."
send "1010 76 [holl "Match"] 1 1\n"
simple_expect "=1010 1 { [holl "Match 9"] 0000 9 }"
send "1011 11 9\n"
simple_expect "=1011"
lyskomd_expect "User 5 deleted conference 9\\."
lyskomd_expect "Conference 9 was named 'Match 9'\\."
send "1012 76 [holl "Junk"] 1 1\n"
simple_expect "=1012 3 { [holl "Junk 7"] 0000 7 [holl "Junk 8"] 0000 8 [holl "Junk 10"] 0000 10 }"
......
......@@ -60,6 +60,8 @@ simple_expect "=1004"
send "1005 11 6\n"
simple_expect ":2 13 6 2"
simple_expect "=1005"
lyskomd_expect "User 5 deleted conference 6\\."
lyskomd_expect "Conference 6 was named 'First removed'\\."
talk_to client 1
simple_expect ":2 13 6 2"
# Make sure we get "login-first".
......@@ -87,6 +89,8 @@ talk_to client 0
send "1011 11 7\n"
simple_expect ":2 13 7 2"
simple_expect "=1011"
lyskomd_expect "User 5 deleted conference 7\\."
lyskomd_expect "Conference 7 was named '2nd removed'\\."
talk_to client 1
simple_expect ":2 13 7 2"
# Make sure we get "login-first".
......
......@@ -97,6 +97,8 @@ kom_add_member 15 7 100 0 "00000000"
send "1000 11 15\n"
simple_expect "=1000"
lyskomd_expect "User 7 deleted conference 15\\."
lyskomd_expect "Conference 15 was named 'C15'\\."
# Attempt to delete a secret conf we don't know about
......@@ -122,6 +124,8 @@ kom_login 5 "gazonk" 0
kom_enable 255
send "1003 11 9\n"
simple_expect "=1003"
lyskomd_expect "User 5 deleted conference 9\\."
lyskomd_expect "Conference 9 was named 'P9'\\."
talk_to client 1
send "1004 2 10\n"
......@@ -172,6 +176,8 @@ send "1105 88 [holl "Conference With a Name"] 00000000 0 { }\n"
simple_expect "=1105 16"
send "1106 11 16\n"
simple_expect "=1106"
lyskomd_expect "User 6 deleted conference 16\\."
lyskomd_expect "Conference 16 was named 'Conference With a Name'\\."
# Create a conf with name matching two others but not exact match
......@@ -179,6 +185,8 @@ send "1107 88 [holl "Conf W a Name 1"] 00000000 0 { }\n"
simple_expect "=1107 17"
send "1108 11 17\n"
simple_expect "=1108"
lyskomd_expect "User 6 deleted conference 17\\."
lyskomd_expect "Conference 17 was named 'Conf W a Name 1'\\."
# Attempt to create a conf with invalid aux-item list
......
......@@ -316,6 +316,8 @@ send "3009 11 15\n"
if {$debug_calls} {
lyskomd_expect "WNG: do_unmark_text\\(\\): Text 8 has no_of_marks==0, but person 15 had marked the text\\."
}
lyskomd_expect "User 15 deleted conference 15\\."
lyskomd_expect "Conference 15 was named 'P15'\\."
simple_expect "=3009"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment