From 23b6c1e98a0fcadbcfb26ee1d475e36bce67dc88 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 30 Jun 2006 12:26:12 -0400 Subject: [PATCH] Use well known address for mesh chat --- configure.ac | 2 +- sugar/chat/MeshChat.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 1133d21b..e7171df2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([Sugar],[0.16],[],[sugar]) +AC_INIT([Sugar],[0.17],[],[sugar]) AC_PREREQ([2.59]) diff --git a/sugar/chat/MeshChat.py b/sugar/chat/MeshChat.py index 0edc4c1a..d9f4b020 100644 --- a/sugar/chat/MeshChat.py +++ b/sugar/chat/MeshChat.py @@ -7,6 +7,7 @@ import sugar.env class MeshChat(GroupChat): SERVICE_TYPE = "_olpc_mesh_chat._udp" + SERVICE_ADDRESS = "232.5.5.5" SERVICE_PORT = 6301 def __init__(self): @@ -28,9 +29,6 @@ class MeshChat(GroupChat): self._setup_stream(service) def _publish(self): - # Use random currently unassigned multicast address - address = "232.%d.%d.%d" % (random.randint(0, 254), random.randint(1, 254), - random.randint(1, 254)) service = Service(sugar.env.get_nick_name(), MeshChat.SERVICE_TYPE, - 'local', address, MeshChat.SERVICE_PORT) + 'local', MeshChat.SERVICE_ADDRESS, MeshChat.SERVICE_PORT) self._pservice.register_service(service)