OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/vencode.c versions 1.10 and 1.11
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/vencode.c 1.10 -> 1.11

--- vencode.c    2001/07/19 15:21:35     1.10
+++ vencode.c    2001/07/24 15:46:18     1.11
@@ -33,6 +33,7 @@
 int xds_vencode(xds_t* xds, const char* fmt_arg, va_list args)
     {
     va_list args_backup;
+    size_t buffer_len_backup;
     char* name;
     char* p;
     char* fmt;
@@ -90,6 +91,7 @@
     fmt = p = strdup(fmt_arg);
     if (fmt == NULL)
         return XDS_ERR_NO_MEM;
+    buffer_len_backup = xds->buffer_len;
     for(name = p; *p != '\0'; name = p)
         {
         while(isalnum(*p) || *p == '-' || *p == '_')
@@ -125,7 +127,10 @@
                             args = args_backup;
                             }
                         else
+                            {
                             restart_engine = XDS_FALSE;
+                            xds->buffer_len += rc;
+                            }
 
                         if (!xds->we_own_buffer)
                             {
@@ -165,5 +170,7 @@
     /* Clean up and leave. */
   leave:
     free(fmt);
+    if (rc != XDS_OK)
+        xds->buffer_len = buffer_len_backup;
     return rc;
     }

CVSTrac 2.0.1