[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ldap_unbind_s crashes, iphone
- To: openldap-technical@openldap.org
- Subject: ldap_unbind_s crashes, iphone
- From: Anil <replicase@gmail.com>
- Date: Fri, 22 Oct 2010 21:57:35 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=9+UN9y/qfNoLhb+C/tzOKhzP7gINwLzJXU+a3YBZfzg=; b=sR6xuIlkLMBl6QWAZGvIp17wJIvPm+kZ7VL1KJl6buKo84opMsBFQ8f5AXwqU2RnvH WrAVBsN6DOCZHzkFHPQLRU9HocCESQhJRUebQ+N+YKTmM+dgPKyc+KCUq7dXZAgTQ4Oz JGsW2o2GtpXwnCtIfzEAcXAd/ilkhuZUxhW+o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=vrVolVQ5n+60w7qzl09LW7Iu8eqxyWjey/UBgoT1gA44PeIfYlWx33y3BCZbsvaG0F EM1beRKqOaxVbgA/AXPHyCVvVMKPswjSm+Njo+NXB+ma4PYA72vMTFBhb+FJj29+wBTy em79aMblp+HswY4yVu5AQRligeSrYkzsLiL7c=
Hi, I am using the OpenLDAP SDK for an iPhone project.
On the iPhone 4, applications can go into the background (in a frozen
state) and then come back to the foreground.
When the app comes to the foreground, I do a unbind and then
reconnect, to ensure I have a good connection (the LDAP server could
do idle time out...). Sometimes, this ldap_unbind_s crashes the app,
as noted below in the code and logs:
if (LDAPServer)
{
NSLog(@"ldap_unbind_s req: %@", description);
ldap_unbind_s(LDAPServer);
NSLog(@"ldap_unbind_s completed: %@", description);
}
LDAPServer = NULL;
Fri Oct 22 21:35:01 unknown CloudFace[780] <Warning>: ldap_unbind_s
req: Entic.net
Fri Oct 22 21:35:01 unknown com.apple.launchd[1] <Warning>:
(UIKitApplication:net.entic.cf[0xb4bf]) Exited abnormally: Broken pipe
Fri Oct 22 21:35:01 unknown SpringBoard[26] <Warning>: Application
'CloudFace' exited abnormally with signal 13: Broken pipe
How should I handle proper unbind operation for this?
I could just skip the whole unbind operation, and then make a *new*
connection when the app is brought to the foreground and skip the
whole ldap_unbind_s call. Is that the recommended action?
Remember, the app can be in the background for just a few seconds or
could be hours (when the connection would be dropped). I am trying to
avoid having to make new connections repeatedly.
I also have a method, setupServer() that is something like this:
+ (void) setupServer:(Server *)server {
NSLog(@"+setupServer");
if ([server LDAPServer])
{
NSLog(@"setupServer skipped... connection exists");
return;
}
...
}
I have idle timeout set to 5 minutes on the LDAP server. Sometimes,
even after 5-10 minutes, it doesn't crash, but sometimes it does...
and it always seems to be in the ldap_unbind_s, I think.
Thanks!
Anil