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 

Problem with fioDclose()?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sat Apr 02, 2005 9:29 am    Post subject: Problem with fioDclose()? Reply with quote

In testing ps2client, I've come across a problem where I can't close a directory I've opened. Here's the log:

Quote:
[*] TESTING DIRECTORY ACCESS
dopen name host:TEST
[REQ] BABE0161
[OPENDIR] TEST = -1209704440
dopen fd = -1209704440
[*] fioDopen('host:TEST') = -1209704440
[*] fioDclose(-1209704440) = -9


You can see when I fioDopen, the client receives request BABE0161, which is opendir. Then when I send fioDclose, it returns -9 without ever closedir sending a request to the client. I should be seeing BABE0171.

Here's what pksh fresh out of cvs sees:

Quote:
log: [*] TESTING DIRECTORY ACCESS
log: dopen name host:TEST
log: dopen fd = -1209831416
log: [*] fioDopen('host:TEST') = -1209831416
log: [*] fioDclose(-1209831416) = -9


Any ideas? I figure it has to be in ps2link or ps2sdk somewhere, but I haven't come across any strange bugs in the code that stick out. Perhaps the fio code on the iop checks the fd before passing it on, rejecting it because it is below zero?

Hmm, perhaps making it an unsigned int instead will get it to send the request.
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sat Apr 02, 2005 9:39 am    Post subject: Reply with quote

When I send a fake number, it sends through just fine...

Quote:
[*] TESTING DIRECTORY ACCESS
dopen name host:TEST
[REQ] BABE0161
[OPENDIR] TEST = 2
dopen fd = 2
[*] fioDopen('host:TEST') = 2
[REQ] BABE0171
[CLOSEDIR] 2 = 0
[*] fioDclose(2) = 2


Looks like I'll be keeping an array of DIR structures client-side and sending just the index into that array. Oh well.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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