[Date Prev][Date Next] [Chronological] [Thread] [Top]

Exception handling!!!



Title: Exception handling!!!

Sorry, this is the first time posting to any forum, So, am missing important data.

Below is the, part of code where am initializing and  binding connection with the server.

res = ldap_initialize(&ld, ldapuri);
if( res != LDAP_SUCCESS )
   {
     char *errorM = NULL;
      errorM = ldap_err2string(res);
      if(errorM != NULL)
       // Print Error

         return NULL;
   }
                 
if(ld != NULL)
   {
     res = ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &protocol );
                 
     if(res == LDAP_OPT_SUCCESS)
       {
          if(ld != NULL)
         {
           res = ldap_start_tls_s(ld, NULL, NULL);
           if(res == LDAP_SUCCESS)
            {
              if(ld !=  NULL)
               {
                  res = ldap_sasl_interactive_bind_s( ld, NULL,"NTLM", NULL, NULL,
                                                    sasl_flags, saslInteract, &auth );

                }
            }
         }
         else
          {
               //ld is null
          }
        }
     }

And below is the backtrace of the crash.

0   liblber-2.3.0.dylib                 0x007b9583 ber_sockbuf_ctrl + 147
1   libldap-2.3.0.dylib                 0x007d25ad ldap_host_connected_to + 93
2   libldap-2.3.0.dylib                 0x007c67f1 ldap_int_sasl_bind + 177
3   libldap-2.3.0.dylib                 0x007c9064 ldap_sasl_interactive_bind_s + 84
4   myApp                                      0x003f54fb 0x1000 + 4146427
5   myApp                                      0x003f7e50 0x1000 + 4157008
6   com.apple.Foundation                0x94176ff1 __NSFireMachPort + 325
7   com.apple.CoreFoundation            0x94c03402 __CFMachPortPerform + 338
8   com.apple.CoreFoundation            0x94bff16b __CFRunLoopRun + 6523
9   com.apple.CoreFoundation            0x94bfd0f4 CFRunLoopRunSpecific + 452
10  com.apple.CoreFoundation            0x94bfcf21 CFRunLoopRunInMode + 97
11  com.apple.Foundation                0x9414f380 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 279
12  com.apple.Foundation                0x9414f25d -[NSRunLoop(NSRunLoop) run] + 76
13  com.polycom.CMADesktop              0x003f4c53 0x1000 + 4144211
14  com.apple.Foundation                0x941158dc -[NSThread main] + 45
15  com.apple.Foundation                0x9411588c __NSThread__main__ + 1499
16  libSystem.B.dylib                   0x965d5a19 _pthread_start + 345
17  libSystem.B.dylib                   0x965d589e thread_start + 34