*** empty log message ***

This commit is contained in:
cvs
2000-03-31 10:58:35 +00:00
parent aa0b146d81
commit 2555c83d4a
2 changed files with 27 additions and 18 deletions

View File

@@ -96,7 +96,9 @@ char *LscCmd(SerChannel *ser, const char *cmds) {
ERR_I(str_put_str(&sbuf, ";"));
if (qu!=NULL) { /* command is a query */
response=1;
if (retreq==NULL) ERR_MSG("missing return format");
if (retreq==NULL) {
/* ERR_MSG("missing return format"); */
}
list[nres]=NULL; nres++;
} else {
if (retreq!=NULL) ERR_MSG("no return request allowed after command without query ");
@@ -148,18 +150,23 @@ char *LscCmd(SerChannel *ser, const char *cmds) {
}
}
if (retreq!=NULL) { /* query */
str_link_buf(&sbuf, result, 0, ',');
str_split(par, retreq+1, ';');
p=par;
while (p!=NULL) {
p=str_split(varname, p, ',');
if (varname[0]!='\0') {
ERR_I(CocGetVar(serverVarList, &sbuf, varname, 0));
} else {
ERR_P(str_get_str(&sbuf, NULL));
if (retreq[1]=='>') { /* >> get whole response */
str_link_buf(&sbuf, result, 0, ';');
str_split(varname, retreq+2, ';');
ERR_I(CocGetVar(serverVarList, &sbuf, varname, 0));
} else {
str_link_buf(&sbuf, result, 0, ',');
str_split(par, retreq+1, ';');
p=par;
while (p!=NULL) {
p=str_split(varname, p, ',');
if (varname[0]!='\0') {
ERR_I(CocGetVar(serverVarList, &sbuf, varname, 0));
} else {
ERR_P(str_get_str(&sbuf, NULL));
}
}
}
i++;
}
}
return(res);

View File

@@ -146,7 +146,7 @@ int instCurve(char *nam, char *channel) {
if (num>20) ERR_MSG("illegal standard curve number");
retstat=-1; /* an error could be fixed */
ERR_P(LscCmd(ser, "CRVHDR?[num]>head"));
ERR_P(LscCmd(ser, "CRVHDR?[num]>>head"));
} else {
@@ -189,7 +189,7 @@ int instCurve(char *nam, char *channel) {
if (num<21 || num>60) ERR_MSG("illegal curve number");
retstat=-1; /* an error could be fixed */
ERR_P(LscCmd(ser, "CRVHDR?[num]>head"));
ERR_P(LscCmd(ser, "CRVHDR?[num]>>head"));
e=strchr(entry, '\n');
if (e!=NULL) { *e='\0'; e++; }
@@ -198,7 +198,7 @@ int instCurve(char *nam, char *channel) {
fld=chan[0]-'A'+1;
if (fld>maxfld) maxfld=fld;
if (LscEqPar(head, chead)) { /* header matches: select sensor type and curve */
if (head[0]!='\0' && LscEqPar(head, chead)) { /* header matches: select sensor type and curve */
retstat=-1; /* an error could be fixed */
ERR_P(LscCmd(ser, "INTYPE [chan]:[intype];INCRV [chan]:[num];DISPFLD [fld],[chan],1;DISPLAY:[maxfld]"));
@@ -359,7 +359,7 @@ int loadCache() {
bufi[2]=buf3;
bufi[3]=buf4;
for (i=60; i>21; i-=4) {
sprintf(buf, "CRVHDR?%d>buf1;CRVHDR?%d>buf2;CRVHDR?%d>buf3;CRVHDR?%d>buf4", i, i-1, i-2, i-3);
sprintf(buf, "CRVHDR?%d>>buf1;CRVHDR?%d>>buf2;CRVHDR?%d>>buf3;CRVHDR?%d>>buf4", i, i-1, i-2, i-3);
ERR_P(LscCmd(ser, buf));
k=0;
for (j=i; j>i-4; j--) {
@@ -752,8 +752,8 @@ int main(int argc, char *argv[])
samp.codChanged=1;
logMask=LOG_MAIN+LOG_WARN;
binDir="";
logDir="";
binDir="bin/";
logDir="log/";
serverId="tecs";
host="lnsp26";
port=0;
@@ -799,7 +799,7 @@ int main(int argc, char *argv[])
}
}
if (port==0) port=9753;
if (msecTmo==0) msecTmo=500;
if (msecTmo==0) msecTmo=1000;
str_copy(buf, logDir);
str_append(buf, serverId);
@@ -833,6 +833,8 @@ int main(int argc, char *argv[])
CocDefStr(buf1, CocRD);
CocDefStr(buf2, CocRD);
CocDefStr(buf3, CocRD);
CocDefStr(buf4, CocRD);
CocDefStr(head, CocRD);
CocDefStr(chan, CocRD);
CocDefStr(intype, CocRD);