diff --git a/examples/sock/hello_world/Makefile b/examples/sock/hello_world/Makefile index 43ce98e0e8..e326bf26be 100644 --- a/examples/sock/hello_world/Makefile +++ b/examples/sock/hello_world/Makefile @@ -38,6 +38,6 @@ APP = hello_sock C_SRCS := hello_sock.c SPDK_LIB_LIST = $(SOCK_MODULES_LIST) -SPDK_LIB_LIST += event thread util conf trace log jsonrpc json rpc sock notify +SPDK_LIB_LIST += event_net net event thread util conf trace log jsonrpc json rpc sock notify include $(SPDK_ROOT_DIR)/mk/spdk.app.mk diff --git a/examples/sock/hello_world/hello_sock.c b/examples/sock/hello_world/hello_sock.c index 1002e3ee9c..fcacabbf53 100644 --- a/examples/sock/hello_world/hello_sock.c +++ b/examples/sock/hello_world/hello_sock.c @@ -116,13 +116,6 @@ static int hello_sock_parse_arg(int ch, char *arg) return 0; } -static void -hello_sock_net_fini_cb(void *cb_arg) -{ - struct hello_context_t *ctx = cb_arg; - spdk_app_stop(ctx->rc); -} - static int hello_sock_close_timeout_poll(void *arg) { @@ -134,7 +127,7 @@ hello_sock_close_timeout_poll(void *arg) spdk_sock_close(&ctx->sock); spdk_sock_group_close(&ctx->group); - spdk_net_framework_fini(hello_sock_net_fini_cb, arg); + spdk_app_stop(ctx->rc); return 0; } @@ -382,15 +375,10 @@ hello_sock_shutdown_cb(void) * Our initial event that kicks off everything from main(). */ static void -hello_start(void *arg1, int rc) +hello_start(void *arg1) { struct hello_context_t *ctx = arg1; - - if (rc) { - SPDK_ERRLOG("ERROR starting application\n"); - spdk_app_stop(-1); - return; - } + int rc; SPDK_NOTICELOG("Successfully started the application\n"); @@ -406,12 +394,6 @@ hello_start(void *arg1, int rc) } } -static void -start_net_framework(void *arg1) -{ - spdk_net_framework_start(hello_start, arg1); -} - int main(int argc, char **argv) { @@ -433,7 +415,7 @@ main(int argc, char **argv) hello_context.port = g_port; hello_context.verbose = g_verbose; - rc = spdk_app_start(&opts, start_net_framework, &hello_context); + rc = spdk_app_start(&opts, hello_start, &hello_context); if (rc) { SPDK_ERRLOG("ERROR starting application\n"); }