diff --git a/minicom-2.5-rh.patch b/minicom-2.5-rh.patch index 474b842..fcfe035 100644 --- a/minicom-2.5-rh.patch +++ b/minicom-2.5-rh.patch @@ -26,7 +26,7 @@ index bc4db89..8e68e2c 100644 /* First see if the lock file directory is present. */ if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) { -@@ -215,6 +221,44 @@ int open_term(int doinit, int show_win_on_error, int no_msgs) +@@ -215,6 +221,47 @@ int open_term(int doinit, int show_win_on_error, int no_msgs) if (doinit > 0) lockfile_create(); @@ -40,21 +40,24 @@ index bc4db89..8e68e2c 100644 + rc = 0; + } else { + rc = 1; -+ fprintf(stderr, _("File %s is not a socket.\n"), ++ if (!no_msgs) ++ fprintf(stderr, _("File %s is not a socket.\n"), + dial_tty+strlen(SOCKET_PREFIX)); + } + } else { +#endif + rc = ttylock(dial_tty); -+ if (rc < 0) { -+ if (access(dial_tty, W_OK) == -1) -+ fprintf(stderr, _("Device %s access failed: %s.\n"), -+ dial_tty, strerror(errno)); -+ else -+ fprintf(stderr, _("Device %s lock failed: %s.\n"), -+ dial_tty, strerror(-rc)); -+ } else if (rc > 0) { -+ fprintf(stderr, _("Device %s is locked.\n"), dial_tty); ++ if(!no_msgs) { ++ if (rc < 0) { ++ if (access(dial_tty, W_OK) == -1) ++ fprintf(stderr, _("Device %s access failed: %s.\n"), ++ dial_tty, strerror(errno)); ++ else ++ fprintf(stderr, _("Device %s lock failed: %s.\n"), ++ dial_tty, strerror(-rc)); ++ } else if (rc > 0) { ++ fprintf(stderr, _("Device %s is locked.\n"), dial_tty); ++ } + } +#ifdef USE_SOCKET + } @@ -62,7 +65,7 @@ index bc4db89..8e68e2c 100644 + if (rc == 0) { + snprintf(lockfile, sizeof(lockfile), "%s", dial_tty); + } else { -+ if (stdwin) mc_wclose(stdwin, 1); ++ if (!no_msgs && stdwin) mc_wclose(stdwin, 1); + return(-1); + } + } diff --git a/minicom.spec b/minicom.spec index 7c11b6a..d1c6847 100644 --- a/minicom.spec +++ b/minicom.spec @@ -1,7 +1,7 @@ Summary: A text-based modem control and terminal emulation program Name: minicom Version: 2.5 -Release: 3%{?dist} +Release: 4%{?dist} URL: http://alioth.debian.org/projects/minicom/ License: GPLv2+ Group: Applications/Communications @@ -58,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/* %changelog +* Thu Feb 24 2011 Jan Görig 2.5-4 +- fixed crashing on device reconnecting (#678812) + * Wed Feb 09 2011 Jan Görig 2.5-3 - fixed crashing on non-readable directory (#675400) - fixed typos in minicom and runscript manpages (#675453,#675456)