winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
793 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Add missing GL locking to d3dfmt_p8_upload_palette ().
by Alexandre Julliard
15 May '09
15 May '09
Module: wine Branch: master Commit: 5bc449553b376a1cc347b6f7c09a7a5298c03ff0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bc449553b376a1cc347b6f7c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 14 19:40:55 2009 +0200 wined3d: Add missing GL locking to d3dfmt_p8_upload_palette(). --- dlls/wined3d/surface.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 58081cb..f4463e3 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2263,7 +2263,9 @@ static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, CONVERT_TYPES conve if(GL_SUPPORT(EXT_PALETTED_TEXTURE)) { TRACE("Using GL_EXT_PALETTED_TEXTURE for 8-bit paletted texture support\n"); + ENTER_GL(); GL_EXTCALL(glColorTableEXT(This->glDescription.target,GL_RGBA,256,GL_RGBA,GL_UNSIGNED_BYTE, table)); + LEAVE_GL(); } else { @@ -2271,6 +2273,8 @@ static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, CONVERT_TYPES conve * The 8bit pixel data will be used as an index in this palette texture to retrieve the final color. */ TRACE("Using fragment shaders for emulating 8-bit paletted texture support\n"); + ENTER_GL(); + /* Create the fragment program if we don't have it */ if(!device->paletteConversionShader) { @@ -2310,6 +2314,8 @@ static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, CONVERT_TYPES conve /* Rebind the texture because it isn't bound anymore */ glBindTexture(This->glDescription.target, This->glDescription.textureName); + + LEAVE_GL(); } }
1
0
0
0
Alexandre Julliard : mlang: Return the correct count in IMLangFontLink_GetStrCodePages when aborting early .
by Alexandre Julliard
15 May '09
15 May '09
Module: wine Branch: master Commit: 2a48ef1d0996cfaed55ff7a3c334581a7f33d334 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a48ef1d0996cfaed55ff7a3c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 14 20:09:53 2009 +0200 mlang: Return the correct count in IMLangFontLink_GetStrCodePages when aborting early. --- dlls/mlang/mlang.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c index d627cfd..5deb87b 100644 --- a/dlls/mlang/mlang.c +++ b/dlls/mlang/mlang.c @@ -1939,7 +1939,7 @@ static HRESULT WINAPI fnIMLangFontLink_GetStrCodePages( } if (pdwCodePages) *pdwCodePages = cps; - if (pcchCodePages) *pcchCodePages = i; + if (pcchCodePages) *pcchCodePages = min( i + 1, cchSrc ); return S_OK; }
1
0
0
0
Gerald Pfeifer : msi: Initialize variable in MSI_ApplyPatchW.
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: aea6418ff0fb916d4e0fb58a98d0c079f074907e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aea6418ff0fb916d4e0fb58a9…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Wed May 13 01:25:40 2009 +0200 msi: Initialize variable in MSI_ApplyPatchW. --- dlls/msi/msi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index ed8b4ab..be1ad93 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -304,7 +304,7 @@ done: static UINT MSI_ApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szProductCode, LPCWSTR szCommandLine) { MSIHANDLE patch = 0, info = 0; - UINT r, type; + UINT r = ERROR_SUCCESS, type; DWORD size = 0; LPCWSTR cmd_ptr = szCommandLine; LPCWSTR product_code = szProductCode;
1
0
0
0
Vincent Povirk : gdiplus: Stub GdipWarpPath.
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: 0c71d5b3f70b45f60ae9b91302477170a6cd17af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c71d5b3f70b45f60ae9b9130…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri May 8 11:43:45 2009 -0500 gdiplus: Stub GdipWarpPath. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 10 ++++++++++ include/gdiplusenums.h | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 8968528..34c897a 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -621,7 +621,7 @@ @ stdcall GdipTranslateWorldTransform(ptr long long long) @ stdcall GdipVectorTransformMatrixPoints(ptr ptr long) @ stdcall GdipVectorTransformMatrixPointsI(ptr ptr long) -@ stub GdipWarpPath +@ stdcall GdipWarpPath(ptr ptr ptr long long long long long long long) @ stdcall GdipWidenPath(ptr ptr ptr long) @ stub GdipWindingModeOutline @ stdcall GdiplusNotificationHook(ptr) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 87b27fd..8ffe531 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1465,6 +1465,16 @@ GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix) path->pathdata.Count); } +GpStatus WINGDIPAPI GdipWarpPath(GpPath *path, GpMatrix* matrix, + GDIPCONST GpPointF *points, INT count, REAL x, REAL y, REAL width, + REAL height, WarpMode warpmode, REAL flatness) +{ + FIXME("(%p,%p,%p,%i,%0.2f,%0.2f,%0.2f,%0.2f,%i,%0.2f)\n", path, matrix, + points, count, x, y, width, height, warpmode, flatness); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, REAL flatness) { diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index c989000..9997bf1 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -181,6 +181,11 @@ enum ImageType ImageTypeMetafile }; +enum WarpMode { + WarpModePerspective, + WarpModeBilinear +}; + enum WrapMode { WrapModeTile, @@ -436,6 +441,7 @@ typedef enum DashStyle DashStyle; typedef enum MatrixOrder MatrixOrder; typedef enum ImageType ImageType; typedef enum ImageFlags ImageFlags; +typedef enum WarpMode WarpMode; typedef enum WrapMode WrapMode; typedef enum MetafileType MetafileType; typedef enum LinearGradientMode LinearGradientMode;
1
0
0
0
Vincent Povirk : gdiplus: Stub GdipWidenPath.
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: 8d5c833d25516d78d25210794e6a78c24c1bcd04 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d5c833d25516d78d25210794…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri May 8 11:31:09 2009 -0500 gdiplus: Stub GdipWidenPath. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 76c7328..8968528 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -622,7 +622,7 @@ @ stdcall GdipVectorTransformMatrixPoints(ptr ptr long) @ stdcall GdipVectorTransformMatrixPointsI(ptr ptr long) @ stub GdipWarpPath -@ stub GdipWidenPath +@ stdcall GdipWidenPath(ptr ptr ptr long) @ stub GdipWindingModeOutline @ stdcall GdiplusNotificationHook(ptr) @ stdcall GdiplusNotificationUnhook(ptr) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index ca33082..87b27fd 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1465,6 +1465,14 @@ GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix) path->pathdata.Count); } +GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, + REAL flatness) +{ + FIXME("(%p,%p,%p,%0.2f)\n", path, pen, matrix, flatness); + + return NotImplemented; +} + GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height) {
1
0
0
0
Vincent Povirk : gdiplus: Populate the installed font collection.
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: ef4d0d970de5d25b2ddaaeb14db32a738b29b64d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef4d0d970de5d25b2ddaaeb14…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Apr 27 18:56:56 2009 -0500 gdiplus: Populate the installed font collection. --- dlls/gdiplus/font.c | 66 +++++++++++++++++++++++++++++++++++++++- dlls/gdiplus/gdiplus.c | 4 ++ dlls/gdiplus/gdiplus_private.h | 3 ++ 3 files changed, 72 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 0b582a7..89498bc 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -844,6 +844,7 @@ GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection** fontCollecti (*fontCollection)->FontFamilies = NULL; (*fontCollection)->count = 0; + (*fontCollection)->allocated = 0; return Ok; } @@ -930,14 +931,77 @@ GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList( return Ok; } +void free_installed_fonts(void) +{ + while (installedFontCollection.count) + GdipDeleteFontFamily(installedFontCollection.FontFamilies[--installedFontCollection.count]); + HeapFree(GetProcessHeap(), 0, installedFontCollection.FontFamilies); + installedFontCollection.FontFamilies = NULL; + installedFontCollection.allocated = 0; +} + +static INT CALLBACK add_font_proc(const LOGFONTW *lfw, const TEXTMETRICW *ntm, + DWORD type, LPARAM lParam) +{ + GpFontCollection* fonts = (GpFontCollection*)lParam; + int i; + + /* skip duplicates */ + for (i=0; i<fonts->count; i++) + if (strcmpiW(lfw->lfFaceName, fonts->FontFamilies[i]->FamilyName) == 0) + return 1; + + if (fonts->allocated == fonts->count) + { + INT new_alloc_count = fonts->allocated+50; + GpFontFamily** new_family_list = HeapAlloc(GetProcessHeap(), 0, new_alloc_count*sizeof(void*)); + + if (!new_family_list) + return 0; + + memcpy(new_family_list, fonts->FontFamilies, fonts->count*sizeof(void*)); + HeapFree(GetProcessHeap(), 0, fonts->FontFamilies); + fonts->FontFamilies = new_family_list; + fonts->allocated = new_alloc_count; + } + + if (GdipCreateFontFamilyFromName(lfw->lfFaceName, NULL, &fonts->FontFamilies[fonts->count]) == Ok) + fonts->count++; + else + return 0; + + return 1; +} + GpStatus WINGDIPAPI GdipNewInstalledFontCollection( GpFontCollection** fontCollection) { - FIXME("stub: %p\n",fontCollection); + TRACE("(%p)\n",fontCollection); if (!fontCollection) return InvalidParameter; + if (installedFontCollection.count == 0) + { + HDC hdc; + LOGFONTW lfw; + + hdc = GetDC(0); + + lfw.lfCharSet = DEFAULT_CHARSET; + lfw.lfFaceName[0] = 0; + lfw.lfPitchAndFamily = 0; + + if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)&installedFontCollection, 0)) + { + free_installed_fonts(); + ReleaseDC(0, hdc); + return OutOfMemory; + } + + ReleaseDC(0, hdc); + } + *fontCollection = &installedFontCollection; return Ok; diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index 52a9c39..950e002 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -64,6 +64,10 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinst ); break; + + case DLL_PROCESS_DETACH: + free_installed_fonts(); + break; } return TRUE; } diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 1ee24a1..af20c75 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -52,6 +52,8 @@ extern void calc_curve_bezier(CONST GpPointF *pts, REAL tension, REAL *x1, extern void calc_curve_bezier_endp(REAL xend, REAL yend, REAL xadj, REAL yadj, REAL tension, REAL *x, REAL *y); +extern void free_installed_fonts(void); + extern BOOL lengthen_path(GpPath *path, INT len); extern GpStatus trace_path(GpGraphics *graphics, GpPath *path); @@ -245,6 +247,7 @@ struct GpStringFormat{ struct GpFontCollection{ GpFontFamily **FontFamilies; INT count; + INT allocated; }; struct GpFontFamily{
1
0
0
0
Damjan Jovanovic : oleaut32: Strip trailing decimal zeroes when rounding a number in VarFormat.
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: 80dfd00530d2b73b8a18129f44e6ff7f5a58c507 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80dfd00530d2b73b8a18129f4…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu May 14 15:31:50 2009 +0200 oleaut32: Strip trailing decimal zeroes when rounding a number in VarFormat. --- dlls/oleaut32/tests/varformat.c | 1 + dlls/oleaut32/varformat.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index c2d45ae..3c0e72e 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -380,6 +380,7 @@ static void test_VarFormat(void) VARFMT(VT_R8,V_R8,-1.57,"#.##",S_OK,"-1.57"); VARFMT(VT_R8,V_R8,-0.1,".#",S_OK,"-.1"); VARFMT(VT_R8,V_R8,0.099,"#.#",S_OK,".1"); + VARFMT(VT_R8,V_R8,0.0999,"#.##",S_OK,".1"); /* 'out' is not cleared */ diff --git a/dlls/oleaut32/varformat.c b/dlls/oleaut32/varformat.c index fd257f0..f6c142d 100644 --- a/dlls/oleaut32/varformat.c +++ b/dlls/oleaut32/varformat.c @@ -1313,6 +1313,9 @@ static HRESULT VARIANT_FormatNumber(LPVARIANT pVarIn, LPOLESTR lpszFormat, } else (*prgbDig)++; + /* We converted trailing digits to zeroes => have_frac has changed */ + while (have_frac > 0 && rgbDig[have_int + have_frac - 1] == 0) + have_frac--; } } TRACE("have_int=%d,need_int=%d,have_frac=%d,need_frac=%d,pad=%d,exp=%d\n",
1
0
0
0
Alexandre Julliard : wininet: Get rid of the SSL-specific read-ahead buffer .
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: d1de5f37d03c8ccc52008e5b3c34d2b17776e730 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1de5f37d03c8ccc52008e5b3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 14 16:55:29 2009 +0200 wininet: Get rid of the SSL-specific read-ahead buffer. --- dlls/wininet/internet.h | 4 - dlls/wininet/netconnection.c | 148 +---------------------------------------- 2 files changed, 4 insertions(+), 148 deletions(-) diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 0a4e71b..48271d6 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -53,9 +53,6 @@ typedef struct BOOL useSSL; int socketFD; void *ssl_s; - char *peek_msg; - char *peek_msg_mem; - size_t peek_len; } WININET_NETCONNECTION; static inline LPWSTR WININET_strdupW( LPCWSTR str ) @@ -414,7 +411,6 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len, BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags, int *recvd /* out */); BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available); -BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer); LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection); DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value); diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 3c55528..b5ca18a 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -209,8 +209,6 @@ BOOL NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) pBIO_new_fp(stderr, BIO_NOCLOSE); /* FIXME: should use winedebug stuff */ meth = pSSLv23_method(); - connection->peek_msg = NULL; - connection->peek_msg_mem = NULL; #else FIXME("can't use SSL, not compiled in.\n"); INTERNET_SetLastError(ERROR_INTERNET_SECURITY_CHANNEL_ERROR); @@ -329,11 +327,6 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection) #ifdef SONAME_LIBSSL if (connection->useSSL) { - HeapFree(GetProcessHeap(),0,connection->peek_msg_mem); - connection->peek_msg = NULL; - connection->peek_msg_mem = NULL; - connection->peek_len = 0; - pSSL_shutdown(connection->ssl_s); pSSL_free(connection->ssl_s); connection->ssl_s = NULL; @@ -541,54 +534,7 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f else { #ifdef SONAME_LIBSSL - size_t peek_read = 0, read; - - if (flags & ~(MSG_PEEK|MSG_WAITALL)) - FIXME("SSL_read does not support the following flag: %08x\n", flags); - - /* this ugly hack is all for MSG_PEEK. eww gross */ - if(connection->peek_msg) { - if(connection->peek_len >= len) { - memcpy(buf, connection->peek_msg, len); - if(!(flags & MSG_PEEK)) { - if(connection->peek_len == len) { - HeapFree(GetProcessHeap(), 0, connection->peek_msg); - connection->peek_msg = NULL; - connection->peek_len = 0; - }else { - memmove(connection->peek_msg, connection->peek_msg+len, connection->peek_len-len); - connection->peek_len -= len; - connection->peek_msg = HeapReAlloc(GetProcessHeap(), 0, connection->peek_msg, connection->peek_len); - } - } - - *recvd = len; - return TRUE; - } - - memcpy(buf, connection->peek_msg, connection->peek_len); - peek_read = connection->peek_len; - - if(!(flags & MSG_PEEK)) { - HeapFree(GetProcessHeap(), 0, connection->peek_msg); - connection->peek_msg = NULL; - connection->peek_len = 0; - } - } - - read = pSSL_read(connection->ssl_s, (BYTE*)buf+peek_read, len-peek_read); - - if(flags & MSG_PEEK) { - if(connection->peek_msg) - connection->peek_msg = HeapReAlloc(GetProcessHeap(), 0, connection->peek_msg, - connection->peek_len+read); - else - connection->peek_msg = HeapAlloc(GetProcessHeap(), 0, read); - memcpy(connection->peek_msg+connection->peek_len, (BYTE*)buf+peek_read, read); - connection->peek_len += read; - } - - *recvd = read + peek_read; + *recvd = pSSL_read(connection->ssl_s, buf, len); return *recvd > 0 || !len; #else return FALSE; @@ -607,13 +553,9 @@ BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *avail if (!NETCON_connected(connection)) return FALSE; -#ifdef SONAME_LIBSSL - if (connection->peek_msg) *available = connection->peek_len + pSSL_pending(connection->ssl_s); -#endif - -#ifdef FIONREAD if (!connection->useSSL) { +#ifdef FIONREAD int unread; int retval = ioctlsocket(connection->socketFD, FIONREAD, &unread); if (!retval) @@ -621,99 +563,17 @@ BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *avail TRACE("%d bytes of queued, but unread data\n", unread); *available += unread; } - } #endif - return TRUE; -} - -/****************************************************************************** - * NETCON_getNextLine - */ -BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer) -{ - - TRACE("\n"); - - if (!NETCON_connected(connection)) return FALSE; - - if (!connection->useSSL) - { - struct pollfd pfd; - DWORD nRecv = 0; - int ret; - - pfd.fd = connection->socketFD; - pfd.events = POLLIN; - - while (nRecv < *dwBuffer) - { - if (poll(&pfd,1, RESPONSE_TIMEOUT * 1000) > 0) - { - if ((ret = recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0)) <= 0) - { - if (ret == -1) INTERNET_SetLastError(sock_get_error(errno)); - break; - } - - if (lpszBuffer[nRecv] == '\n') - { - lpszBuffer[nRecv++] = '\0'; - *dwBuffer = nRecv; - TRACE(":%u %s\n", nRecv, debugstr_a(lpszBuffer)); - return TRUE; - } - if (lpszBuffer[nRecv] != '\r') - nRecv++; - } - else - { - INTERNET_SetLastError(ERROR_INTERNET_TIMEOUT); - break; - } - } } else { #ifdef SONAME_LIBSSL - long prev_timeout; - DWORD nRecv = 0; - BOOL success = TRUE; - - prev_timeout = pSSL_CTX_get_timeout(ctx); - pSSL_CTX_set_timeout(ctx, RESPONSE_TIMEOUT); - - while (nRecv < *dwBuffer) - { - int recv = 1; - if (!NETCON_recv(connection, &lpszBuffer[nRecv], 1, 0, &recv)) - { - INTERNET_SetLastError(ERROR_CONNECTION_ABORTED); - success = FALSE; - } - - if (lpszBuffer[nRecv] == '\n') - { - success = TRUE; - break; - } - if (lpszBuffer[nRecv] != '\r') - nRecv++; - } - - pSSL_CTX_set_timeout(ctx, prev_timeout); - if (success) - { - lpszBuffer[nRecv++] = '\0'; - *dwBuffer = nRecv; - TRACE("_SSL:%u %s\n", nRecv, lpszBuffer); - return TRUE; - } + *available = pSSL_pending(connection->ssl_s); #endif } - return FALSE; + return TRUE; } - LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection) { #ifdef SONAME_LIBSSL
1
0
0
0
Alexandre Julliard : wininet/tests: Add a test for reading chunked data.
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: bb5d973127a4f2ef5cb55be7ce7ffdd109adf528 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb5d973127a4f2ef5cb55be7c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 14 16:49:19 2009 +0200 wininet/tests: Add a test for reading chunked data. --- dlls/wininet/tests/http.c | 109 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 109 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 085bd67..7e3c08c 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -493,6 +493,114 @@ abort: first_connection_to_test_url = FALSE; } +static void InternetReadFile_chunked_test(void) +{ + BOOL res; + CHAR buffer[4000]; + DWORD length; + const char *types[2] = { "*", NULL }; + HINTERNET hi, hic = 0, hor = 0; + + trace("Starting InternetReadFile chunked test\n"); + + trace("InternetOpenA <--\n"); + hi = InternetOpenA("", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); + ok((hi != 0x0),"InternetOpen failed with error %u\n", GetLastError()); + trace("InternetOpenA -->\n"); + + if (hi == 0x0) goto abort; + + trace("InternetConnectA <--\n"); + hic=InternetConnectA(hi, "
test.winehq.org
", INTERNET_INVALID_PORT_NUMBER, + NULL, NULL, INTERNET_SERVICE_HTTP, 0x0, 0xdeadbeef); + ok((hic != 0x0),"InternetConnect failed with error %u\n", GetLastError()); + trace("InternetConnectA -->\n"); + + if (hic == 0x0) goto abort; + + trace("HttpOpenRequestA <--\n"); + hor = HttpOpenRequestA(hic, "GET", "/testchunked", NULL, NULL, types, + INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RESYNCHRONIZE, + 0xdeadbead); + if (hor == 0x0 && GetLastError() == ERROR_INTERNET_NAME_NOT_RESOLVED) { + /* + * If the internet name can't be resolved we are probably behind + * a firewall or in some other way not directly connected to the + * Internet. Not enough reason to fail the test. Just ignore and + * abort. + */ + } else { + ok((hor != 0x0),"HttpOpenRequest failed with error %u\n", GetLastError()); + } + trace("HttpOpenRequestA -->\n"); + + if (hor == 0x0) goto abort; + + trace("HttpSendRequestA -->\n"); + SetLastError(0xdeadbeef); + res = HttpSendRequestA(hor, "", -1, NULL, 0); + ok(res || (GetLastError() == ERROR_INTERNET_NAME_NOT_RESOLVED), + "Synchronous HttpSendRequest returning 0, error %u\n", GetLastError()); + trace("HttpSendRequestA <--\n"); + + length = 100; + res = HttpQueryInfoA(hor,HTTP_QUERY_CONTENT_TYPE,buffer,&length,0x0); + buffer[length]=0; + trace("Option CONTENT_TYPE -> %i %s\n",res,buffer); + + SetLastError( 0xdeadbeef ); + length = 100; + res = HttpQueryInfoA(hor,HTTP_QUERY_TRANSFER_ENCODING,buffer,&length,0x0); + buffer[length]=0; + trace("Option TRANSFER_ENCODING -> %i %s\n",res,buffer); + ok( res, "Failed to get TRANSFER_ENCODING option, error %u\n", GetLastError() ); + ok( !strcmp( buffer, "chunked" ), "Wrong transfer encoding '%s'\n", buffer ); + + SetLastError( 0xdeadbeef ); + length = 16; + res = HttpQueryInfoA(hor,HTTP_QUERY_CONTENT_LENGTH,&buffer,&length,0x0); + ok( !res, "Found CONTENT_LENGTH option '%s'\n", buffer ); + ok( GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND, "Wrong error %u\n", GetLastError() ); + + length = 100; + trace("Entering Query loop\n"); + + while (TRUE) + { + res = InternetQueryDataAvailable(hor,&length,0x0,0x0); + ok(!(!res && length != 0),"InternetQueryDataAvailable failed with non-zero length\n"); + ok(res, "InternetQueryDataAvailable failed, error %d\n", GetLastError()); + trace("got %u available\n",length); + if (length) + { + DWORD got; + char *buffer = HeapAlloc(GetProcessHeap(),0,length+1); + + res = InternetReadFile(hor,buffer,length,&got); + + buffer[got]=0; + trace("ReadFile -> %i %i\n",res,got); + ok( length == got, "only got %u of %u available\n", got, length ); + ok( buffer[got-1] == '\n', "received partial line '%s'\n", buffer ); + + HeapFree(GetProcessHeap(),0,buffer); + if (!got) break; + } + if (length == 0) + break; + } +abort: + trace("aborting\n"); + if (hor != 0x0) { + res = InternetCloseHandle(hor); + ok (res, "InternetCloseHandle of handle opened by HttpOpenRequestA failed\n"); + } + if (hi != 0x0) { + res = InternetCloseHandle(hi); + ok (res, "InternetCloseHandle of handle opened by InternetOpenA failed\n"); + } +} + static void InternetReadFileExA_test(int flags) { DWORD rc; @@ -2571,5 +2679,6 @@ START_TEST(http) test_http_connection(); test_user_agent_header(); test_bogus_accept_types_array(); + InternetReadFile_chunked_test(); HttpSendRequestEx_test(); }
1
0
0
0
Alexandre Julliard : wininet: Add a read-ahead buffer to allow InternetQueryDataAvailable to return the right values in chunked mode .
by Alexandre Julliard
14 May '09
14 May '09
Module: wine Branch: master Commit: 3d02c42b39c7346a97c41974418a6d01a29f9b81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3d02c42b39c7346a97c419744…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu May 14 16:45:38 2009 +0200 wininet: Add a read-ahead buffer to allow InternetQueryDataAvailable to return the right values in chunked mode. --- dlls/wininet/http.c | 376 ++++++++++++++++++++++++++++------------------- dlls/wininet/internet.h | 3 + 2 files changed, 227 insertions(+), 152 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3d02c42b39c7346a97c41…
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200