changeset 33:dd8f97945355

fix hash for 64 bit
author Nina Engelhardt
date Tue, 27 Sep 2011 17:48:04 +0200
parents 531eb1f6d024
children a82c0a48cdba
files SSR_Request_Handlers.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/SSR_Request_Handlers.c	Thu Sep 22 12:17:28 2011 +0200
     1.2 +++ b/SSR_Request_Handlers.c	Tue Sep 27 17:48:04 2011 +0200
     1.3 @@ -99,7 +99,7 @@
     1.4           //  list when multiple have the same key.
     1.5  
     1.6        //TODO: use a faster hash function -- see notes in intelligence gather
     1.7 -   key[0] = (int)receivePr;
     1.8 +   key[0] = (int)receivePr->procrID;
     1.9     key[1] = (int)(semReq->msgType);
    1.10   //key[2] acts as the 0 that terminates the string
    1.11  
    1.12 @@ -161,8 +161,8 @@
    1.13     receivePr = semReq->receivePr; //For "send", know both send & recv procrs
    1.14     sendPr    = semReq->sendPr;    
    1.15  
    1.16 -   key[0] = (int)receivePr;
    1.17 -   key[1] = (int)sendPr;
    1.18 +   key[0] = (int)receivePr->procrID;
    1.19 +   key[1] = (int)sendPr->procrID;
    1.20   //key[2] acts at the 0 that terminates the string
    1.21  
    1.22     entry = giveEntryElseInsertReqst( (char *)key, semReq, commHashTbl);
    1.23 @@ -246,7 +246,7 @@
    1.24  
    1.25     receivePr = semReq->receivePr;
    1.26  
    1.27 -   key[0] = (int)receivePr;
    1.28 +   key[0] = (int)receivePr->procrID;
    1.29     key[1] = (int)(semReq->msgType);
    1.30   //key[2] acts as the 0 that terminates the string
    1.31  
    1.32 @@ -295,8 +295,8 @@
    1.33     receivePr = semReq->receivePr;
    1.34     sendPr    = semReq->sendPr;    //for receive from-to, know send procr
    1.35  
    1.36 -   key[0] = (int)receivePr;
    1.37 -   key[1] = (int)sendPr;
    1.38 +   key[0] = (int)receivePr->procrID;
    1.39 +   key[1] = (int)sendPr->procrID;
    1.40   //key[2] acts at the 0 that terminates the string
    1.41  
    1.42     entry = giveEntryElseInsertReqst( (char *)key, semReq, commHashTbl);