rpms/minicom/devel minicom-2.2-capture.patch, NONE, 1.1 minicom.spec, 1.27, 1.28
Lubomir Kundrak (lkundrak)
fedora-extras-commits at redhat.com
Tue Sep 25 09:59:59 UTC 2007
- Previous message (by thread): rpms/NetworkManager/devel nm-applet-0.7.0-no-connection-editor.patch, NONE, 1.1 .cvsignore, 1.47, 1.48 NetworkManager-0.6.5-fixup-internal-applet-build.patch, 1.5, 1.6 NetworkManager.spec, 1.169, 1.170 sources, 1.66, 1.67
- Next message (by thread): rpms/xmoto/F-7 xmoto-GameInit1685.patch, NONE, 1.1 xmoto-GameInit1720.patch, NONE, 1.1 xmoto.spec, 1.20, 1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: lkundrak
Update of /cvs/pkgs/rpms/minicom/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32158
Modified Files:
minicom.spec
Added Files:
minicom-2.2-capture.patch
Log Message:
- Fix capture file handling (#302081)
minicom-2.2-capture.patch:
--- NEW FILE minicom-2.2-capture.patch ---
Patch for #302081
This removes unncessary duplicate variable vt_capfp and fixes handling
of capture file descriptors so that minicom doesn't crash after the
capture file was closed.
Lubomir Kundrak <lkundrak at redhat.com>
diff -Nurp minicom-2.2/src/dial.c minicom-2.2.capture/src/dial.c
--- minicom-2.2/src/dial.c 2005-10-31 13:13:51.000000000 +0100
+++ minicom-2.2.capture/src/dial.c 2007-09-23 10:07:46.000000000 +0200
@@ -1355,7 +1355,7 @@ static void dial_entry(struct dialent *d
mode_status();
}
newtype = d->term;
- vt_set(-1, d->flags & FL_WRAP, NULL, -1, -1, d->flags & FL_ECHO, -1, -1);
+ vt_set(-1, d->flags & FL_WRAP, -1, -1, d->flags & FL_ECHO, -1, -1);
local_echo = d->flags & FL_ECHO;
if (newtype != terminal)
init_emul(newtype, 1);
diff -Nurp minicom-2.2/src/ipc.c minicom-2.2.capture/src/ipc.c
--- minicom-2.2/src/ipc.c 2007-09-23 10:10:00.000000000 +0200
+++ minicom-2.2.capture/src/ipc.c 2007-09-23 10:08:03.000000000 +0200
@@ -87,13 +87,13 @@ int keyboard(int cmd, int arg)
escape = arg;
break;
case KSETBS:
- vt_set(-1, -1, NULL, -1, arg, -1, -1, -1);
+ vt_set(-1, -1, -1, arg, -1, -1, -1);
break;
case KCURST:
- vt_set(-1, -1, NULL, -1, -1, -1, NORMAL, -1);
+ vt_set(-1, -1, -1, -1, -1, NORMAL, -1);
break;
case KCURAPP:
- vt_set(-1, -1, NULL, -1, -1, -1, APPL, -1);
+ vt_set(-1, -1, -1, -1, -1, APPL, -1);
break;
default:
/* The rest is only meaningful if a keyserv runs. */
diff -Nurp minicom-2.2/src/minicom.c minicom-2.2.capture/src/minicom.c
--- minicom-2.2/src/minicom.c 2007-09-23 10:10:00.000000000 +0200
+++ minicom-2.2.capture/src/minicom.c 2007-09-23 10:08:39.000000000 +0200
@@ -873,14 +873,14 @@ static void helpthem(void)
void toggle_addlf(void)
{
addlf = !addlf;
- vt_set(addlf, -1, NULL, -1, -1, -1, -1, -1);
+ vt_set(addlf, -1, -1, -1, -1, -1, -1);
}
/* Toggle local echo. Can be called through the menu, or by a macro. */
void toggle_local_echo(void)
{
local_echo = !local_echo;
- vt_set(-1, -1, NULL, -1, -1, local_echo, -1 ,-1);
+ vt_set(-1, -1, -1, -1, local_echo, -1 ,-1);
}
int main(int argc, char **argv)
@@ -1137,7 +1137,7 @@ int main(int argc, char **argv)
exit(1);
}
docap = 1;
- vt_set(addlf, -1, capfp, docap, -1, -1, -1, -1);
+ vt_set(addlf, -1, docap, -1, -1, -1, -1);
seteuid(eff_uid);
setegid(eff_gid);
break;
@@ -1170,7 +1170,7 @@ int main(int argc, char **argv)
if (screen_iso && screen_ibmpc)
/* init VT */
- vt_set(-1, -1, (FILE*)NULL, -1, -1, -1, -1, 1);
+ vt_set(-1, -1, -1, -1, -1, -1, 1);
@@ -1464,7 +1464,7 @@ dirty_goto:
if (c == 1)
docap = 0;
}
- vt_set(addlf, -1, capfp, docap, -1, -1, -1, -1);
+ vt_set(addlf, -1, docap, -1, -1, -1, -1);
break;
case 'p': /* Set parameters */
get_bbp(P_BAUDRATE, P_BITS, P_PARITY, P_STOPB, 0);
@@ -1489,7 +1489,7 @@ dirty_goto:
break;
case 'w': /* Line wrap on-off */
c = (!us->wrap);
- vt_set(addlf, c, capfp, docap, -1, -1, -1, -1);
+ vt_set(addlf, c, docap, -1, -1, -1, -1);
s = c ? _("Linewrap ON") : _("Linewrap OFF");
werror("%s", s);
break;
diff -Nurp minicom-2.2/src/vt100.c minicom-2.2.capture/src/vt100.c
--- minicom-2.2/src/vt100.c 2007-09-23 10:10:00.000000000 +0200
+++ minicom-2.2.capture/src/vt100.c 2007-09-23 10:08:51.000000000 +0200
@@ -175,7 +175,6 @@ static int vt_crlf = 0; /* Return sends
static int vt_om; /* Origin mode. */
WIN *vt_win = NULL; /* Output window. */
static int vt_docap; /* Capture on/off. */
-static FILE *vt_capfp; /* Capture file. */
static void (*vt_keyb)(int, int);/* Gets called for NORMAL/APPL switch. */
static void (*termout)(const char *, int);/* Gets called to output a string. */
@@ -273,15 +272,13 @@ void vt_init(int type, int fg, int bg, i
}
/* Change some things on the fly. */
-void vt_set(int addlf, int wrap, FILE *capfp, int docap, int bscode,
+void vt_set(int addlf, int wrap, int docap, int bscode,
int echo, int cursor, int asis)
{
if (addlf >= 0)
vt_addlf = addlf;
if (wrap >= 0)
vt_win->wrap = vt_wrap = wrap;
- if (capfp != NULL)
- vt_capfp = capfp;
if (docap >= 0)
vt_docap = docap;
if (bscode >= 0)
@@ -961,7 +958,7 @@ void vt_out(int ch)
c = (unsigned char)ch;
if (vt_docap == 2) /* Literal. */
- fputc(c, vt_capfp);
+ fputc(c, capfp);
/* Process <31 chars first, even in an escape sequence. */
switch (c) {
@@ -977,7 +974,7 @@ void vt_out(int ch)
if (vt_addlf) {
wputc(vt_win, '\n');
if (vt_docap == 1)
- fputc('\n', vt_capfp);
+ fputc('\n', capfp);
}
break;
case '\t': /* Non - destructive TAB */
@@ -989,7 +986,7 @@ void vt_out(int ch)
f = vt_win->xs - 1;
wlocate(vt_win, f, vt_win->cury);
if (vt_docap == 1)
- fputc(c, vt_capfp);
+ fputc(c, capfp);
break;
case 013: /* Old Minix: CTRL-K = up */
wlocate(vt_win, vt_win->curx, vt_win->cury - 1);
@@ -1025,7 +1022,7 @@ void vt_out(int ch)
case 7: /* Bell */
wputc(vt_win, c);
if (vt_docap == 1)
- fputc(c, vt_capfp);
+ fputc(c, capfp);
break;
default:
go_on = 1;
@@ -1038,7 +1035,7 @@ void vt_out(int ch)
switch (esc_s) {
case 0: /* Normal character */
if (vt_docap == 1)
- fputc(P_CONVCAP[0] == 'Y' ? vt_inmap[c] : c, vt_capfp);
+ fputc(P_CONVCAP[0] == 'Y' ? vt_inmap[c] : c, capfp);
c = vt_inmap[c]; /* conversion 04.09.97 / jl */
#if TRANSLATE
if (vt_type == VT100 && vt_trans[vt_charset] && vt_asis == 0)
@@ -1080,8 +1077,8 @@ void vt_out(int ch)
/* Flush output to capture file so that all output is visible there
* immediately. Causes a write syscall for every call though. */
- if (vt_capfp)
- fflush(vt_capfp);
+ if (capfp)
+ fflush(capfp);
}
/* Translate keycode to escape sequence. */
diff -Nurp minicom-2.2/src/vt100.h minicom-2.2.capture/src/vt100.h
--- minicom-2.2/src/vt100.h 2005-08-04 22:33:34.000000000 +0200
+++ minicom-2.2.capture/src/vt100.h 2007-09-23 10:07:37.000000000 +0200
@@ -29,7 +29,7 @@ extern int vt_nl_delay; /* Delay after
void vt_install(void(*)(const char *, int), void (*)(int, int), WIN *);
void vt_init(int, int, int, int, int);
void vt_pinit(WIN *, int, int);
-void vt_set(int, int, FILE *, int, int, int, int, int);
+void vt_set(int, int, int, int, int, int, int);
void vt_out(int);
void vt_send(int ch);
Index: minicom.spec
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/minicom.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- minicom.spec 22 Aug 2007 09:32:46 -0000 1.27
+++ minicom.spec 25 Sep 2007 09:59:27 -0000 1.28
@@ -1,7 +1,7 @@
Summary: A text-based modem control and terminal emulation program
Name: minicom
Version: 2.2
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://alioth.debian.org/projects/minicom/
License: GPLv2+
Group: Applications/Communications
@@ -24,6 +24,7 @@
Patch10: minicom-2.2-staticbuf.patch
Patch11: minicom-2.2-sigs.patch
Patch12: minicom-2.2-ttyerror.patch
+Patch13: minicom-2.2-capture.patch
%description
Minicom is a simple text-based modem control and terminal emulation
@@ -45,6 +46,7 @@
%patch10 -p1 -b .staticbuf
%patch11 -p1 -b .sigs
%patch12 -p1 -b .ttyerror
+%patch13 -p1 -b .capture
%build
%configure
@@ -73,6 +75,9 @@
%{_mandir}/man1/*
%changelog
+* Sun Sep 23 2007 Lubomir Kundrak <lkundrak at redhat.com> 2.2-5
+- Fix capture file handling (#302081)
+
* Wed Aug 22 2007 Miroslav Lichvar <mlichvar at redhat.com> 2.2-4
- update license tag
- Previous message (by thread): rpms/NetworkManager/devel nm-applet-0.7.0-no-connection-editor.patch, NONE, 1.1 .cvsignore, 1.47, 1.48 NetworkManager-0.6.5-fixup-internal-applet-build.patch, 1.5, 1.6 NetworkManager.spec, 1.169, 1.170 sources, 1.66, 1.67
- Next message (by thread): rpms/xmoto/F-7 xmoto-GameInit1685.patch, NONE, 1.1 xmoto-GameInit1720.patch, NONE, 1.1 xmoto.spec, 1.20, 1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list