comparison mservtk.tcl @ 4:32f624fc18cc

Resolve merge conflicts.. Make sure we aren't doing anything else when we process RT events.
author darius
date Fri, 11 Aug 2000 17:46:47 +0000
parents 4343bc7f829a
children b6c495b5eeda
comparison
equal deleted inserted replaced
3:4343bc7f829a 4:32f624fc18cc
42 set state(port) "4444"; 42 set state(port) "4444";
43 set state(exit) 0; 43 set state(exit) 0;
44 set state(tmpphrase) ""; 44 set state(tmpphrase) "";
45 set state(sortmode) "Title"; 45 set state(sortmode) "Title";
46 46
47 set state(rtlist) "";
48
47 wm withdraw .; 49 wm withdraw .;
48 50
49 f_readconf; 51 f_readconf;
50 gui_conf; 52 gui_conf;
51 53
71 gui_updatequeue; 73 gui_updatequeue;
72 74
73 update_timer; 75 update_timer;
74 76
75 while {1} { 77 while {1} {
76 vwait state(exit); 78 vwait state;
79
80 if {$state(rtlist) != ""} {
81 # Copy it so we don't stomp any new additions
82 set tmp $state(rtlist);
83 set state(rtlist) "";
84
85 foreach t $state(rtlist) {
86 n_rthandler [lindex $t 0] [lindex $t 1];
87 }
88 }
77 89
78 if {$state(exit) == 1} { 90 if {$state(exit) == 1} {
79 exit; 91 exit;
80 } 92 }
81 } 93 }
808 } 820 }
809 821
810 proc n_rthandler {code data} { 822 proc n_rthandler {code data} {
811 global songs; 823 global songs;
812 824
813 log "%s" "Got RT - $code $data"; 825 # log "%s" "Got RT - $code $data";
814 826
815 switch -- $code { 827 switch -- $code {
816 600 { 828 600 {
817 log "%s" "User '$data' connected"; 829 log "%s" "User '$data' connected";
818 } 830 }
850 set state(tmpphrase) ""; 862 set state(tmpphrase) "";
851 } 863 }
852 } 864 }
853 865
854 if {$rth != ""} { 866 if {$rth != ""} {
855 n_rthandler [lindex $rth 0] [lindex $rth 1]; 867 # n_rthandler [lindex $rth 0] [lindex $rth 1];
868 lappend state(rtlist) $rth;
856 } 869 }
857 } 870 }
858 871
859 proc n_getrtn {var} { 872 proc n_getrtn {var} {
860 upvar $var rtn; 873 upvar $var rtn;