[Openais] Re: evt message leak patch
Mark Haverkamp
markh at osdl.org
Fri Jul 30 08:26:24 PDT 2004
On Fri, 2004-07-30 at 07:23, Mark Haverkamp wrote:
> On Thu, 2004-07-29 at 16:02, Steven Dake wrote:
> > Mark
> >
> > I have fixed the amf in a similiar fashion for the dispatch, but I
> > haven't done the destructor yet.
> >
> > I'm not a big fan of for(;;) operations but I guess we can come back to
> > it later when we have more time.
>
> Since saQueueIsEmpty always returns SA_OK, maybe it could just return
> queue status. Then the while could be:
>
> while (!saQueueIsEmpty(queue)) {
>
> ...
>
> }
>
> (also for QueueIsFull).
>
> Mark.
If you don't want to change the queue functions, how about this:
while ((saQueueIsEmpty(&evti->ei_inq, &empty) == SA_OK) && !empty) {
saQueueItemGet(&evti->ei_inq, &msg);
saQueueItemRemove(&evti->ei_inq);
free(msg);
}
--
Mark Haverkamp <markh at osdl.org>
More information about the Openais
mailing list