phase=0;
proceed=true;
while (proceed==true) {
- //(void) rou_alert(0,"JMPDBG %s, phase='%d'",OPEP,phase);
+ //(void) rou_alert(0,"%s JMPDBG, phase='%d'",OPEP,phase);
switch (phase) {
case 0 : //do we have a "..." sequence at the end
if (tocheck>0) {
case 1 : //waiting for a line with CRLF
received=(char *)0;
got=tcp_getline(socptr,WAITLINE,&received);
- (void) rou_alert(0,"%s, JMPDNG got='%d'",OPEP,got);
switch (got) {
case 0 : //Reading timeout
(void) rou_alert(0,"Unable to receive line in due time");
phase++;
}
return status;
+#undef OPEP
}
/*
\f
static _Bool scanline(SOCPTR *socptr,int numline,char *line)
{
+#define OPEP "feeder.c:scanline"
_Bool status;
int phase;
_Bool proceed;
status=true;
phase=0;
proceed=true;
-(void) rou_alert(0,"JMPDBG phase='%d' line=<%s>",phase,line);
+(void) rou_alert(5,"%s line=<%s>",OPEP,line);
while (proceed==true) {
switch (phase) {
case 0 : //removing first space
phase++;
}
return status;
+#undef OPEP
}
/*
\f
phase=0;
proceed=true;
while (proceed==true) {
- (void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
+ //(void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
switch (phase) {
case 0 : //Do we have parameters
if ((ip==(const char *)0)||(port==(const char *)0)) {
status=poll(polling,1,millisec);
(void) sigprocmask(SIG_SETMASK,&origmask,(sigset_t *)0);
switch (status) {
- case -1 :
- (void) rou_alert(0,"%s Polling error (error=<%s>)",OPEP,strerror(errno));
+ case -1 : //polling error
+ //(void) rou_alert(0,"%s JMPDBG Poll error=<%s>",OPEP,strerror(errno));
break;
- case 0 :
- (void) rou_alert(0,"%s Polling timeout millisec='%d'",OPEP,millisec);
+ case 0 : //polling timeout
+ //(void) rou_alert(0,"%s JMPDBG Polling timeout",OPEP);
break;
- case 1 :
- (void) rou_alert(0,"%s Polling return millisec='%d' revent='%08x",
- OPEP,millisec,polling[0].revents);
+ case 1 : //polling early return (data or event)
+ //(void) rou_alert(0,"%s JMPDBG Polling return",OPEP);
status=-2; //wlets say it is disconnected
- if (isconnected(soc)==true) {
+ if (isconnected(soc)==true)
status=soc_receive(socptr);
- (void) rou_alert(0,"%s JMPDBG soc_recieve status='%d'",OPEP,status);
- }
break;
default :
break;
phase=0;
proceed=true;
while (proceed==true) {
- (void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
+ //(void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
switch (phase) {
case 0 : //is socket available
if (soc==(SOCTYP *)0) {
got=recv(soc->handle,buffer,limit,MSG_DONTWAIT);
break;
}
- (void) rou_alert(0,"%s, JMPDBG got=%d char buffer=<%s> errno='%d'",
- OPEP,got,buffer,errno);
break;
case 3 : //check about recieved data
switch (got) {