corrected some print statements and variable names

This commit is contained in:
Gerhard Rieger 2008-01-29 22:11:28 +01:00
parent 15e4073572
commit 79b6e800c6
5 changed files with 13 additions and 9 deletions

View file

@ -5,6 +5,8 @@ new features:
docu source doc/socat.yo released docu source doc/socat.yo released
corrections: corrections:
corrected some print statements and variable names
make uninstall did not uninstall procan make uninstall did not uninstall procan
fixed lots of weaknesses in test.sh fixed lots of weaknesses in test.sh

View file

@ -1 +1 @@
"1.6.0.0" "1.6.0.0+"

View file

@ -1,5 +1,5 @@
/* source: dalan.c */ /* source: dalan.c */
/* Copyright Gerhard Rieger 2001-2004 */ /* Copyright Gerhard Rieger 2001-2008 */
/* Published under the GNU General Public License V.2, see file COPYING */ /* Published under the GNU General Public License V.2, see file COPYING */
/* idea of a low level data description language. currently only a most /* idea of a low level data description language. currently only a most
@ -79,7 +79,7 @@ int dalan(const char *line, char *data, size_t *p, size_t n) {
size_t p1 = *p; size_t p1 = *p;
char c; char c;
fputs(line, stderr); fputc('\n', stderr); /*fputs(line, stderr); fputc('\n', stderr);*/
while (c = *line++) { while (c = *line++) {
switch (c) { switch (c) {
case ' ': case ' ':

View file

@ -1,5 +1,5 @@
/* source: xio-rawip.c */ /* source: xio-rawip.c */
/* Copyright Gerhard Rieger 2001-2007 */ /* Copyright Gerhard Rieger 2001-2008 */
/* Published under the GNU General Public License V.2, see file COPYING */ /* Published under the GNU General Public License V.2, see file COPYING */
/* this file contains the source for opening addresses of raw IP type */ /* this file contains the source for opening addresses of raw IP type */
@ -29,7 +29,7 @@ int xioopen_rawip_datagram(int argc, const char *argv[], struct opt *opts,
static static
int xioopen_rawip_recvfrom(int argc, const char *argv[], struct opt *opts, int xioopen_rawip_recvfrom(int argc, const char *argv[], struct opt *opts,
int xioflags, xiofile_t *xfd, unsigned groups, int xioflags, xiofile_t *xfd, unsigned groups,
int pf, int dummy2, int dummy3); int pf, int socktype, int dummy3);
static static
int xioopen_rawip_recv(int argc, const char *argv[], struct opt *opts, int xioopen_rawip_recv(int argc, const char *argv[], struct opt *opts,
int xioflags, xiofile_t *xfd, unsigned groups, int xioflags, xiofile_t *xfd, unsigned groups,
@ -250,11 +250,12 @@ int xioopen_rawip_recvfrom(int argc, const char *argv[], struct opt *opts,
static static
int xioopen_rawip_recv(int argc, const char *argv[], struct opt *opts, int xioopen_rawip_recv(int argc, const char *argv[], struct opt *opts,
int xioflags, xiofile_t *xfd, unsigned groups, int xioflags, xiofile_t *xfd, unsigned groups,
int pf, int socktype, int ipproto) { int pf, int socktype, int dummy3) {
const char *protname = argv[1]; const char *protname = argv[1];
char *garbage; char *garbage;
union sockaddr_union us; union sockaddr_union us;
socklen_t uslen = sizeof(us); socklen_t uslen = sizeof(us);
int ipproto;
int result; int result;
if (argc != 2) { if (argc != 2) {
@ -264,11 +265,11 @@ int xioopen_rawip_recv(int argc, const char *argv[], struct opt *opts,
} }
if ((ipproto = strtoul(protname, &garbage, 0)) >= 256) { if ((ipproto = strtoul(protname, &garbage, 0)) >= 256) {
Error2("xioopen_rawip_recvfrom(\"%s\",,): protocol number exceeds 255 (%u)", Error2("xioopen_rawip_recv(\"%s\",,): protocol number exceeds 255 (%u)",
protname, ipproto); protname, ipproto);
return STAT_NORETRY; return STAT_NORETRY;
} else if (*garbage) { } else if (*garbage) {
Warn1("xioopen_rawip_recvfrom(\"%s\",,): trailing garbage in protocol specification", Warn1("xioopen_rawip_recv(\"%s\",,): trailing garbage in protocol specification",
protname); protname);
/*return STAT_NORETRY;*/ /*return STAT_NORETRY;*/
} }

View file

@ -1,5 +1,5 @@
/* source: xio-system.c */ /* source: xio-system.c */
/* Copyright Gerhard Rieger 2001-2006 */ /* Copyright Gerhard Rieger 2001-2008 */
/* Published under the GNU General Public License V.2, see file COPYING */ /* Published under the GNU General Public License V.2, see file COPYING */
/* this file contains the source for opening addresses of system type */ /* this file contains the source for opening addresses of system type */
@ -54,6 +54,7 @@ static int xioopen_system(int argc, const char *argv[], struct opt *opts,
result = System(string); result = System(string);
if (result != 0) { if (result != 0) {
Warn2("system(\"%s\") returned with status %d", string, result); Warn2("system(\"%s\") returned with status %d", string, result);
Warn1("system(): %s", strerror(errno));
} }
Exit(0); /* this child process */ Exit(0); /* this child process */
} }