samba-technical@lists.samba.org
[Top] [All Lists]

Re: svn commit: samba r17990 - in branches/SAMBA_4_0/source/librpc/rpc:.

Subject: Re: svn commit: samba r17990 - in branches/SAMBA_4_0/source/librpc/rpc:.
From: Rafal Szczesniak
Date: Sat, 2 Sep 2006 17:25:56 +0200
On Fri, Sep 01, 2006 at 01:06:40PM +0200, Stefan (metze) Metzmacher wrote:
> Hi Tridge,
> 
> >  /*
> > +  handle timeouts of a dcerpc connect
> > +*/
> > +static void dcerpc_connect_timeout_handler(struct event_context *ev,
> > struct timed_event *te,
> > +                                      struct timeval t, void *private)
> > +{
> > +   struct composite_context *c = talloc_get_type(private, struct
> > composite_context);
> > +   DEBUG(0,("DCERPC CONNECT TIMEOUT\n"));
> > +   composite_error(c, NT_STATUS_IO_TIMEOUT);
> > +   composite_done(c);
> > +}
> 
> this is wrong, composite_error() already calls the callback and frees 'c'
> and composite_done() would use freed memory

Though I sometimes think it would be more convenient to be able to first
set the status code with composite_error() and then do something more,
before calling the callback and freeing the composite context.


cheers,
-- 
Rafal Szczesniak
Samba Team member  http://www.samba.org

<Prev in Thread] Current Thread [Next in Thread>