correct mistakes made in last set of changes

This commit is contained in:
Marty Kraimer
2000-01-17 15:55:01 +00:00
parent 50d808ed39
commit f02e97e186
4 changed files with 10 additions and 16 deletions

View File

@@ -1005,14 +1005,14 @@ LOCAL void access_rights_reply(struct channel_in_use *pciu)
}
SEND_LOCK(pclient);
reply = (caHdr *)ALLOC_MSG(pclient, 0);
reply = (caHdr *)ALLOC_MSG(pclient, 0);
assert(reply);
*reply = nill_msg;
reply->m_cmmd = CA_PROTO_ACCESS_RIGHTS;
reply->m_cmmd = CA_PROTO_ACCESS_RIGHTS;
reply->m_cid = pciu->cid;
reply->m_available = ar;
END_MSG(pclient);
END_MSG(pclient);
SEND_UNLOCK(pclient);
}
@@ -1440,7 +1440,7 @@ struct client *client
* serialize concurrent put notifies
*/
while(pciu->pPutNotify->busy){
status = semBinaryTakeTimeout(client->blockSem,1.0);
status = semBinaryTakeTimeout(client->blockSem,60.0);
if(status != semTakeOK && pciu->pPutNotify->busy){
log_header("put call back time out", client, mp,0);
dbNotifyCancel(&pciu->pPutNotify->dbPutNotify);

View File

@@ -397,7 +397,7 @@ LOCAL void log_one_client(struct client *client, unsigned level)
TS_STAMP current;
char clientHostName[256];
ipAddrToA (&client->addr, clientHostName, sizeof(clientHostName));
ipAddrToA (&client->addr, clientHostName, sizeof(clientHostName));
if(client->proto == IPPROTO_UDP){
pproto = "UDP";
@@ -414,8 +414,7 @@ LOCAL void log_one_client(struct client *client, unsigned level)
send_delay = tsStampDiffInSeconds(&current,&client->time_at_last_send);
recv_delay = tsStampDiffInSeconds(&current,&client->time_at_last_recv);
printf(
"%s(%s): User=\"%s\", V%d.%u, Channel Count=%d\n",
printf( "%s(%s): User=\"%s\", V%d.%u, Channel Count=%d\n",
clientHostName,
client->pHostName,
client->pUserName,
@@ -434,7 +433,8 @@ LOCAL void log_one_client(struct client *client, unsigned level)
"\tUnprocessed request bytes=%lu, Undelivered response bytes=%lu, State=%s\n",
client->send.stk,
client->recv.cnt - client->recv.stk,
state[client->disconnect?1:0]);
state[client->disconnect?1:0]);
}
if (level>=2u) {

View File

@@ -305,8 +305,7 @@ LOCAL void clean_addrq()
while( (pciu = pnextciu) ) {
pnextciu = (struct channel_in_use *)pciu->node.next;
delay = tsStampDiffInSeconds(&pciu->time_at_creation,
&current);
delay = tsStampDiffInSeconds(&current,&pciu->time_at_creation);
if (delay > timeout) {
ellDelete(&prsrv_cast_client->addrq, &pciu->node);

View File

@@ -54,10 +54,6 @@ static char *sccsId = "@(#) $Id$";
#include "envDefs.h"
#include "server.h"
LOCAL powerOfTwo[10] = {
2.0,4.0,8.0,16.0,32.0,64.0,128.0,256.0,512.0,1024.0
};
/*
* RSRV_ONLINE_NOTIFY_TASK
*/
@@ -76,7 +72,6 @@ int rsrv_online_notify_task()
SOCKET sock;
int true = TRUE;
unsigned short port;
int indPowerofTwo = 0;
taskwdInsert(threadGetIdSelf(),NULL,NULL);
@@ -181,7 +176,7 @@ int rsrv_online_notify_task()
pNode = (caAddrNode *)pNode->node.next;
}
threadSleep(delay);
delay = delay + powerOfTwo[indPowerofTwo++];
delay *= 2.0;
if(delay>=maxdelay) delay = maxdelay;
}
}