You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2005/08/01 17:46:48 UTC

svn commit: r226825 - /httpd/httpd/trunk/modules/ldap/util_ldap_cache.c

Author: jorton
Date: Mon Aug  1 08:46:46 2005
New Revision: 226825

URL: http://svn.apache.org/viewcvs?rev=226825&view=rev
Log:
* 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>".

Modified:
    httpd/httpd/trunk/modules/ldap/util_ldap_cache.c

Modified: httpd/httpd/trunk/modules/ldap/util_ldap_cache.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ldap/util_ldap_cache.c?rev=226825&r1=226824&r2=226825&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap_cache.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap_cache.c Mon Aug  1 08:46:46 2005
@@ -80,7 +80,6 @@
 {
     util_url_node_t *node = n;
     char date_str[APR_CTIME_LEN+1];
-    char *buf;
     const char *type_str;
     util_ald_cache_t *cache_node;
     int x;
@@ -108,24 +107,22 @@
         else 
             date_str[0] = 0;
 
-        buf = apr_psprintf(r->pool, 
-                 "<tr valign='top'>"
-                 "<td nowrap>%s (%s)</td>"
-                 "<td nowrap>%ld</td>"
-                 "<td nowrap>%ld</td>"
-                 "<td nowrap>%ld</td>"
-                 "<td nowrap>%ld</td>"
-                 "<td nowrap>%s</td>"
-                 "<tr>",
-             node->url,
-             type_str,
-             cache_node->size,
-             cache_node->maxentries,
-             cache_node->numentries,
-             cache_node->fullmark,
-             date_str);
-    
-        ap_rputs(buf, r);
+        ap_rprintf(r, 
+                   "<tr valign='top'>"
+                   "<td nowrap>%s (%s)</td>"
+                   "<td nowrap>%ld</td>"
+                   "<td nowrap>%ld</td>"
+                   "<td nowrap>%ld</td>"
+                   "<td nowrap>%ld</td>"
+                   "<td nowrap>%s</td>"
+                   "</tr>",
+                   node->url,
+                   type_str,
+                   cache_node->size,
+                   cache_node->maxentries,
+                   cache_node->numentries,
+                   cache_node->fullmark,
+                   date_str);
     }
 
 }
@@ -222,21 +219,18 @@
 {
     util_search_node_t *node = n;
     char date_str[APR_CTIME_LEN+1];
-    char *buf;
 
     apr_ctime(date_str, node->lastbind);
 
-    buf = apr_psprintf(r->pool, 
-             "<tr valign='top'>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<tr>",
-         node->username,
-         node->dn,
-         date_str);
-
-    ap_rputs(buf, r);
+    ap_rprintf(r,
+               "<tr valign='top'>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "</tr>",
+               node->username,
+               node->dn,
+               date_str);
 }
 
 /* ------------------------------------------------------------------ */
@@ -291,7 +285,7 @@
 {
     util_compare_node_t *node = n;
     char date_str[APR_CTIME_LEN+1];
-    char *buf, *cmp_result;
+    char *cmp_result;
 
     apr_ctime(date_str, node->lastcompare);
 
@@ -305,21 +299,19 @@
         cmp_result = apr_itoa(r->pool, node->result);
     }
 
-    buf = apr_psprintf(r->pool, 
-             "<tr valign='top'>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<tr>",
-         node->dn,
-         node->attrib,
-         node->value,
-         date_str,
-         cmp_result);
-
-    ap_rputs(buf, r);
+    ap_rprintf(r, 
+               "<tr valign='top'>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "</tr>",
+               node->dn,
+               node->attrib,
+               node->value,
+               date_str,
+               cmp_result);
 }
 
 /* ------------------------------------------------------------------ */
@@ -367,17 +359,14 @@
 void util_ldap_dn_compare_node_display(request_rec *r, util_ald_cache_t *cache, void *n)
 {
     util_dn_compare_node_t *node = n;
-    char *buf;
-
-    buf = apr_psprintf(r->pool, 
-             "<tr valign='top'>"
-             "<td nowrap>%s</td>"
-             "<td nowrap>%s</td>"
-             "<tr>",
-         node->reqdn,
-         node->dn);
 
-    ap_rputs(buf, r);
+    ap_rprintf(r, 
+               "<tr valign='top'>"
+               "<td nowrap>%s</td>"
+               "<td nowrap>%s</td>"
+               "</tr>",
+               node->reqdn,
+               node->dn);
 }