Back to index

openldap  2.4.31
Functions
unbind.c File Reference
#include "portable.h"
#include <stdio.h>
#include <ac/socket.h>
#include <ac/string.h>
#include "slap.h"
#include "back-sock.h"

Go to the source code of this file.

Functions

int sock_back_unbind (Operation *op, SlapReply *rs)

Function Documentation

int sock_back_unbind ( Operation op,
SlapReply rs 
)

Definition at line 32 of file unbind.c.

{
       struct sockinfo      *si = (struct sockinfo *) op->o_bd->be_private;
       FILE                 *fp;

       if ( (fp = opensock( si->si_sockpath )) == NULL ) {
              send_ldap_error( op, rs, LDAP_OTHER,
                  "could not open socket" );
              return( -1 );
       }

       /* write out the request to the unbind process */
       fprintf( fp, "UNBIND\n" );
       fprintf( fp, "msgid: %ld\n", (long) op->o_msgid );
       sock_print_conn( fp, op->o_conn, si );
       sock_print_suffixes( fp, op->o_bd );
       fprintf( fp, "\n" );

       /* no response to unbind */
       fclose( fp );

       return 0;
}

Here is the call graph for this function: