*** empty log message ***

This commit is contained in:
cvs
2000-03-20 07:38:12 +00:00
parent 4dd4d06ba0
commit 72589129c3
12 changed files with 192 additions and 160 deletions

View File

@@ -17,7 +17,6 @@ struct SerChan {
struct AsynSrv__info asyn_info; /* Contains skt, host, port & chan */
struct RS__MsgStruct to_host;
struct RS__RespStruct from_host;
int logIt;
char cmd[SER_BUF_LEN];
};
@@ -29,7 +28,7 @@ void SerA_error(void) {
ErrMsg("asynsrv error"); ErrTxt(a_txt,0);
}
SerChannel *SerOpen(const char *host, int logIt, int msecTmo, void (*idleHdl)(int,int)) {
SerChannel *SerOpen(const char *host, int msecTmo, void (*idleHdl)(int,int)) {
struct SerChan *ser;
char hbuf[64];
char *p, *c;
@@ -49,7 +48,6 @@ SerChannel *SerOpen(const char *host, int logIt, int msecTmo, void (*idleHdl)(in
}
ser->asyn_info.port=port;
ser->asyn_info.chan=chan;
ser->logIt=logIt;
A_CHK(AsynSrv_Open(&ser->asyn_info));
if (msecTmo==0) msecTmo=5000;
A_CHK(AsynSrv_Config(&ser->asyn_info, "msecTmo", msecTmo, "idleHdl", idleHdl, NULL));
@@ -86,14 +84,14 @@ char *SerCmd(SerChannel *serch, char *cmnd) {
if (l>=SER_BUF_LEN-1) ERR_COD(ENOBUFS);
ser=(struct SerChan *)serch;
if (ser->logIt) logfileOutTmp(">%s\n", cmnd);
logfileOut(LOG_SER, ">%s\n", cmnd);
cmnd[l]=ser->asyn_info.eot[1];
cmnd[l+1]='\0';
A_CHK(AsynSrv_SendCmnds(&ser->asyn_info, &ser->to_host, &ser->from_host, cmnd, NULL));
result=AsynSrv_GetReply(&ser->asyn_info, &ser->from_host, NULL);
if (result==NULL) ERR_MSG("empty result");
/* if (idleHandler!=NULL) idleHandler(50,0); */
if (ser->logIt) logfileOutTmp("<%s\n", result);
logfileOut(LOG_SER, "<%s\n", result);
return(result);
OnError: return(NULL);
}