From 23ade94f86703e6e086e96cdc76793e367bb0285 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 26 Jan 2009 23:43:30 +0000 Subject: [PATCH] 2009-01-27 00:39 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/examples/uhttpd/uhttpd.prg ! Fixed RTE when in socket.c mode. * contrib/examples/uhttpd/socket.c ! Fixed leak. Thanks to Mindaugas. ; TOFIX: Ajax test (404 Not Found), Counter (image not found), cgi-bin (broken link), XML database (empty boxes in Chrome, empty boxes and error messagebox with IE8) doesn't work here. Shall I configure something? --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/contrib/examples/uhttpd/socket.c | 12 +++++++++--- harbour/contrib/examples/uhttpd/uhttpd.prg | 4 ++-- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c89364e6aa..981cf44721 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,22 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-01-27 00:39 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/examples/uhttpd/uhttpd.prg + ! Fixed RTE when in socket.c mode. + + * contrib/examples/uhttpd/socket.c + ! Fixed leak. Thanks to Mindaugas. + + ; TOFIX: Ajax test (404 Not Found), + Counter (image not found), + cgi-bin (broken link), + XML database (empty boxes in Chrome, empty boxes + and error messagebox with IE8) + doesn't work here. + + Shall I configure something? + 2009-01-27 00:21 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/examples/uhttpd/uhttpd.prg + Added callstack in RTE message (ugly but useful). diff --git a/harbour/contrib/examples/uhttpd/socket.c b/harbour/contrib/examples/uhttpd/socket.c index 51e6070331..5999268f04 100644 --- a/harbour/contrib/examples/uhttpd/socket.c +++ b/harbour/contrib/examples/uhttpd/socket.c @@ -203,7 +203,9 @@ HB_FUNC ( SOCKET_ACCEPT ) if( ISBYREF( 2 ) ) { - hb_itemParamStoreForward( 2, hb_itemPutSockaddr( NULL, &saddr ) ); + PHB_ITEM pItem = hb_itemPutSockaddr( NULL, &saddr ); + hb_itemParamStoreForward( 2, pItem ); + hb_itemRelease( pItem ); } } @@ -398,7 +400,9 @@ HB_FUNC ( SOCKET_GETSOCKNAME ) hb_retni( getsockname( hb_parsocket( 1 ), &saddr, &iSize ) ); if( ISBYREF( 2 ) ) { - hb_itemParamStoreForward( 2, hb_itemPutSockaddr( NULL, &saddr ) ); + PHB_ITEM pItem = hb_itemPutSockaddr( NULL, &saddr ); + hb_itemParamStoreForward( 2, pItem ); + hb_itemRelease( pItem ); } } @@ -411,7 +415,9 @@ HB_FUNC ( SOCKET_GETPEERNAME ) hb_retni( getpeername( hb_parsocket( 1 ), &saddr, &iSize ) ); if( ISBYREF( 2 ) ) { - hb_itemParamStoreForward( 2, hb_itemPutSockaddr( NULL, &saddr ) ); + PHB_ITEM pItem = hb_itemPutSockaddr( NULL, &saddr ); + hb_itemParamStoreForward( 2, pItem ); + hb_itemRelease( pItem ); } } diff --git a/harbour/contrib/examples/uhttpd/uhttpd.prg b/harbour/contrib/examples/uhttpd/uhttpd.prg index ce7ce49c1a..63bc7beec2 100644 --- a/harbour/contrib/examples/uhttpd/uhttpd.prg +++ b/harbour/contrib/examples/uhttpd/uhttpd.prg @@ -777,7 +777,7 @@ LOCAL aI IF socket_getsockname( hSocket, @aI ) != -1 _SERVER["SERVER_ADDR"] := aI[2] - _SERVER["SERVER_PORT"] := aI[3] + _SERVER["SERVER_PORT"] := LTrim( Str( aI[3] ) ) ENDIF #endif IF ParseRequest( cRequest ) @@ -978,7 +978,7 @@ LOCAL aI IF socket_getsockname( hSocket, @aI ) != -1 _SERVER["SERVER_ADDR"] := aI[2] - _SERVER["SERVER_PORT"] := aI[3] + _SERVER["SERVER_PORT"] := LTrim( Str( aI[3] ) ) ENDIF #endif