+#ifdef WITH_VOOTP
+static void vootp_info(void *priv, const char *text)
+{
+ class Port *port = (class Port *)priv;
+ char display[strlen(text) + 1];
+
+ SCPY(display, text);
+ if (display[0])
+ display[strlen(display) - 1] = '\0';
+
+ port->set_display(display);
+}
+
+void Port::set_vootp(struct param_vootp *vootp)
+{
+ if (p_vootp) {
+ vootp_destroy(p_vootp);
+ p_vootp = NULL;
+ }
+ if (vootp->enable) {
+ p_vootp = vootp_create(this, (options.law=='a'), options.otp_dir, NULL, NULL, vootp->id, vootp_info);
+// vootp_loglevel(VOOTP_LOGL_DEBUG);
+ if (!p_vootp) {
+ struct lcr_msg *message;
+
+ message = message_create(p_serial, p_epointlist->epoint_id, PORT_TO_EPOINT, MESSAGE_VOOTP);
+ message->param.vootp.failed = 1;
+ message_put(message);
+ }
+ }
+}
+#endif