Permalink
Browse files

fixed depend. on FormMain in xbs_udp_listener

  • Loading branch information...
1 parent 552b309 commit 0ec6f818b0d6aa311e98bb5fcab22c6aed591770 seuffert committed Mar 17, 2011
Showing with 9 additions and 10 deletions.
  1. +2 −2 XBSlink/CommandLine.cs
  2. +1 −1 XBSlink/Form1.cs
  3. +6 −7 XBSlink/xbs_udp_listener.cs
View
@@ -182,7 +182,7 @@ private void start_engine(bool option_upnp, String option_capture_device, int op
option_local_port = xbs_udp_listener.standard_port;
try
{
- udp_listener = new xbs_udp_listener(option_local_ip, option_local_port);
+ udp_listener = new xbs_udp_listener(option_local_ip, option_local_port, node_list);
}
catch (Exception e)
{
@@ -239,7 +239,7 @@ private void command_line_parser_error(OptionSet command_line_option_set, Except
private void initialize()
{
node_list = new xbs_node_list();
- udp_listener = new xbs_udp_listener();
+ udp_listener = new xbs_udp_listener(node_list);
natstun = new xbs_natstun();
}
View
@@ -352,7 +352,7 @@ private void resume_start_engine()
try
{
- udp_listener = new xbs_udp_listener(internal_ip, UInt16.Parse(textBox_local_Port.Text));
+ udp_listener = new xbs_udp_listener(internal_ip, UInt16.Parse(textBox_local_Port.Text), node_list);
}
catch (Exception e)
{
@@ -98,20 +98,19 @@ class xbs_udp_listener
public readonly Object _locker_HELLO = new Object();
- public xbs_udp_listener()
+ public xbs_udp_listener(xbs_node_list nl)
{
- initialize(IPAddress.Any, xbs_udp_listener.standard_port);
+ initialize(IPAddress.Any, xbs_udp_listener.standard_port, nl);
}
- public xbs_udp_listener( IPAddress ip_endpoint, int port )
+ public xbs_udp_listener( IPAddress ip_endpoint, int port, xbs_node_list nl)
{
- initialize(ip_endpoint, port);
+ initialize(ip_endpoint, port, nl);
}
- private bool initialize(IPAddress ip_endpoint, int port)
+ private bool initialize(IPAddress ip_endpoint, int port, xbs_node_list nl)
{
- node_list = FormMain.node_list;
-
+ this.node_list = nl;
dispatcher_thread = new Thread(new ThreadStart(dispatcher));
dispatcher_thread.IsBackground = true;
dispatcher_thread.Priority = ThreadPriority.AboveNormal;

0 comments on commit 0ec6f81

Please sign in to comment.