Device creation in prompt mode stores some old values

Adding a standard Device after a plugin/csbi Device has been added, will result in another plugin/csbi device created.

Description

Expected Behavior

A device should be added based on the provided flags (standard if no flag is provided, plugin if of type=plugin and csbi if of type=csbi).

Actual Behavior

A device created with some additional flags like, e.g., plugin or csbi has some influence on the creation of devices created after.

Possible Fix

Probably there are some variables set which have to be reset.

Steps to Reproduce

  1. Start gosdnc in prompt mode
  2. Create a device of type=plugin
  3. Create a device without a type (standard)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. go v1.16.3 on FreeBSD 13.0-current):
  • Server type and version:
  • Operating System and version: