Fix gvc graph
This commit is contained in:
parent
80b9f00739
commit
2a75861741
3 changed files with 10 additions and 3 deletions
|
@ -205,7 +205,7 @@ Rendering routes with graphviz
|
|||
|
||||
The `test_gvc_render_file` API let you render the whole route trie into a image.
|
||||
|
||||
![Imgur](http://i.imgur.com/ZwaDEAq.png)
|
||||
![Imgur](http://i.imgur.com/hA8QXRi.png)
|
||||
|
||||
Or you can even export it with dot format:
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ void r3_tree_build_ag_nodes(Agraph_t * g, Agnode_t * ag_parent_node, const node
|
|||
node_cnt++;
|
||||
|
||||
char *nodename = NULL;
|
||||
if ( n->combined_pattern ) {
|
||||
asprintf(&nodename,"%s", n->combined_pattern);
|
||||
if ( e && e->child && e->child->combined_pattern ) {
|
||||
asprintf(&nodename,"%s", e->child->combined_pattern);
|
||||
} else {
|
||||
asprintf(&nodename,"#%d", node_cnt);
|
||||
}
|
||||
|
|
|
@ -74,6 +74,13 @@ char * r3_slug_to_str(r3_slug_t *s) {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
r3_slug_t * r3_slug_parse_next(r3_slug_t *s) {
|
||||
r3_slug_parse(s->end, s->path_len - (s->end - s->begin), s->end;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
r3_slug_t * r3_slug_parse(const char *needle, int needle_len, char **errstr) {
|
||||
r3_slug_t * s = r3_slug_new(needle, needle_len);
|
||||
|
||||
|
|
Loading…
Reference in a new issue