}
}
if (conn->c_is_udp && op->o_protocol == LDAP_VERSION2) {
- rc = ber_printf( ber, "{is{t{ess",
+ rc = ber_printf( ber, "{is{t{ess" /*"}}}"*/,
msgid, "", tag, err,
matched == NULL ? "" : matched,
text == NULL ? "" : text );
} else
#endif
{
- rc = ber_printf( ber, "{it{ess",
+ rc = ber_printf( ber, "{it{ess" /*"}}"*/,
msgid, tag, err,
matched == NULL ? "" : matched,
text == NULL ? "" : text );
}
if( rc != -1 ) {
- rc = ber_printf( ber, "N}N}" );
+ rc = ber_printf( ber, /*"{{"*/ "N}N}" );
}
#ifdef LDAP_CONNECTIONLESS
if( conn->c_is_udp && op->o_protocol == LDAP_VERSION2 && rc != -1 ) {
- rc = ber_printf( ber, "N}" );
+ rc = ber_printf( ber, /*"{"*/ "N}" );
}
#endif
: an_find( attrs, &AllOper );
/* create an array of arrays of flags. Each flag corresponds
- * to particular value of attribute an equals 1 if value matches
+ * to particular value of attribute and equals 1 if value matches
* to ValuesReturnFilter or 0 if not
*/
for ( a = e->e_attrs, i=0; a != NULL; a = a->a_next ) i++;
for ( a = e->e_attrs, i=0; a != NULL; a = a->a_next, i++ ) {
for ( j = 0; a->a_vals[j].bv_val != NULL; j++ );
- a_flags = ch_calloc ( j, sizeof(char) );
- /* If no ValuesReturnFilter control return everything */
- if ( op->vrFilter == NULL ){
- memset(a_flags, 1, j);
+ if( j ) {
+ a_flags = ch_calloc ( j, sizeof(char) );
+ /* If no ValuesReturnFilter control return everything */
+ if ( op->vrFilter == NULL ) {
+ memset(a_flags, 1, j);
+ }
+ } else {
+ a_flags = NULL;
}
e_flags[i] = a_flags;
}
- if ( op->vrFilter != NULL ){
-
+ if ( op->vrFilter != NULL ) {
rc = filter_matched_values(be, conn, op, e->e_attrs, &e_flags) ;
if ( rc == -1 ) {
e_flags[i] = a_flags;
}
- if ( op->vrFilter != NULL ){
-
+ if ( op->vrFilter != NULL ) {
rc = filter_matched_values(be, conn, op, aa, &e_flags) ;
if ( rc == -1 ) {
if ( bytes < 0 ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_ERR,
- "send_ldap_response: conn %lu ber write failed.\n",
+ "send_search_entry: conn %lu ber write failed.\n",
op->o_connid ));
#else
Debug( LDAP_DEBUG_ANY,
- "send_ldap_response: ber write failed\n",
+ "send_search_entry: ber write failed\n",
0, 0, 0 );
#endif
s, 0, 0 );
#endif
-
return( -1 );
}