1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

* modules/ldap/util_ldap_cache.c (util_ldap_url_node_display,

util_ldap_search_node_display, util_ldap_compare_node_display,
util_ldap_dn_compare_node_display): Use ap_rprintf.  Terminate table
rows with "</tr>" not "<tr>".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@226825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joe Orton
2005-08-01 15:46:46 +00:00
parent 1dbc14199b
commit c1e4ed78b3

View File

@@ -80,7 +80,6 @@ void util_ldap_url_node_display(request_rec *r, util_ald_cache_t *cache, void *n
{ {
util_url_node_t *node = n; util_url_node_t *node = n;
char date_str[APR_CTIME_LEN+1]; char date_str[APR_CTIME_LEN+1];
char *buf;
const char *type_str; const char *type_str;
util_ald_cache_t *cache_node; util_ald_cache_t *cache_node;
int x; int x;
@@ -108,24 +107,22 @@ void util_ldap_url_node_display(request_rec *r, util_ald_cache_t *cache, void *n
else else
date_str[0] = 0; date_str[0] = 0;
buf = apr_psprintf(r->pool, ap_rprintf(r,
"<tr valign='top'>" "<tr valign='top'>"
"<td nowrap>%s (%s)</td>" "<td nowrap>%s (%s)</td>"
"<td nowrap>%ld</td>" "<td nowrap>%ld</td>"
"<td nowrap>%ld</td>" "<td nowrap>%ld</td>"
"<td nowrap>%ld</td>" "<td nowrap>%ld</td>"
"<td nowrap>%ld</td>" "<td nowrap>%ld</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<tr>", "</tr>",
node->url, node->url,
type_str, type_str,
cache_node->size, cache_node->size,
cache_node->maxentries, cache_node->maxentries,
cache_node->numentries, cache_node->numentries,
cache_node->fullmark, cache_node->fullmark,
date_str); date_str);
ap_rputs(buf, r);
} }
} }
@@ -222,21 +219,18 @@ void util_ldap_search_node_display(request_rec *r, util_ald_cache_t *cache, void
{ {
util_search_node_t *node = n; util_search_node_t *node = n;
char date_str[APR_CTIME_LEN+1]; char date_str[APR_CTIME_LEN+1];
char *buf;
apr_ctime(date_str, node->lastbind); apr_ctime(date_str, node->lastbind);
buf = apr_psprintf(r->pool, ap_rprintf(r,
"<tr valign='top'>" "<tr valign='top'>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<tr>", "</tr>",
node->username, node->username,
node->dn, node->dn,
date_str); date_str);
ap_rputs(buf, r);
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
@@ -291,7 +285,7 @@ void util_ldap_compare_node_display(request_rec *r, util_ald_cache_t *cache, voi
{ {
util_compare_node_t *node = n; util_compare_node_t *node = n;
char date_str[APR_CTIME_LEN+1]; char date_str[APR_CTIME_LEN+1];
char *buf, *cmp_result; char *cmp_result;
apr_ctime(date_str, node->lastcompare); apr_ctime(date_str, node->lastcompare);
@@ -305,21 +299,19 @@ void util_ldap_compare_node_display(request_rec *r, util_ald_cache_t *cache, voi
cmp_result = apr_itoa(r->pool, node->result); cmp_result = apr_itoa(r->pool, node->result);
} }
buf = apr_psprintf(r->pool, ap_rprintf(r,
"<tr valign='top'>" "<tr valign='top'>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<tr>", "</tr>",
node->dn, node->dn,
node->attrib, node->attrib,
node->value, node->value,
date_str, date_str,
cmp_result); cmp_result);
ap_rputs(buf, r);
} }
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
@@ -367,17 +359,14 @@ void util_ldap_dn_compare_node_free(util_ald_cache_t *cache, void *n)
void util_ldap_dn_compare_node_display(request_rec *r, util_ald_cache_t *cache, void *n) void util_ldap_dn_compare_node_display(request_rec *r, util_ald_cache_t *cache, void *n)
{ {
util_dn_compare_node_t *node = n; util_dn_compare_node_t *node = n;
char *buf;
buf = apr_psprintf(r->pool, ap_rprintf(r,
"<tr valign='top'>" "<tr valign='top'>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<td nowrap>%s</td>" "<td nowrap>%s</td>"
"<tr>", "</tr>",
node->reqdn, node->reqdn,
node->dn); node->dn);
ap_rputs(buf, r);
} }