[Sumover-dev] [svn commit] r3828 - rat/trunk
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Fri Sep 8 20:41:52 BST 2006
Author: piers
Date: Fri Sep 8 20:42:07 2006
New Revision: 3828
Modified:
rat/trunk/mbus_engine.c
rat/trunk/ui_audiotool.tcl
rat/trunk/ui_send_prefs.c
Log:
Updates to switch off encryption when address is changed. Also to fix
ui_send_encryption_key() in ui_send_prefs.c so that it can used to turn off
encryption. Added range check for ttl with address change validator.
Modified: rat/trunk/mbus_engine.c
==============================================================================
--- rat/trunk/mbus_engine.c (original)
+++ rat/trunk/mbus_engine.c Fri Sep 8 20:42:07 2006
@@ -1014,8 +1014,11 @@
if (sp->rtp_session_count) {
/* Existing session present - delete and recreate with new params */
sp->rtp_session_count--;
- settings_save(sp);
rx_audio_input_mute(srce, "1", sp);
+ rtp_set_encryption_key(sp->rtp_session[0], NULL);
+ sp->encrkey = NULL;
+ ui_send_encryption_key(sp, sp->mbus_ui_addr);
+ settings_save(sp);
rtp_callback_exit(sp->rtp_session[sp->rtp_session_count]);
/* Remove existing sources from DB and UI , then destory DB and RTP sess */
pdb_get_first_id(sp->pdb, &ssrc);
Modified: rat/trunk/ui_audiotool.tcl
==============================================================================
--- rat/trunk/ui_audiotool.tcl (original)
+++ rat/trunk/ui_audiotool.tcl Fri Sep 8 20:42:07 2006
@@ -668,12 +668,12 @@
proc mbus_recv_security.encryption.key {new_key} {
global key_var key
+ set key $new_key
+
if { [string length $key]!=0 } {
set key_var 1
- set key $new_key
} else {
set key_var 0
- set key $new_key
}
update_security_indicator
}
@@ -1553,7 +1553,11 @@
return "\"$group_addr\" $g_rx_port $g_tx_port $g_ttl" }
}
}
- return "\"$addr\" $rx_port $tx_port $ttl"
+ if {[string match \[0-9\]* $ttl]} {
+ if { $ttl >= 0 || $ttl < 256 } {
+ return "\"$addr\" $rx_port $tx_port $ttl"
+ }
+ }
}
}
}
Modified: rat/trunk/ui_send_prefs.c
==============================================================================
--- rat/trunk/ui_send_prefs.c (original)
+++ rat/trunk/ui_send_prefs.c Fri Sep 8 20:42:07 2006
@@ -274,9 +274,10 @@
if (!sp->ui_on) return;
if (sp->encrkey == NULL) {
- return;
+ key_e = mbus_encode_str("");
+ } else {
+ key_e = mbus_encode_str(sp->encrkey);
}
- key_e = mbus_encode_str(sp->encrkey);
mbus_qmsgf(sp->mbus_engine, addr, TRUE, "security.encryption.key", key_e);
xfree(key_e);
}
More information about the Sumover-dev
mailing list