Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
e1cde638
Commit
e1cde638
authored
May 23, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix solaris compile nit
parent
5739314c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
vjsn.c
lib/libvarnishapi/vjsn.c
+1
-1
vsc.c
lib/libvarnishapi/vsc.c
+33
-5
No files found.
lib/libvarnishapi/vjsn.c
View file @
e1cde638
...
...
@@ -436,7 +436,7 @@ vjsn_dump_i(const struct vjsn_val *jsv, FILE *fo, int indent)
printf
(
" <%s"
,
jsv
->
value
);
else
printf
(
" <%.10s[...#%zu]"
,
jsv
->
value
,
strlen
(
jsv
->
value
)
-
10L
);
jsv
->
value
,
strlen
(
jsv
->
value
+
10
)
);
printf
(
">"
);
}
printf
(
"
\n
"
);
...
...
lib/libvarnishapi/vsc.c
View file @
e1cde638
...
...
@@ -34,6 +34,7 @@
#include <fnmatch.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
...
...
@@ -41,7 +42,9 @@
#include "vas.h"
#include "miniobj.h"
#include "vqueue.h"
#include "vjsn.h"
#include "vsb.h"
#include "vend.h"
#include "vapi/vsc.h"
#include "vapi/vsm.h"
...
...
@@ -313,10 +316,26 @@ vsc_add_pt(struct vsc *vsc, const volatile void *ptr,
/*--------------------------------------------------------------------
*/
static
void
vsc_build_old_vf_list
(
struct
vsc
*
vsc
)
{
#define VSC_TYPE_F(n,t,l,e,d) \
if (!strcmp(vsc->iter_fantom.type, t)) \
vsc_add_vf(vsc, &vsc->iter_fantom, \
&VSC_type_desc_##n, VSC_type_order_##n);
#include "tbl/vsc_types.h"
}
#include <stdio.h>
static
void
vsc_build_vf_list
(
struct
VSM_data
*
vd
)
{
uint64_t
u
;
struct
vsc
*
vsc
=
vsc_setup
(
vd
);
struct
vjsn
*
vj
;
const
char
*
p
;
const
char
*
e
;
vsc_delete_pt_list
(
&
vsc
->
pt_list
);
vsc_delete_vf_list
(
&
vsc
->
vf_list
);
...
...
@@ -324,11 +343,20 @@ vsc_build_vf_list(struct VSM_data *vd)
VSM_FOREACH
(
&
vsc
->
iter_fantom
,
vd
)
{
if
(
strcmp
(
vsc
->
iter_fantom
.
class
,
VSC_CLASS
))
continue
;
#define VSC_TYPE_F(n,t,l,e,d) \
if (!strcmp(vsc->iter_fantom.type, t)) \
vsc_add_vf(vsc, &vsc->iter_fantom, \
&VSC_type_desc_##n, VSC_type_order_##n);
#include "tbl/vsc_types.h"
u
=
vbe64dec
(
vsc
->
iter_fantom
.
b
);
vsc_build_old_vf_list
(
vsc
);
if
(
u
==
0
)
{
fprintf
(
stderr
,
"%s has no JSON
\n
"
,
vsc
->
iter_fantom
.
type
);
exit
(
2
);
}
p
=
(
char
*
)
vsc
->
iter_fantom
.
b
+
u
;
vj
=
vjsn_parse
(
p
,
&
e
);
if
(
e
!=
NULL
)
{
fprintf
(
stderr
,
"%s
\n
"
,
p
);
fprintf
(
stderr
,
"JSON ERROR %s
\n
"
,
e
);
}
AZ
(
e
);
//vjsn_dump(vj, stdout);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment