charafe
Joined: 06 Feb 2007 Posts: 12
|
Posted: Tue Mar 27, 2007 6:23 pm Post subject: Matchingcallback in adhoc connection |
|
|
Hi,
I am having trouble with the matchingcallback: it looks like it doesn't take any event into consideration. Here is my code (taken from PspPet)
| Code: | void matchingCallback(int unk1, int event, char *mac2, int optLen, char *optData)
{
// This is called when there is an event, dont seem to be able to call
// procs from here otherwise it causes a crash
printf("in the matching callback");
sceKernelDelayThread(5000*1000);
if(event==MATCHING_JOINED)
{
AddPsp(mac2, optData, optLen);
}
else if(event==MATCHING_DISCONNECT)
{
DelPsp(mac2);
}
else
{
g_unk1 = unk1;
g_matchEvent = event;
g_matchOptLen = optLen;
// Copy across the optional data
strncpy(g_matchOptData, optData, optLen);
// And the MAC address
memcpy(g_mac, mac2, sizeof(char) * 6);
matchChanged = 1;
}
}
|
It is called in my prog like this
| Code: | matchingId = sceNetAdhocMatchingCreate( 3,
0xA,
0x22B,
0x800,
0x2DC6C0,
0x5B8D80,
3,
0x7A120,
matchingCallback); |
Do you why it doesn't take any event into consideration?. [EDIT] I have notice that two of the prx i was loading encountered error: ifhandle.prx and pspnet.prx. Do you think it is linked?
Thank you, any information would be useful... _________________ Rad |
|