Mail Archives: cygwin-developers/1998/03/01/03:10:15
When using MS winsock proxy server (both v1.0 and v2.0), connect() call
fails on duplicated socket handle (at least on Windows NT). This patch
fixes the problem.
net.cc: (DuplicateSocket): new static function, return original socket on
Windows NT
and duplicated one on Windows 95.
Rest of the file - call it instead of DuplicateHandle.
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job
begin 600 winsock.diff
M26YD97 AT Z(&YE="YC8PH]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]"E)#4R!F:6QE
M.B O=7-R+V-V<W)O;W0O8V1K+W=I;G-U<"]N970N8V,L=@IR971R:65V:6YG
M(')E=FES:6]N(#$N,0IR971R:65V:6YG(')E=FES:6]N(#$N,@ID:69F("UU
M("UP("UR,2XQ("UR,2XR"BTM+2!N970N8V,),3DY."\P,B\R." Q.3HQ,CHS
M.0DQ+C$**RLK(&YE="YC8PDQ.3DX+S S+S Q(#$P.C,R.C$R"3$N,@I 0" M
M,30T+#8@*S$T-"PR-R! 0"!W:6YS;V-K7VEN:70@*"D*(" @34%22R AT I DOT PH@
M?0H@"BMS=&%T:6,@4T]#2T54($1U<&QI8V%T95-O8VME=" H4T]#2T54(',I
M"BM["BL@("\J($1O(&YO="!D=7!L:6-A=&4@<V]C:V5T(&]N(%=I;F1O=W,@
M3E0 AT 8F5C875S92!O9B!P<F]B;&5M<R!W:71H"BL@(" @($U3('=I;G-O8VL@
M<')O>'D@<V5R=F5R+@HK(" J+PHK("!I9B H9V5T7V]S7W1Y<&4@*"D@/3T@
M=VEN3E0I"BL@(" @<F5T=7)N(',["BL**R @4T]#2T54(&YE=W-O8VL["BL@
M(&EF("A$=7!L:6-A=&5(86YD;&4@*$=E=$-U<G)E;G10<F]C97-S*"DL("A(
M04Y$3$4I(',L"BL)"0D AT 1V5T0W5R<F5N=%!R;V-E<W,H*2P@*$A!3D1,12 J
M*2 F;F5W<V]C:RP**PD)"2 P+"!44E5%+"!$55!,24-!5$5?4T%-15]!0T-%
M4U,I*0HK(" @('L**R @(" @("@J:5]C;&]S97-O8VME="D@*',I.PHK(" @
M(" @<R ](&YE=W-O8VL["BL@(" @?0HK("!E;'-E"BL@(" @<VUA;&Q?<')I
M;G1F("@B1'5P;&EC871E2&%N9&QE(&9A:6QE9" E9%QN(BP AT 1V5T3&%S=$5R
M<F]R("@I*3L**R @<F5T=7)N(',["BM]"BL*("\J(&AT;VYL.B!S=&%N9&%R
M9',_("HO"B!E>'1E<FX@(D,B"B!U;G-I9VYE9"!L;VYG(&EN= I 0" M-#(V
M+#<@*S0T-RPW($! (&-Y9W=I;C,R7W-O8VME=" H:6YT(&%F+"!I;G0@='EP
M92P@:6YT(' *( H@("!I;B H(G-O8VME="(I.PH@("!P:6YF;R J<" ](&UY
M<V5L9CL*+2 @4T]#2T54('-O8RP@;F5W<V]C:SL**R @4T]#2T54('-O8SL*
M( H@("!I;G0 AT 9F0@/2!P+3YH;6%P+F9I;F1?=6YU<V5D7VAA;F1L92 H,"D[
M"B *0$ @+30T-BPQ-2 K-#8W+#<@0$ @8WEG=VEN,S)?<V]C:V5T("AI;G0@
M868L(&EN="!T>7!E+"!I;G0@< H@(" @(" @9V]T;R!D;VYE.PH@(" @('T*
M( HM("!I9B H1'5P;&EC871E2&%N9&QE("A'971#=7)R96YT4')O8V5S<R AT I
M+" H2$%.1$Q%*2!S;V,L"BT)"0D AT 1V5T0W5R<F5N=%!R;V-E<W,H*2P@*$A!
M3D1,12 J*2 F;F5W<V]C:RP*+0D)"2 P+"!44E5%+"!$55!,24-!5$5?4T%-
M15]!0T-%4U,I*0HM(" @('L*+2 @(" @("@J:5]C;&]S97-O8VME="D@*'-O
M8RD["BT@(" @("!S;V,@/2!N97=S;V-K.PHM(" @('T*+2 @96QS90HM(" @
M('-M86QL7W!R:6YT9B H(F-Y9W=I;C,R7W-O8VME=#H AT 1'5P;&EC871E2&%N
M9&QE(&9A:6QE9" E9%QN(BP AT 1V5T3&%S=$5R<F]R("@I*3L**R @<V]C(#T@
M1'5P;&EC871E4V]C:V5T("AS;V,I.PH@"B @(&9H86YD;&5R7W-O8VME=" J
M:#L*(" @8VAA<B J;F%M93L*0$ @+3 AT P DOT 2PW("LX,C(L-B! 0"!I;G0*(&-Y
M9W=I;C,R7V%C8V5P=" H:6YT(&9D+"!S=')U8W0@<V]C:V%D9'(@*G!E97(L
M(&EN=" J;&5N*0H@>PH@("!I;G0@<F5S(#T@+3$["BT@(%-/0TM%5"!N97=S
M;V-K.PH@"B @(&EF("A.3U135$%412AM>7-E;&8L(%!)1%]33T-+15137U53
M140I*0H@(" @('=I;G-O8VM?:6YI=" H*3L*0$ @+3 AT S,2PQ-2 K.#0S+#<@
M0$ @8WEG=VEN,S)?86-C97!T("AI;G0 AT 9F0L('-T<G5C="!S;V-K861D<@H@
M"7-E=%]W:6YS;V-K7V5R<FYO("@I.PH@(" @(" @96QS90H@"7L*+0D@(&EF
M("A$=7!L:6-A=&5(86YD;&4@*$=E=$-U<G)E;G10<F]C97-S*"DL("A(04Y$
M3$4I(')E<RP*+0D)"2!'971#=7)R96YT4')O8V5S<R AT I+" H2$%.1$Q%("HI
M("9N97=S;V-K+ HM"0D)(# L(%12544L($154$Q)0T%415]304U%7T%#0T53
M4RDI"BT)(" @('L*+0D@(" @(" H*FE?8VQO<V5S;V-K970I("AR97,I.PHM
M"2 @(" @(')E<R ](&YE=W-O8VL["BT)(" @('T*+0D@(&5L<V4*+0D@(" @
M<VUA;&Q?<')I;G1F("@B8WEG=VEN,S)?<V]C:V5T.B!$=7!L:6-A=&5(86YD
M;&4 AT 9F%I;&5D("5D7&XB+"!'971,87-T17)R;W(@*"DI.PHK"2 @<F5S(#T@
M1'5P;&EC871E4V]C:V5T("AR97,I.PH@"B )("!F:&%N9&QE<E]S;V-K970@
M*F@["B )("!P+3YH;6%P+G9E8UMR97-?9F1=+F@@/2!H(#T@"D! ("TQ,S T
M+#<@*S$S,#@L-B! 0"!C>6=W:6XS,E]R8VUD("AC:&%R("HJ86AO<W0L('5N
M<VEG;F5D('-H"B @(" @(" @(" @(" @("!C:&%R("IR96UU<V5R+"!C:&%R
M("IC;60L(&EN=" J9F0R<"D*('L*(" @:6YT(')E<R ]("TQ.PHM("!33T-+
M150@;F5W<V]C:SL*(" @4T]#2T54(&9D,G,["B *(" @:68@*$Y/5%-4051%
M*&UY<V5L9BP AT 4$E$7U-/0TM%5%-?55-%1"DI"D! ("TQ,S(X+#$U("LQ,S,Q
M+#<@0$ @8WEG=VEN,S)?<F-M9" H8VAA<B J*F%H;W-T+"!U;G-I9VYE9"!S
M: H@(" @(&=O=&\@9&]N93L*(" @96QS90H@(" @('L*+2 @(" @(&EF("A$
M=7!L:6-A=&5(86YD;&4@*$=E=$-U<G)E;G10<F]C97-S*"DL("A(04Y$3$4I
M(')E<RP*+2 @(" @(" @(" @(" @(" @(" @(" @(" @($=E=$-U<G)E;G10
M<F]C97-S*"DL("A(04Y$3$4@*BD@)FYE=W-O8VLL"BT@(" @(" @(" @(" @
M(" @(" @(" @(" @(" P+"!44E5%+"!$55!,24-!5$5?4T%-15]!0T-%4U,I
M*0HM(" @(" @("!["BT@(" @(" @(" @*"II7V-L;W-E<V]C:V5T*2 H<F5S
M*3L*+2 @(" @(" @("!R97,@/2!N97=S;V-K.PHM(" @(" @("!]"BT@(" @
M("!E;'-E"BT@(" @(" @('-M86QL7W!R:6YT9B H(D1U<&QI8V%T94AA;F1L
M92!F86EL960@)61<;B(L($=E=$QA<W1%<G)O<B H*2D["BL@(" @("!R97,@
M/2!$=7!L:6-A=&53;V-K970@*')E<RD["B *(" @(" @(&9H86YD;&5R7W-O
M8VME=" J:#L*(" @(" @(' M/FAM87 N=F5C6W)E<U]F9%TN:" ](&@@/2 *
M0$ @+3$S-#4L,34@*S$S-# L-R! 0"!C>6=W:6XS,E]R8VUD("AC:&%R("HJ
M86AO<W0L('5N<VEG;F5D('-H"B @(" @?0H@("!I9B H9F0R<"D*(" @("![
M"BT@(" @("!I9B H1'5P;&EC871E2&%N9&QE("A'971#=7)R96YT4')O8V5S
M<R AT I+" H2$%.1$Q%*2!F9#)S+ HM(" @(" @(" @(" @(" @(" @(" @(" @
M(" @1V5T0W5R<F5N=%!R;V-E<W,H*2P@*$A!3D1,12 J*2 F;F5W<V]C:RP*
M+2 @(" @(" @(" @(" @(" @(" @(" @(" @(# L(%12544L($154$Q)0T%4
M15]304U%7T%#0T534RDI"BT@(" @(" @('L*+2 @(" @(" @(" H*FE?8VQO
M<V5S;V-K970I("AF9#)S*3L*+2 @(" @(" @("!F9#)S(#T@;F5W<V]C:SL*
M+2 @(" @(" @?0HM(" @(" @96QS90HM(" @(" @("!S;6%L;%]P<FEN=&8@
M*")$=7!L:6-A=&5(86YD;&4 AT 9F%I;&5D("5D7&XB+"!'971,87-T17)R;W(@
M*"DI.PHK(" @(" @9F0R<R ]($1U<&QI8V%T95-O8VME=" H9F0R<RD["B *
M(" @(" @(&9H86YD;&5R7W-O8VME=" J:#L*(" @(" @(' M/FAM87 N=F5C
M6RIF9#)P72YH(#T@:" ]( I 0" M,3,W,"PW("LQ,S4W+#8 AT 0$ @:6YT"B!C
M>6=W:6XS,E]R<F5S=G!O<G0@*&EN=" J<&]R="D*('L*(" @:6YT(')E<R ]
M("TQ.PHM("!33T-+150@;F5W<V]C:SL*( H@("!I9B H3D]44U1!5$4H;7ES
M96QF+"!0241?4T]#2T544U]54T5$*2D*(" @("!W:6YS;V-K7VEN:70@*"D[
M"D! ("TQ,S AT W+#$U("LQ,S<S+#<@0$ @8WEG=VEN,S)?<G)E<W9P;W)T("AI
M;G0@*G!O<G0I"B @(" @9V]T;R!D;VYE.PH@("!E;'-E"B @(" @>PHM(" @
M(" @:68@*$1U<&QI8V%T94AA;F1L92 H1V5T0W5R<F5N=%!R;V-E<W,H*2P@
M*$A!3D1,12D@<F5S+ HM(" @(" @(" @(" @(" @(" @(" @(" @(" @1V5T
M0W5R<F5N=%!R;V-E<W,H*2P@*$A!3D1,12 J*2 F;F5W<V]C:RP*+2 @(" @
M(" @(" @(" @(" @(" @(" @(" @(# L(%12544L($154$Q)0T%415]304U%
M7T%#0T534RDI"BT@(" @(" @('L*+2 @(" @(" @(" H*FE?8VQO<V5S;V-K
M970I("AR97,I.PHM(" @(" @(" @(')E<R ](&YE=W-O8VL["BT@(" @(" @
M('T*+2 @(" @(&5L<V4*+2 @(" @(" @<VUA;&Q?<')I;G1F("@B1'5P;&EC
M871E2&%N9&QE(&9A:6QE9" E9%QN(BP AT 1V5T3&%S=$5R<F]R("@I*3L**R @
M(" @(')E<R ]($1U<&QI8V%T95-O8VME=" H<F5S*3L*( H@(" @(" @9FAA
M;F1L97)?<V]C:V5T("IH.PH@(" @(" @<"T^:&UA<"YV96-;<F5S7V9D72YH
M(#T@:" ]( I 0" M,30Q-"PW("LQ,SDR+#8 AT 0$ @8WEG=VEN,S)?<F5X96,@
M*&-H87(@*BIA:&]S="P@=6YS:6=N960@<PH@(" @(" @(" @(" @(" @8VAA
M<B J<&%S<W=D+"!C:&%R("IC;60L(&EN=" J9F0R<"D*('L*(" @:6YT(')E
M<R ]("TQ.PHM("!33T-+150@;F5W<V]C:SL*(" @4T]#2T54(&9D,G,["B *
M(" @:68@*$Y/5%-4051%*&UY<V5L9BP AT 4$E$7U-/0TM%5%-?55-%1"DI"D!
M("TQ-#,X+#$U("LQ-#$U+#<@0$ @8WEG=VEN,S)?<F5X96,@*&-H87(@*BIA
M:&]S="P@=6YS:6=N960@<PH@(" @(&=O=&\@9&]N93L*(" @96QS90H@(" @
M('L*+2 @(" @(&EF("A$=7!L:6-A=&5(86YD;&4@*$=E=$-U<G)E;G10<F]C
M97-S*"DL("A(04Y$3$4I(')E<RP*+2 @(" @(" @(" @(" @(" @(" @(" @
M(" @($=E=$-U<G)E;G10<F]C97-S*"DL("A(04Y$3$4@*BD@)FYE=W-O8VLL
M"BT@(" @(" @(" @(" @(" @(" @(" @(" @(" P+"!44E5%+"!$55!,24-!
M5$5?4T%-15]!0T-%4U,I*0HM(" @(" @("!["BT@(" @(" @(" @*"II7V-L
M;W-E<V]C:V5T*2 H<F5S*3L*+2 @(" @(" @("!R97,@/2!N97=S;V-K.PHM
M(" @(" @("!]"BT@(" @("!E;'-E"BT@(" @(" @('-M86QL7W!R:6YT9B H
M(D1U<&QI8V%T94AA;F1L92!F86EL960@)61<;B(L($=E=$QA<W1%<G)O<B H
M*2D["BL@(" @("!R97,@/2!$=7!L:6-A=&53;V-K970@*')E<RD["B *(" @
M(" @(&9H86YD;&5R7W-O8VME=" J:#L*(" @(" @(' M/FAM87 N=F5C6W)E
M<U]F9%TN:" ](&@@/2 *0$ @+3$T-34L,34@*S$T,C0L-R! 0"!C>6=W:6XS
M,E]R97AE8R H8VAA<B J*F%H;W-T+"!U;G-I9VYE9"!S"B @(" @?0H@("!I
M9B H9F0R<"D*(" @("!["BT@(" @("!I9B H1'5P;&EC871E2&%N9&QE("A'
M971#=7)R96YT4')O8V5S<R AT I+" H2$%.1$Q%*2!F9#)S+ HM(" @(" @(" @
M(" @(" @(" @(" @(" @(" @1V5T0W5R<F5N=%!R;V-E<W,H*2P@*$A!3D1,
M12 J*2 F;F5W<V]C:RP*+2 @(" @(" @(" @(" @(" @(" @(" @(" @(# L
M(%12544L($154$Q)0T%415]304U%7T%#0T534RDI"BT@(" @(" @('L*+2 @
M(" @(" @(" H*FE?8VQO<V5S;V-K970I("AF9#)S*3L*+2 @(" @(" @("!F
M9#)S(#T@;F5W<V]C:SL*+2 @(" @(" @?0HM(" @(" @96QS90HM(" @(" @
M("!S;6%L;%]P<FEN=&8@*")$=7!L:6-A=&5(86YD;&4 AT 9F%I;&5D("5D7&XB
M+"!'971,87-T17)R;W(@*"DI.PHK(" @(" @9F0R<R ]($1U<&QI8V%T95-O
M8VME=" H9F0R<RD["B *(" @(" @(&9H86YD;&5R7W-O8VME=" J:#L*(" @
M(" @(' M/FAM87 N=F5C6RIF9#)P72YH(#T@:" ]( I 0" M,34V,RPR." K
M,34R-"PQ,B! 0"!S;V-K971P86ER("AI;G0L(&EN="!T>7!E+"!I;G0L(&EN
M=" J<V(I"B @("@J:5]C;&]S97-O8VME="D@*&YE=W-O8VLI.PH@("!R97,@
M/2 P.PH@"BT@(&EF("A$=7!L:6-A=&5(86YD;&4@*$=E=$-U<G)E;G10<F]C
M97-S*"DL("A(04Y$3$4I(&EN<V]C:RP*+2 @(" @(" @(" @(" @(" @(" @
M(" @1V5T0W5R<F5N=%!R;V-E<W,H*2P@*$A!3D1,12 J*2 F;F5W<V]C:RP*
M+2 @(" @(" @(" @(" @(" @(" @(" @,"P AT 5%)512P AT 1%503$E#051%7U-!
M345?04-#15-3*2D*+2 @("!["BT@(" @(" H*FE?8VQO<V5S;V-K970I("AI
M;G-O8VLI.PHM(" @(" @:6YS;V-K(#T@;F5W<V]C:SL*+2 @("!]"BT@(&5L
M<V4*+2 @("!S;6%L;%]P<FEN=&8@*")$=7!L:6-A=&5(86YD;&4 AT 9F%I;&5D
M("5D7&XB+"!'971,87-T17)R;W(@*"DI.PHK("!I;G-O8VL@/2!$=7!L:6-A
M=&53;V-K970@*&EN<V]C:RD["B *(" @<"T^:&UA<"YV96-;<V);,%U=+F@@
M/2 *(" @(" @(" @("!N97<@*"9P+3YH;6%P+G9E8UMS8ELP75TN:71E;2D@
M9FAA;F1L97)?<V]C:V5T*&EN<V]C:RP@(B]D978O=&-P(BD["B *+2 @:68@
M*$1U<&QI8V%T94AA;F1L92 H1V5T0W5R<F5N=%!R;V-E<W,H*2P@*$A!3D1,
M12D@;W5T<V]C:RP*+2 @(" @(" @(" @(" @(" @(" @(" @1V5T0W5R<F5N
M=%!R;V-E<W,H*2P@*$A!3D1,12 J*2 F;F5W<V]C:RP*+2 @(" @(" @(" @
M(" @(" @(" @(" @,"P AT 5%)512P AT 1%503$E#051%7U-!345?04-#15-3*2D*
M+2 @("!["BT@(" @(" H*FE?8VQO<V5S;V-K970I("AO=71S;V-K*3L*+2 @
M(" @(&]U='-O8VL@/2!N97=S;V-K.PHM(" @('T*+2 @96QS90HM(" @('-M
M86QL7W!R:6YT9B H(D1U<&QI8V%T94AA;F1L92!F86EL960@)61<;B(L($=E
M=$QA<W1%<G)O<B H*2D["BL@(&]U='-O8VL@/2!$=7!L:6-A=&53;V-K970@
M*&]U='-O8VLI.PH@"B @(' M/FAM87 N=F5C6W-B6S%=72YH(#T@"B @(" @
M(" @(" @;F5W("@F<"T^:&UA<"YV96-;<V);,5U=+FET96TI(&9H86YD;&5R
>7W-O8VME="AO=71S;V-K+" B+V1E=B]T8W B*3L*
`
end
- Raw text -