fixed bug of udp not working when using listen
authorbeware <beware@bircd.org>
Mon, 19 Jan 2009 22:21:55 +0000 (22:21 +0000)
committerbeware <beware@bircd.org>
Mon, 19 Jan 2009 22:21:55 +0000 (22:21 +0000)
git-svn-id: file:///svnroot/lcore/trunk@24 b1de8a11-f9be-4011-bde0-cc7ace90066a

lsocket.pas

index a9adbd3b06e637ce68014acaac34b1a36c11d1d8..cfa1bd13d83e347948df745d4c5eb9b391fac3a3 100755 (executable)
@@ -333,7 +333,10 @@ var
 begin\r
   if state <> wsclosed then close;\r
   udp := uppercase(proto) = 'UDP';\r
-  if udp then socktype := SOCK_DGRAM else socktype := SOCK_STREAM;\r
+  if udp then begin\r
+    socktype := SOCK_DGRAM;\r
+    dgram := true;\r
+  end else socktype := SOCK_STREAM;\r
   origaddr := addr;\r
 \r
   if addr = '' then begin\r