How to disconnect a ObexFileTransferServices connection?
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com User-agent: Thunderbird 1.5.0.8 (Macintosh/20061025) then I'm connecting it to FileTransferServices: status = [mFileTransferService connectToFTPService]; and the delegate function: So I call: status = [mFileTransferService disconnect]; and in the call back: status = [mFileTransferService connectToObjectPushService]; Ralf Menssen _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... It seems to be not possible to close an ObexFileTransferServices without destroying the ObexSession. I am creating an ObexFileTransferServices using withOBEXSession (relevant code only): mOBEXSession = [[IOBluetoothOBEXSession withDevice:mBTDevice channelID:channelID] retain]; mFileTransferService = [[OBEXFileTransferServices withOBEXSession:mOBEXSession] retain]; - (void) fileTransferServicesConnectionComplete:(OBEXFileTransferServices *)inServices error:(OBEXError)inError is entered with (inError == 0). Everything is fine, I can work with the device. For some reason I now want to switch to the ObjectPushService, it behaves differently when sending a file and this other behaviour is wanted. - (void) fileTransferServicesDisconnectionComplete:(OBEXFileTransferServices*)inServices error:(OBEXError)inError { NSLog ([NSString stringWithFormat:@"DisconnectionComplete: %d", inError]); if([mFileTransferService isConnected]) NSLog (@"After Close is still connected"); } It tells me disconnection was successful (inError == 0), but also that mFileTransferService is still connected. The now following attempt to connect to ObjectPushService: fails in the fileTransferServicesConnectionComplete delegate function with error -21882 (kOBEXSessionAlreadyConnectedError). Connecting to FTPServices again would also fail with same error. So to me it looks like disconnecting does not what it promises to do. Is it necessary to close the whole OBEXSession here? This email sent to site_archiver@lists.apple.com
participants (1)
-
Ralf Menssen