Re: gnome-vfs http method code freeze break request



Hey,
	Looks fine. 2 of 2.

Cheers,
Mark.

On Wed, 2004-09-01 at 17:49, Murray Cumming wrote:
> OK. 1 of 2.
> 
> The nulling of the pointer is harmless, and the other bit looks fairly
> simple. It's a bit scary because I'm not familiar with the rest of the
> code (and marks will be deducted from your final grade for using a goto),
> but hopefully it only adds behaviour, and only affects DAV and that
> doesn't affect many people.
> 
> Thanks.
> 
> > There are a couple of problems in the dav modules for dav-servers that
> > redirect directories without slashes to ones with slashes (such as
> > apache). One is a double free, the other a failure to handle the
> > redirect.
> >
> > Can i commit the following fix:
> > Index: modules/http-neon-method.c
> > ===================================================================
> > RCS file: /cvs/gnome/gnome-vfs/modules/http-neon-method.c,v
> > retrieving revision 1.8
> > diff -u -p -r1.8 http-neon-method.c
> > --- modules/http-neon-method.c	27 Aug 2004 10:45:31 -0000	1.8
> > +++ modules/http-neon-method.c	1 Sep 2004 15:59:01 -0000
> > @@ -1824,9 +1824,11 @@ http_list_directory (HttpContext *contex
> >  	pfh = ne_propfind_create (context->session, context->path, 1);
> >  	res = ne_propfind_named (pfh, file_info_props, propfind_result, pfctx);
> >
> > -	if (tofree != NULL)
> > +	if (tofree != NULL) {
> >  		g_free (tofree);
> > -
> > +		tofree = NULL;
> > +	}
> > +
> >  	if (res == NE_REDIRECT) {
> >
> >  		ne_propfind_destroy (pfh);
> > @@ -2790,11 +2792,17 @@ do_make_directory (GnomeVFSMethod  *meth
> >  	}
> >
> >  	http_context_set_uri (hctx, uri);
> > -
> > +
> > + mkcol_start:
> >  	req = ne_request_create (hctx->session, "MKCOL", hctx->path);
> >  	res = ne_request_dispatch (req);
> >
> > -	if (res == NE_OK) {
> > +	if (res == NE_REDIRECT) {
> > +		result = http_follow_redirect (hctx);
> > +
> > +		if (result == GNOME_VFS_OK)
> > +			goto mkcol_start;
> > +	} else if (res == NE_OK) {
> >  		const ne_status *status = ne_get_status (req);
> >  		if (status->code == 409)
> >  			result = GNOME_VFS_ERROR_NOT_FOUND;
> >
> >
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >  Alexander Larsson                                            Red Hat, Inc
> >                    alexl redhat com    alla lysator liu se
> > He's a deeply religious albino photographer who dotes on his loving old
> > ma.
> > She's a radical impetuous widow with the soul of a mighty warrior. They
> > fight
> > crime!
> >
> > _______________________________________________
> > release-team mailing list
> > release-team gnome org
> > http://mail.gnome.org/mailman/listinfo/release-team
> >
> 
> 
> Murray Cumming
> murrayc murrayc com
> www.murrayc.com
> www.openismus.com
> _______________________________________________
> release-team mailing list
> release-team gnome org
> http://mail.gnome.org/mailman/listinfo/release-team




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]