Commits

Joseph Bane committed f0db807 Merge

Merged.

Comments (0)

Files changed (1)

 
   if (timeSince > delta) {
     // This represents rejection of the original request.
-    cout << "REJECT: Request " << r.getID() << " (" << timeSince << ", " << delta << ")\n";
+    // cout << "REJECT: Request " << r.getID() << " (" << timeSince << ", " << delta << ")\n";
   }
   else {
     // Create new message objects to ask for votes
   if (!up) { return; }  // Do nothing if Process down
 
   // automatically accept on a vote request
-  if (int(m.getVote()) == int(Message::vote::null)) {
+  if (m.getVote() == Message::vote::null) {
     // Create a new message object to accept
     simulation->sendMessage( Message(m.getTo(), m.getFrom(), m.getRequestTime(), m.getRequestID(), Message::vote::accept) );
   }
 
   // read vote received from other Process
   else {
+    cout << "This line never executes\n";
     const int timeSince = simulation->getTime() - m.getRequestTime();
     
     //if ( (int(m.getVote()) == int(Message::vote::accept))
     // && (timeSince < delta*2) ) {
-    if (int(m.getVote()) == int(Message::vote::accept)) {
+    if (true) {
       
       // Accept Request
       cout << "PID: " << id << "  ACCEPT: Request " << m.getRequestID() << " (" << timeSince << ", " << delta*2 << ")\n";