Fwd: Buddy presence issue

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

 



I felt the pjrpid_element is a pointer. If only you define a pointer you
could use *&elem* in
pjsua_acc_set_online_status2(acc_id,online_status,&elem);

Try:
pjrpid_element *elem;

This might be one of reason for your crash.

On Mon, Sep 21, 2009 at 10:18 AM, Yuvaraj R <yuvaraj at ongobiz.com> wrote:

>
>

> ---------- Forwarded message ----------
> From: Yuvaraj R <yuvaraj@xxxxxxxxxxx>
> Date: Mon, Sep 21, 2009 at 7:47 PM
> Subject: Buddy presence issue
> To: pjsip at list.pjsip.org
>
>
> Hi All
>
> I am  have trouble with  buddy presence
>
> I want to set following status for buddy
>
> 1) Online
>
> 2)offline
>
> 3) Away
>
> 4) ideal
>
>
> *Code :*
> bool *ok;
>
> pj_status_t status;
>
> pj_bool_t online_status;
>
> pjrpid_element elem;
>
> enum status
>
> {
>
> Online,
>
> Offline,
>
> Busy,
>
> Idle,
>
> Away,
>
> };
>
> QMessageBox::information(0,"",QString("1"));
>
> if(sipOn)
>
> {
>
> QMessageBox::information(0,"",QString("2"));
>
> switch(text.toInt(ok,10))
>
> {
>
> case Online:
>
> elem.activity = PJRPID_ACTIVITY_BUSY;
>
> elem.note = pj_str("Busy");
>
> online_status =PJ_TRUE;
>
> break;
>
> case Offline:
>
> online_status =PJ_FALSE;
>
> break;
>
> case Idle:
>
> elem.activity = PJRPID_ACTIVITY_UNKNOWN;
>
> elem.note = pj_str("Idle");
>
> online_status =PJ_TRUE;
>
> break;
>
> case Away:
>
> elem.activity = PJRPID_ACTIVITY_AWAY;
>
> elem.note = pj_str("Away");
>
> break;
>
> }
>
> QMessageBox::information(0,"",QString("3"));
>
> pjsua_acc_set_online_status2(acc_id, online_status, &elem);
>
> QMessageBox::information(0,"",QString("4"));
>
> }
>
> Here QmessageBox is  Qt realated to verify the code (such as printf
> statements).
>
> When i am calling the pjsua_acc_set_online_status2(acc_id, online_status,
> &elem); My application is crashing..
>
>
> Can anybody say what is the reason.
>
> Please help me.
>
>
> Thanks
>
> Yuvaraj R
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090921/15d692af/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux