aboutsummaryrefslogtreecommitdiff
path: root/ostp.d/init
diff options
context:
space:
mode:
Diffstat (limited to 'ostp.d/init')
-rw-r--r--ostp.d/init/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ostp.d/init/main.c b/ostp.d/init/main.c
index 08e020e..9b2a836 100644
--- a/ostp.d/init/main.c
+++ b/ostp.d/init/main.c
@@ -33,7 +33,7 @@
#include <stdio.h>
static int
-blah(struct ostp_session *s, const char *buf, size_t len)
+handle_data(struct ostp_client *s, const char *buf, size_t len)
{
printf("Got data!\n");
return 0;
@@ -43,16 +43,15 @@ int
main(void)
{
struct ostp_listener l;
- struct ostp_session s;
int error;
listener_init(&l);
- l.on_recv = blah;
+ l.on_recv = handle_data;
- if ((error = listener_bind(&s, &l)) < 0) {
+ if ((error = listener_bind(&l)) < 0) {
return error;
}
- if ((error = listener_poll(&s, &l)) < 0) {
+ if ((error = listener_poll(&l)) < 0) {
return error;
}