|
@@ -13,7 +13,7 @@ namespace Riddle {
|
|
|
|
|
|
|
|
|
private SocketService service;
|
|
|
- private Gee.HashMap<string, Invercargill.Sequence<Registration>> registrations = new Gee.HashMap<string, Invercargill.Sequence<Registration>>();
|
|
|
+ private Gee.HashMap<string, Series<Registration>> registrations = new Gee.HashMap<string, Series<Registration>>();
|
|
|
private Gee.HashMap<string, RiddleEnvelope> riddles = new Gee.HashMap<string, RiddleEnvelope>();
|
|
|
private NameInfoStore names;
|
|
|
public Client client { get; private set; }
|
|
@@ -271,10 +271,10 @@ namespace Riddle {
|
|
|
|
|
|
private void cleanup_registrations() {
|
|
|
lock(registrations) {
|
|
|
- var copy = new Gee.HashMap<string, Invercargill.Sequence<Registration>>();
|
|
|
+ var copy = new Gee.HashMap<string, Series<Registration>>();
|
|
|
foreach (var group in registrations) {
|
|
|
var time = new DateTime.now_utc();
|
|
|
- copy.set(group.key, group.value.where(r => time.difference(r.timestamp) < REGISTRATION_TIMEOUT_US).to_sequence());
|
|
|
+ copy.set(group.key, group.value.where(r => time.difference(r.timestamp) < REGISTRATION_TIMEOUT_US).to_series());
|
|
|
}
|
|
|
registrations = copy;
|
|
|
}
|
|
@@ -288,7 +288,7 @@ namespace Riddle {
|
|
|
|
|
|
lock(registrations) {
|
|
|
if(!registrations.has_key(group)) {
|
|
|
- registrations.set(group, new Invercargill.Sequence<Registration>());
|
|
|
+ registrations.set(group, new Series<Registration>());
|
|
|
}
|
|
|
|
|
|
registrations[group].add(reg);
|
|
@@ -301,9 +301,9 @@ namespace Riddle {
|
|
|
|
|
|
private void remove_registration(string group, InetSocketAddress address) {
|
|
|
lock(registrations) {
|
|
|
- Invercargill.Sequence<Registration> group_regs;
|
|
|
+ Series<Registration> group_regs;
|
|
|
registrations.unset(group, out group_regs);
|
|
|
- registrations.set(group, group_regs.where(r => r.address.port != address.port || r.address.address.to_string() != address.address.to_string()).to_sequence());
|
|
|
+ registrations.set(group, group_regs.where(r => r.address.port != address.port || r.address.address.to_string() != address.address.to_string()).to_series());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -312,7 +312,7 @@ namespace Riddle {
|
|
|
lock(registrations) {
|
|
|
var regs = Invercargill.empty<Registration>();
|
|
|
if(registrations.has_key(group)) {
|
|
|
- regs = registrations[group].to_sequence();
|
|
|
+ regs = registrations[group].to_series();
|
|
|
}
|
|
|
|
|
|
return regs;
|