forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Matchingcallback in adhoc connection

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
charafe



Joined: 06 Feb 2007
Posts: 12

PostPosted: Tue Mar 27, 2007 6:23 pm    Post subject: Matchingcallback in adhoc connection Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group