< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Bug report


Thank you Byron, but same problem, this is my code:

        Data subject;

        if (sub.exists(h_Subject)==true && sub.header(h_Subject).isWellFormed()==true)
        {
            subject = sub.header(h_Subject).value();
        }


On Thu, Jul 24, 2008 at 10:42 PM, Byron Campen <bcampen@xxxxxxxxxxxx> wrote:
You need to throw in a sub.header(h_Subject).isWellFormed() in that check, ie:

        Data subject;

        if (sub.exists(h_Subject)==true && sub.header(h_Subject).isWellFormed() && sub.header(h_Subject).value().empty()==false)

        {
            subject = sub.header(h_Subject).value();
        }

Best regards,
Byron Campen

Hi all, I think I found a bug:

1: I using the counterpath Bria to send a presence SUBSCRIBE to my UA.
2: I use wireshark to capture the SUBSCRIBE message, saw it has Subject header, but this header value is empty.
 
3: onNewSubscription(ServerSubscriptionHandle h, const SipMessage& sub)  call back is fired, then I use this code to access the Subject header:

        Data subject;

        if (sub.exists(h_Subject)==true && sub.header(h_Subject).value().empty()==false)
        {
            subject = sub.header(h_Subject).value();
        }

When running to sub.header(h_Subject).value().empty()==false, the VC2005 debuger go to dialogusagemanager.cxx line 1778:

            catch (BaseException& e)
            {
               SipMessage failure;   <----------- it's go to here
               makeResponse(failure, request, 400, e.getMessage());
               failure.header(h_AcceptLanguages) = getMasterProfile()->getSupportedLanguages();
               sendResponse(failure);
            }


If  the subject header value is not empty, then all are ok.

thanks
_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/