summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-04-27 15:40:50 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-04-27 15:40:50 +0200
commit34c40b7ba465382cfc3ef83af00793dfbb8fa943 (patch)
tree9f64215f326c3847699ae8856ae9cd0d609cbfac /src/tools
parentb6dc5ba9576d61d42db82c3da8cb0c039fac7179 (diff)
parent6809a2beea07a661a9c651cae1e100537c401bb7 (diff)
downloadouroboros-34c40b7ba465382cfc3ef83af00793dfbb8fa943.tar.gz
ouroboros-34c40b7ba465382cfc3ef83af00793dfbb8fa943.zip
Merge remote-tracking branch 'upstream/be' into be
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/echo/echo_server.c5
-rw-r--r--src/tools/irm/irm_create_ipcp.c11
2 files changed, 7 insertions, 9 deletions
diff --git a/src/tools/echo/echo_server.c b/src/tools/echo/echo_server.c
index b1547d8c..e457e22b 100644
--- a/src/tools/echo/echo_server.c
+++ b/src/tools/echo/echo_server.c
@@ -64,15 +64,16 @@ int server_main()
return -1;
}
+ printf("Echo server started...\n");
+
while (true) {
client_fd = flow_accept(server_fd,
client_name, NULL);
if (client_fd < 0) {
- printf("Failed to accept flow\n");
continue;
}
- printf("New flow from %s", client_name);
+ printf("New flow from %s\n", client_name);
if (flow_alloc_resp(client_fd, 0)) {
printf("Failed to give an allocate response\n");
diff --git a/src/tools/irm/irm_create_ipcp.c b/src/tools/irm/irm_create_ipcp.c
index 08b55259..e82bd980 100644
--- a/src/tools/irm/irm_create_ipcp.c
+++ b/src/tools/irm/irm_create_ipcp.c
@@ -39,7 +39,6 @@ static void usage()
{
printf("Usage: irm create_ipcp\n"
" ap <application process name>\n"
- " [api <application process instance>]\n"
" type [TYPE]\n\n"
"where TYPE = {" NORMAL " " SHIM_UDP "}\n");
}
@@ -47,16 +46,14 @@ static void usage()
int do_create_ipcp(int argc, char ** argv)
{
char * ipcp_type = NULL;
- instance_name_t api = {NULL, 0};
+ char * ipcp_name = NULL;
enum ipcp_type type = 0;
while (argc > 0) {
if (matches(*argv, "type") == 0) {
ipcp_type = *(argv + 1);
} else if (matches(*argv, "ap") == 0) {
- api.name = *(argv + 1);
- } else if (matches(*argv, "api") == 0) {
- api.id = atoi(*(argv + 1));
+ ipcp_name = *(argv + 1);
} else {
printf("\"%s\" is unknown, try \"irm "
"create_ipcp\".\n", *argv);
@@ -67,7 +64,7 @@ int do_create_ipcp(int argc, char ** argv)
argv += 2;
}
- if (ipcp_type == NULL || api.name == NULL) {
+ if (ipcp_type == NULL || ipcp_name == NULL) {
usage();
return -1;
}
@@ -81,5 +78,5 @@ int do_create_ipcp(int argc, char ** argv)
return -1;
}
- return irm_create_ipcp(&api, type);
+ return !irm_create_ipcp(ipcp_name, type);
}