r2001 - in branches/1.1: . bin/varnishd lib/libvcl
des at projects.linpro.no
des at projects.linpro.no
Sun Sep 23 16:26:59 CEST 2007
Author: des
Date: 2007-09-23 16:26:59 +0200 (Sun, 23 Sep 2007)
New Revision: 2001
Modified:
branches/1.1/
branches/1.1/bin/varnishd/cache_vrt.c
branches/1.1/lib/libvcl/vcc_compile.c
branches/1.1/lib/libvcl/vcc_compile.h
branches/1.1/lib/libvcl/vcc_token.c
Log:
Merged revisions 1971-1974 via svnmerge from
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache
........
r1971 | phk | 2007-09-21 00:25:27 +0200 (Fri, 21 Sep 2007) | 4 lines
Don't core dump if VCL tries to compare NULL pointers, just let the
comparison fail. This typically happens if a paticular header is
not present.
........
r1972 | phk | 2007-09-21 00:26:31 +0200 (Fri, 21 Sep 2007) | 2 lines
Avoid a double free when we encounter a 'include' directive.
........
r1973 | phk | 2007-09-21 00:26:53 +0200 (Fri, 21 Sep 2007) | 2 lines
vcc_FreeToken() is no longer necessary
........
r1974 | phk | 2007-09-21 00:27:25 +0200 (Fri, 21 Sep 2007) | 3 lines
Fix an extremely fine C-standard point and remove the vcc_FreeToken()
prototype
........
Property changes on: branches/1.1
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/varnish-cache:1-1722,1727-1729,1738,1743-1777,1779-1798,1800-1808,1810-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970,1984,1986-1989,1992-1998
+ /trunk/varnish-cache:1-1722,1727-1729,1738,1743-1777,1779-1798,1800-1808,1810-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1984,1986-1989,1992-1998
Modified: branches/1.1/bin/varnishd/cache_vrt.c
===================================================================
--- branches/1.1/bin/varnishd/cache_vrt.c 2007-09-23 14:26:03 UTC (rev 2000)
+++ branches/1.1/bin/varnishd/cache_vrt.c 2007-09-23 14:26:59 UTC (rev 2001)
@@ -540,5 +540,7 @@
int
VRT_strcmp(const char *s1, const char *s2)
{
+ if (s1 == NULL || s2 == NULL)
+ return(1);
return (strcmp(s1, s2));
}
Modified: branches/1.1/lib/libvcl/vcc_compile.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_compile.c 2007-09-23 14:26:03 UTC (rev 2000)
+++ branches/1.1/lib/libvcl/vcc_compile.c 2007-09-23 14:26:59 UTC (rev 2001)
@@ -458,9 +458,6 @@
TAILQ_REMOVE(&tl->tokens, t, list);
TAILQ_REMOVE(&tl->tokens, t1, list);
TAILQ_REMOVE(&tl->tokens, t2, list);
- vcc_FreeToken(t);
- vcc_FreeToken(t1);
- vcc_FreeToken(t2);
if (!tl->err)
vcc_resolve_includes(tl);
return;
Modified: branches/1.1/lib/libvcl/vcc_compile.h
===================================================================
--- branches/1.1/lib/libvcl/vcc_compile.h 2007-09-23 14:26:03 UTC (rev 2000)
+++ branches/1.1/lib/libvcl/vcc_compile.h 2007-09-23 14:26:59 UTC (rev 2001)
@@ -102,6 +102,12 @@
HEADER
};
+enum var_access {
+ V_RO,
+ V_RW,
+ V_WO
+};
+
enum ref_type {
R_FUNC,
R_ACL,
@@ -122,7 +128,7 @@
unsigned len;
const char *rname;
const char *lname;
- enum {V_RO, V_RW, V_WO} access;
+ enum var_access access;
const char *hdr;
unsigned methods;
};
@@ -185,7 +191,6 @@
void vcc_NextToken(struct tokenlist *tl);
void vcc__ErrInternal(struct tokenlist *tl, const char *func, unsigned line);
void vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b, const char *e);
-void vcc_FreeToken(struct token *t);
/* vcc_var.c */
struct var *vcc_FindVar(struct tokenlist *tl, const struct token *t, struct var *vl);
Modified: branches/1.1/lib/libvcl/vcc_token.c
===================================================================
--- branches/1.1/lib/libvcl/vcc_token.c 2007-09-23 14:26:03 UTC (rev 2000)
+++ branches/1.1/lib/libvcl/vcc_token.c 2007-09-23 14:26:59 UTC (rev 2001)
@@ -275,19 +275,6 @@
}
/*--------------------------------------------------------------------
- * Free a token
- */
-
-void
-vcc_FreeToken(struct token *t)
-{
-
- if (t->dec != NULL)
- free(t->dec);
- free(t);
-}
-
-/*--------------------------------------------------------------------
* Lexical analysis and token generation
*/
More information about the varnish-commit
mailing list