char *fmode = NULL;
char *bmode = NULL;
char *afname = NULL;
- char *address = NULL;
char *space;
bool choice;
/* If no Port option was specified, set myport to the port used by the first listening socket. */
- if(!port_specified) {
+ if(!port_specified || atoi(myport) == 0) {
sockaddr_t sa;
socklen_t salen = sizeof sa;
if(!getsockname(listen_socket[0].udp.fd, &sa.sa, &salen)) {
if (device_fd >= 0)
io_del(&device_io);
- devops.close();
+ if (devops.close)
+ devops.close();
exit_control();