multiple add friend requests - WeOnlyDo Discussion board

multiple add friend requests (wodXMPP)

by Sapna, Monday, June 15, 2009, 13:21 (5401 days ago)

hi,
i tried the add buddy thing. using the xmpp contactauthrequest function. if a buddy tries adding the same guy multiple times the client is crashing. can you please check this out. the buddy was a guy on gtalk.

Thanks,
sapna

Re: multiple add friend requests

by woddrazen, Monday, June 15, 2009, 14:19 (5401 days ago) @ Sapna

Sapna,


I cannot duplicate your problem. Are you able to duplicate it maybe using one of our samples?

You can find VB.NET and C# samples in component Samples folder. You can use them in VS 2005.


Drazen

Re: multiple add friend requests

by Sapna, Monday, June 15, 2009, 15:01 (5401 days ago) @ woddrazen

[code]void CViaClientDlg::XMPP_ContactAuthRequest(LPDISPATCH Contact, long* Action)
{
IXMPPContact cnt;

cnt.AttachDispatch(Contact);

CString jid = cnt.GetJid();

int i = jid.Find('/');

if (i > 1)
jid = jid.Left(i);

i = jid.Find(' ');

if (i > 1)
jid = jid.Left(i);
//linked list of buddies in a status sorted list
ClientObject *nav = SearchForClientInStatusSortedList(cnt) ;

if(nav == NULL)
{
CBuddyRequest m_pBuddyRequest ;
//to set the buddy name who wants to add you
m_pBuddyRequest.SetRequestBuddyName(jid) ;
int nRet = m_pBuddyRequest.DoModal() ;
if(nRet == IDOK)
{
//for getting the text of the button clicked whether accept, deny or //ignore
CString authorizationText = m_pBuddyRequest.GetAuthText() ;

if(authorizationText == Accept )
{
*Action = 1 ;
}
else if(authorizationText == Deny )
*Action = 0 ;
}
else
{
*Action = -1 ;
}
}
else
{
*Action = 3 ;
}
cnt.ReleaseDispatch() ;
}[/code]

this code when executed, crashes when the same buddy requests more than once.. is there a possible way out?

Re: multiple add friend requests

by woddrazen, Monday, June 15, 2009, 15:58 (5401 days ago) @ Sapna

Sapna,


If you want to add new contact to your list why don't you use then XMPPContacts object Add Method?

More help for Add Method you can find here:
http://www.weonlydo.com/XMPP/Help/WODXMPPLib~XMPPContacts~Add.html

Also you should put that code outside ContactAuthRequest Event.

Here is example how to add new contact in C#[code]
WODXMPPCOMLib.XMPPContact cnt;
cnt = wodXMPP1.Contacts.Add(textBox3.Text);
cnt.Subscribe();[/code]
Drazen

Re: multiple add friend requests

by Sapna, Monday, June 15, 2009, 16:15 (5401 days ago) @ woddrazen

i want the list of contacts to be sorted according to my will. if i say ignore or deny or accept to a friend request the application crashes. any idea why this happens?

Re: multiple add friend requests

by wodDamir, Monday, June 15, 2009, 21:09 (5401 days ago) @ Sapna

Sapna,

Where exactly does the application crash?

Can you perhaps send us a sample which we can run on our side to reproduce the same behaviour?

Regards,
Damba

Re: multiple add friend requests

by Sapna, Tuesday, June 16, 2009, 09:07 (5400 days ago) @ wodDamir

hi,

see when a user A invites user B more than once, the user B's application is crashing. the crash is happening in the dll. so i cant view it in my code. its saying it No symbols are loaded for any call stack frame. The source code cannot be displayed . and hence in the call stack it shows the details of the dll's where they are crashing. i can show you the list of dll's that get listed out. they are:
wodxmpp.dll!01761813()
wodxmpp.dll!01761740()
wodxmpp.dll!0176195d()
wodxmpp.dll!0176140b()

thanks,
sapna

Re: multiple add friend requests

by wodDamir, Tuesday, June 16, 2009, 09:10 (5400 days ago) @ Sapna

Sapna,

Can you please modify our sample, or create new one and send it over to us, so we can try exactly the same thing?

We need something to reproduce the exact same issue.

You can send sample to techsupport@weonlydo.com

Regards,
Damba

Re: multiple add friend requests

by sapna, Tuesday, July 07, 2009, 17:04 (5379 days ago) @ wodDamir

hi..

if i keep denying requests from a user during a single session the for more than one request from a gmail client the client code that i have written crashes.

Re: multiple add friend requests

by sapna, Tuesday, July 07, 2009, 17:14 (5379 days ago) @ sapna

also,

is there any way i can ignore a request? that is i don't want to accept or deny. just ignore

Re: multiple add friend requests

by woddrazen, Tuesday, July 07, 2009, 18:08 (5379 days ago) @ sapna

Sapna,


You can use SilentDeny in ContactAuthRequest Event for Action variable value.

More help for ContactAuthRequest Event you can find here:
http://www.weonlydo.com/XMPP/Help/WODXMPPLib~wodXMPP~ContactAuthRequest_EV.html

I cannot duplicate your problem when authorization request is denied for multiple times and wodXMPP crash.

Can you maybe send us some simple sample that will duplicate it?


Drazen

Re: multiple add friend requests

by sapna, Wednesday, July 08, 2009, 07:24 (5378 days ago) @ woddrazen

what if i say silent deny? i mean can't i accept the request later? i need to ignore so that i can accept the request later. what do you mean my silent accept?

Re: multiple add friend requests

by wodDamir, Wednesday, July 08, 2009, 08:38 (5378 days ago) @ sapna

Sapna,

The only way to *ignore* is not to act to ContactAuthRequest event at all. However, is there any chance we could reproduce the behaviour?

We are unable to reproduce the same behaviour on our side, so I presume it could be the issue with part of your code. Can you please write us a sample to reproduce the issue on our side?

You can send us the sample app to techsupport@weonlydo.com

Regards,
Damba