Added debug code
This commit is contained in:
parent
2f13bc8f5c
commit
ce0c2f2041
@ -36,7 +36,7 @@ static int sock = -1; /* Unix Datagram socket */
|
||||
struct sockaddr_un clntaddr; /* Client socket address */
|
||||
struct sockaddr_un servaddr; /* Server socket address */
|
||||
struct sockaddr_un from; /* From socket address */
|
||||
int fromlen;
|
||||
socklen_t fromlen;
|
||||
static char *myname='\0'; /* my program name */
|
||||
char spath[108]; /* Server socket path */
|
||||
char cpath[108]; /* Client socket path */
|
||||
@ -175,7 +175,7 @@ int socket_send(char *buf)
|
||||
char *socket_receive(void)
|
||||
{
|
||||
static char buf[SS_BUFSIZE];
|
||||
int rlen;
|
||||
ssize_t rlen;
|
||||
|
||||
memset((char *)&buf, 0, SS_BUFSIZE);
|
||||
fromlen = sizeof(from);
|
||||
|
12
lib/jammsg.c
12
lib/jammsg.c
@ -10,7 +10,7 @@
|
||||
* MBSE BBS and utilities.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2005
|
||||
* Copyright (C) 1997-2007
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@ -48,7 +48,7 @@ int fdHdr = -1;
|
||||
int fdJdt = -1;
|
||||
int fdJdx = -1;
|
||||
int fdJlr = -1;
|
||||
char *pSubfield;
|
||||
unsigned char *pSubfield;
|
||||
char BaseName[PATH_MAX];
|
||||
char *pLine, *pBuff;
|
||||
char szBuff[MAX_LINE_LENGTH + 1];
|
||||
@ -659,10 +659,14 @@ void JAM_Pack(void)
|
||||
/*
|
||||
* Adjust the matching numbers
|
||||
*/
|
||||
if (LR.LastReadMsg == jamHdr.MsgNum)
|
||||
if (LR.LastReadMsg == jamHdr.MsgNum) {
|
||||
Syslog('m', "JAM_Pack %s recno %d LastRead %u -> %u", BaseName, i, jamHdr.MsgNum, NewNumber);
|
||||
LR.LastReadMsg = NewNumber;
|
||||
if (LR.HighReadMsg == jamHdr.MsgNum)
|
||||
}
|
||||
if (LR.HighReadMsg == jamHdr.MsgNum) {
|
||||
Syslog('m', "JAM_Pack %s recno %d HighRead %u -> %u", BaseName, i, jamHdr.MsgNum, NewNumber);
|
||||
LR.HighReadMsg = NewNumber;
|
||||
}
|
||||
lseek(fdJlr, - sizeof(lastread), SEEK_CUR);
|
||||
write(fdJlr, &LR, sizeof(lastread));
|
||||
}
|
||||
|
Reference in New Issue
Block a user