X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=proto-shell.c;h=41031c3553983000d4a406a5c31806eab7975190;hb=e443a041117d0d09e81a9797d205e5b70c481b15;hp=555004e6c9ffa74b3af21ca7ad0c3d5b335ad18a;hpb=40450b303077d925339d50395ecf79629ff0ba72;p=project%2Fnetifd.git diff --git a/proto-shell.c b/proto-shell.c index 555004e..41031c3 100644 --- a/proto-shell.c +++ b/proto-shell.c @@ -138,9 +138,11 @@ proto_shell_teardown_cb(struct uloop_process *p, int ret) struct proto_shell_state *state; state = container_of(p, struct proto_shell_state, teardown_task); - state->proto.proto_event(&state->proto, IFPEV_DOWN); + if (state->l3_dev.dev) device_remove_user(&state->l3_dev); + + state->proto.proto_event(&state->proto, IFPEV_DOWN); } static void @@ -408,7 +410,7 @@ proto_shell_parse_config(struct config_param_list *config, json_object *obj) if (attrs[i].type > BLOBMSG_TYPE_LAST) goto error; - str_len += strlen(attrs[i].name + 1); + str_len += strlen(attrs[i].name) + 1; } str_buf = malloc(str_len);