]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/search.c
Don't reeval expression
[openldap] / servers / slapd / back-shell / search.c
index a1579e20e215e31c5291f1528a96efc7c19a504e..cc9e4dcca642dbec2775e3e4b9f22a43be7fd6a4 100644 (file)
@@ -36,7 +36,7 @@ shell_back_search(
        FILE                    *rfp, *wfp;
        AttributeName           *an;
 
-       if ( IS_NULLCMD( si->si_search ) ) {
+       if ( si->si_search == NULL ) {
                send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
                    "search not implemented", NULL, NULL );
                return( -1 );
@@ -44,14 +44,13 @@ shell_back_search(
 
        if ( (op->o_private = (void *) forkandexec( si->si_search, &rfp, &wfp ))
            == (void *) -1 ) {
-               send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
+               send_ldap_result( conn, op, LDAP_OTHER, NULL,
                    "could not fork/exec", NULL, NULL );
                return( -1 );
        }
 
        /* write out the request to the search process */
        fprintf( wfp, "SEARCH\n" );
-       fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
        fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
        print_suffixes( wfp, be );
        fprintf( wfp, "base: %s\n", base->bv_val );