1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
--- pecl/varnish/trunk/varnish_lib.c 2015/02/13 21:33:27 335940
+++ pecl/varnish/trunk/varnish_lib.c 2015/02/14 09:42:22 335941
@@ -812,6 +812,13 @@
return 0;
}/*}}}*/
+#if HAVE_VARNISHAPILIB >= 4
+int
+php_varnish_snap_stats(zval *storage, const char *ident TSRMLS_DC)
+{/*{{{*/
+ return 0;
+}/*}}}*/
+#else
int
php_varnish_snap_stats(zval *storage, const char *ident TSRMLS_DC)
{/*{{{*/
@@ -832,25 +839,21 @@
return 0;
}
-#if HAVE_VARNISHAPILIB >= 4
- /* XXX use VSM_fantom */
- vcm = VSC_Main(vd, NULL);
-
- return !VSC_Iter(vd, NULL, php_varnish_snap_stats_cb, storage);
-#else
vcm = VSC_Main(vd);
return !VSC_Iter(vd, php_varnish_snap_stats_cb, storage);
-#endif
}/*}}}*/
+#endif
-#if HAVE_VARNISHAPILIB >=4
+#if HAVE_VARNISHAPILIB >= 4
int
-php_varnish_get_log(const struct VSL_data *vd, zval *line TSRMLS_DC)
+php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC)
+{/*{{{*/
+ return 0;
+}/*}}}*/
#else
int
php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC)
-#endif
{/*{{{*/
uint32_t *p;
int i;
@@ -880,6 +883,7 @@
}/*}}}*/
#endif
+#endif
int
php_varnish_is_running(int sock, int *status, int tmo TSRMLS_DC)
--- pecl/varnish/trunk/varnish_lib.h 2015/02/13 21:33:27 335940
+++ pecl/varnish/trunk/varnish_lib.h 2015/02/14 09:42:22 335941
@@ -96,13 +96,8 @@
php_varnish_clear_panic(int sock, int *status, int tmo TSRMLS_DC);
#ifndef PHP_WIN32
-#if HAVE_VARNISHAPILIB >=4
-int
-php_varnish_get_log(const struct VSL_data *vd, zval *line TSRMLS_DC);
-#else
int
php_varnish_get_log(const struct VSM_data *vd, zval *line TSRMLS_DC);
-#endif
void
php_varnish_log_get_tag_name(int index, char **ret, int *ret_len TSRMLS_DC);
--- pecl/varnish/trunk/varnish_lib.c 2015/02/14 09:42:22 335941
+++ pecl/varnish/trunk/varnish_lib.c 2015/02/14 10:05:43 335942
@@ -777,6 +777,7 @@
}/*}}}*/
#ifndef PHP_WIN32
+#if HAVE_VARNISHAPILIB < 4
static int
php_varnish_snap_stats_cb(void *priv, const struct VSC_point const *pt)
{/*{{{*/
@@ -811,6 +812,7 @@
return 0;
}/*}}}*/
+#endif
#if HAVE_VARNISHAPILIB >= 4
int
--- pecl/varnish/trunk/varnish_lib.c 2015/02/14 10:05:43 335942
+++ pecl/varnish/trunk/varnish_lib.c 2015/02/14 10:15:29 335943
@@ -350,8 +350,6 @@
char *t_arg, *t_start, *p, tmp_addr[41];
#if HAVE_VARNISHAPILIB >= 4
struct VSM_fantom vt;
-#else
- char *p;
#endif
vsd = VSM_New();
|