summaryrefslogtreecommitdiff
path: root/lib/examples
diff options
context:
space:
mode:
Diffstat (limited to 'lib/examples')
-rw-r--r--lib/examples/Makefile4
-rw-r--r--lib/examples/client.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/examples/Makefile b/lib/examples/Makefile
index ceb97f1..a9876da 100644
--- a/lib/examples/Makefile
+++ b/lib/examples/Makefile
@@ -6,7 +6,7 @@ blocking.o: blocking.c blocking.h ../libradsec-base.h ../libradsec.h
$(CC) $(CFLAGS) -c -I .. $^
client: client.c ../libradsec.a ../libradsec.h ../libradsec-impl.h
- $(CC) $(CFLAGS) -o $@ $< -L /usr/lib/freeradius -lfreeradius-radius -L .. -lradsec
+ $(CC) $(CFLAGS) -o $@ $< -L /usr/lib/freeradius -lfreeradius-radius -L .. -lradsec -L /usr/local/lib -levent
clean:
- -rm *.o
+ -rm *.o client
diff --git a/lib/examples/client.c b/lib/examples/client.c
index eab4390..a6b7999 100644
--- a/lib/examples/client.c
+++ b/lib/examples/client.c
@@ -55,8 +55,12 @@ int
main (int argc, char *argv[])
{
struct rs_error *err;
+ char *host;
+ int port;
- err = rsx_client (strsep (argv + 1, ":"), atoi (argv[1]));
+ host = strsep (argv + 1, ":");
+ port = atoi (argv[1]);
+ err = rsx_client (host, port);
if (!err)
return -1;
fprintf (stderr, "%s\n", rs_err_msg (err, 0));