aboutsummaryrefslogtreecommitdiff
path: root/plugins/http.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-06-24 05:10:23 +0200
committerPřemysl Janouch <p@janouch.name>2018-06-24 05:10:23 +0200
commit87f70c18131514316b55f5c22e67dfcd993faf38 (patch)
treecd5145ac23c9df0429604eb54a068db1a3c8ed86 /plugins/http.c
parentfa4e874f0811ebbb0e0f2d9ba4ec3fef907c8433 (diff)
downloadponymap-87f70c18131514316b55f5c22e67dfcd993faf38.tar.gz
ponymap-87f70c18131514316b55f5c22e67dfcd993faf38.tar.xz
ponymap-87f70c18131514316b55f5c22e67dfcd993faf38.zip
Bump liberty
Diffstat (limited to 'plugins/http.c')
-rw-r--r--plugins/http.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/http.c b/plugins/http.c
index cab4246..a38d154 100644
--- a/plugins/http.c
+++ b/plugins/http.c
@@ -102,8 +102,7 @@ scan_init (struct service *service, struct unit *u)
{
(void) service;
- struct str hello;
- str_init (&hello);
+ struct str hello = str_make ();
str_append_printf (&hello, "GET / HTTP/1.0\r\n"
"Host: %s\r\n\r\n", g_data.api->unit_get_address (u));
g_data.api->unit_write (u, hello.str, hello.len);
@@ -114,8 +113,8 @@ scan_init (struct service *service, struct unit *u)
scan->parser.data = scan;
scan->state = STATE_FIELD;
- str_init (&scan->field);
- str_init (&scan->value);
+ scan->field = str_make ();
+ scan->value = str_make ();
scan->u = u;
return scan;