*** empty log message ***
This commit is contained in:
@@ -82,10 +82,7 @@ SerChannel *SerOpen(const char *hostPort, int msecTmo, int (*idleHdl)(int,int))
|
||||
if (iret==1) {
|
||||
iret=AsynSrv_Config(&aser->asyn_info, "msecTmo", msecTmo, "idleHdl", idleHdl, NULL);
|
||||
}
|
||||
if (iret!=1) {
|
||||
SerA_error();
|
||||
goto OnError;
|
||||
}
|
||||
if (iret!=1) { SerA_error(); goto OnError; }
|
||||
time(&t2);
|
||||
ecnt=0;
|
||||
logfileOut(LOG_MAIN, "connection to %s:%d/%d opened (%d sec)\n",
|
||||
@@ -102,10 +99,6 @@ SerChannel *SerOpen(const char *hostPort, int msecTmo, int (*idleHdl)(int,int))
|
||||
}
|
||||
ERR_I(CocCreateSockAdr(&sadr, host, atoi(p)));
|
||||
ERR_SI(tser->fd=socket(AF_INET, SOCK_STREAM, 0));
|
||||
/* do we need this really as a client ?
|
||||
i = 1;
|
||||
ERR_SI(setsockopt(conn->fd,SOL_SOCKET,SO_REUSEADDR,&i,sizeof(int)));
|
||||
*/ /* allow quick port reuse */
|
||||
ERR_SI(connect(tser->fd, (struct sockaddr *)&sadr, sizeof(sadr)));
|
||||
time(&t2);
|
||||
ecnt=0;
|
||||
@@ -121,6 +114,23 @@ SerChannel *SerOpen(const char *hostPort, int msecTmo, int (*idleHdl)(int,int))
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
int SerSetTmo(SerChannel *serch, int msecTmo) {
|
||||
AsynSrvChan *aser;
|
||||
TermSrvChan *tser;
|
||||
int iret;
|
||||
|
||||
if (serch->type==ASYNSRV_TYPE) {
|
||||
aser=(AsynSrvChan *)serch;
|
||||
iret=AsynSrv_Config(&aser->asyn_info, "msecTmo", msecTmo, NULL);
|
||||
if (iret!=1) { SerA_error(); goto OnError; }
|
||||
} else if (serch->type==TERMSRV_TYPE) {
|
||||
tser=(TermSrvChan *)serch;
|
||||
tser->tmo=msecTmo;
|
||||
}
|
||||
return 0;
|
||||
OnError: return -1;
|
||||
}
|
||||
|
||||
void SerClose(SerChannel *serch) {
|
||||
AsynSrvChan *aser;
|
||||
TermSrvChan *tser;
|
||||
|
||||
Reference in New Issue
Block a user