]> git.sur5r.net Git - openldap/commitdiff
In preparation for extensions improvements, added send_ldap_extended.
authorMark Valence <mrv@openldap.org>
Tue, 9 Nov 1999 03:29:50 +0000 (03:29 +0000)
committerMark Valence <mrv@openldap.org>
Tue, 9 Nov 1999 03:29:50 +0000 (03:29 +0000)
servers/slapd/result.c

index a0a503b8b5e9866bbd8ab7d5b4f89f14fe998733..c7f6892dfd7d24b99b013c194abb99b7ac613a5e 100644 (file)
@@ -440,6 +440,42 @@ send_ldap_result(
        }
 }
 
+void
+send_ldap_extended(
+    Connection *conn,
+    Operation  *op,
+    ber_int_t  err,
+    const char *matched,
+    const char *text,
+    char               *rspoid,
+       struct berval *rspdata
+)
+{
+       ber_tag_t tag;
+       ber_int_t msgid;
+
+       Debug( LDAP_DEBUG_TRACE,
+               "send_ldap_extended %d:%s\n",
+               err, rspoid ? rspoid : "", NULL );
+
+       tag = req2res( op->o_tag );
+       msgid = (tag != LBER_SEQUENCE) ? op->o_msgid : 0;
+
+#ifdef LDAP_CONNECTIONLESS
+       if ( op->o_cldap ) {
+               ber_pvt_sb_udp_set_dst( conn->c_sb, &op->o_clientaddr );
+               Debug( LDAP_DEBUG_TRACE, "UDP response to %s port %d\n", 
+                   inet_ntoa(((struct sockaddr_in *)
+                   &op->o_clientaddr)->sin_addr ),
+                   ((struct sockaddr_in *) &op->o_clientaddr)->sin_port,
+                   0 );
+       }
+#endif
+       send_ldap_response( conn, op, tag, msgid,
+               err, matched, text, NULL,
+               rspoid, rspdata, NULL );
+}
+
 
 void
 send_search_result(