On Monday 16 August 2010, Anca Vamanu wrote:
> On 08/16/2010 01:45 PM, Alex Hermann wrote:
> > 2) Add queueing. In your implementation you only keep one extra publish.
> > I'd prefer that the presence server receives all publishes, so i updated
> > the patch from csollet to put them in a queue.
> 
> I have now looked closer in this patch - it is not entirely correct. I
> see that on the tm callback when the reply is received, you send all the
> publishes in a loop - well, you actually have to wait for the reply of
> the first before sending another one. So there is no need for the
> 'while' there, but only a 'if'.

It was not supposed to do that :)

It was meant to loop through them on failure (the 'continue' statement). I 
missed a break after shm_free(pending_publ). The section now looks like this:


        presentity->waiting_reply = 0;
        while(presentity->pending_publ)
        {
                LM_DBG("Found pending publish\n");
                publ_t* pending_publ = presentity->pending_publ;
                publ_info_t* publ = construct_pending_publ(presentity);
                presentity->pending_publ = pending_publ->next;
                if(!publ)
                {
                        LM_ERR("Failed to create publish record\n");
                        shm_free(pending_publ);
                        continue;
                }

                presentity->waiting_reply = 1;
                send_publish_int(presentity, publ, get_event(presentity-
>event),
                                presentity->hash_index);
                pkg_free(publ);
                shm_free(pending_publ);
                break;
        }



-- 
Greetings,

Alex Hermann


_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to