Author: adrian.chadd
Date: Tue Apr 28 16:43:50 2009
New Revision: 14010

Modified:
    branches/LUSCA_HEAD/libhttp/HttpHeader.c
    branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.c
    branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.h

Log:
Remove the duplicate functions. I have a feeling that I ended up duplicating
this part of the http rework stuff in the cacheboy head branch as I was  
tidying
up in general..



Modified: branches/LUSCA_HEAD/libhttp/HttpHeader.c
==============================================================================
--- branches/LUSCA_HEAD/libhttp/HttpHeader.c    (original)
+++ branches/LUSCA_HEAD/libhttp/HttpHeader.c    Tue Apr 28 16:43:50 2009
@@ -329,7 +329,7 @@
  httpHeaderAddEntryString(HttpHeader *hdr, http_hdr_type id, const String  
*a, const String *v)
  {
        HttpHeaderEntry *e = memPoolAlloc(pool_http_header_entry);
-       httpHeaderEntryCreate2(e, id, a, v);
+       httpHeaderEntryCreateStr(e, id, a, v);
        httpHeaderAddEntry(hdr, e);
  }


Modified: branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.c
==============================================================================
--- branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.c       (original)
+++ branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.c       Tue Apr 28 16:43:50 2009
@@ -74,31 +74,6 @@
   * HttpHeaderEntry
   */

-/* XXX new functions */
-void
-httpHeaderEntryInitString(HttpHeaderEntry *e, http_hdr_type id, String  
name, String value)
-{
-       assert(e->active == 0);
-
-       e->id = id;
-       if (id != HDR_OTHER)
-               e->name = Headers[id].name;
-       else
-               e->name = stringDup(&name);
-       e->value = stringDup(&value);
-       Headers[id].stat.aliveCount++;
-       e->active = 1;
-
-       debug(55, 9) ("httpHeaderEntryInitString: entry %p: '%s: %s'\n", e,
-           strBuf(e->name), strBuf(e->value));
-}
-
-void
-httpHeaderEntryCopy(HttpHeaderEntry *dst, HttpHeaderEntry *src)
-{
-       httpHeaderEntryInitString(dst, src->id, src->name, src->value);
-}
-
  /* XXX old functions */

  /*
@@ -106,7 +81,6 @@
   */
  void
  httpHeaderEntryCreate(HttpHeaderEntry *e, http_hdr_type id, const char  
*name, int al, const char *value, int vl)
-
  {
      assert_eid(id);
      assert(! e->active);
@@ -127,7 +101,7 @@
  }

  void
-httpHeaderEntryCreate2(HttpHeaderEntry *e, http_hdr_type id, const String  
*name, const String *value)
+httpHeaderEntryCreateStr(HttpHeaderEntry *e, http_hdr_type id, const  
String *name, const String *value)
  {
      assert_eid(id);
      assert(! e->active);
@@ -161,6 +135,6 @@
  void
  httpHeaderEntryClone(HttpHeaderEntry *new_e, const HttpHeaderEntry * e)
  {
-    httpHeaderEntryCreate2(new_e, e->id, &e->name, &e->value);
+    httpHeaderEntryCreateStr(new_e, e->id, &e->name, &e->value);
  }


Modified: branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.h
==============================================================================
--- branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.h       (original)
+++ branches/LUSCA_HEAD/libhttp/HttpHeaderEntry.h       Tue Apr 28 16:43:50 2009
@@ -15,15 +15,12 @@
  static inline int httpHeaderEntryIsActive(HttpHeaderEntry *e) { return  
(e->active); };

  /* avoid using these low level routines */
-extern void httpHeaderEntryCreate(HttpHeaderEntry *e, http_hdr_type id,  
const char *name, int al, const char *value, int vl);
-extern void httpHeaderEntryCreate2(HttpHeaderEntry *e, http_hdr_type id,  
const String *name, const String *value);
-
-extern void httpHeaderEntryDestroy(HttpHeaderEntry * e);
-extern void httpHeaderEntryClone(HttpHeaderEntry *new_e, const  
HttpHeaderEntry * e);

  /* new low-level routines */
+extern void httpHeaderEntryCreateStr(HttpHeaderEntry *e, http_hdr_type id,  
const String *name, const String *value);
  extern void httpHeaderEntryInitString(HttpHeaderEntry *e, http_hdr_type  
id, String name, String value);
-extern void httpHeaderEntryCopy(HttpHeaderEntry *dst, HttpHeaderEntry  
*src);
-/* Destroy, Clone, Create/Create2 now belong here */
+extern void httpHeaderEntryClone(HttpHeaderEntry *new_e, const  
HttpHeaderEntry * e);
+extern void httpHeaderEntryCreate(HttpHeaderEntry *e, http_hdr_type id,  
const char *name, int al, const char *value, int vl);
+extern void httpHeaderEntryDestroy(HttpHeaderEntry * e);

  #endif

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to