Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-17837

Coverity: Calling "timedout" without checking return value

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4.0
    • Component/s: Core Libraries
    • Labels:
      None

      Description

      common/remote/sockfile.cpp: 1005

      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/common/remote/sockfile.cpp: 1005 in CRemoteBase::connectSocket(SocketEndpoint &, unsigned int, unsigned int)()
      999                     //PrintStackReport();
      1000                 }
      1001                 bool ok = true;
      1002                 try {
      1003                     if (tm.timemon) {
      1004                         unsigned remaining;
      >>>     CID 1446128:    (CHECKED_RETURN)
      >>>     Calling "timedout" without checking return value (as is done elsewhere 55 out of 64 times).
      1005                         tm.timemon->timedout(&remaining);
      1006                         socket.setown(ISocket::connect_timeout(ep,remaining));
      1007                     }
      1008                     else
      1009                         socket.setown(ISocket::connect(ep));
      1010                     if (ep.port == securitySettings.daFileSrvSSLPort)
      /mnt/disk1/home/vamosax/build/CE/platform/HPCC-Platform/common/remote/sockfile.cpp: 1063 in CRemoteBase::connectSocket(SocketEndpoint &, unsigned int, unsigned int)()
      1057                     else
      1058                         break;
      1059                 }
      1060                 unsigned sleeptime = getRandom()%3000+1000;
      1061                 if (tm.timemon) {
      1062                     unsigned remaining;
      >>>     CID 1446128:    (CHECKED_RETURN)
      >>>     Calling "timedout" without checking return value (as is done elsewhere 55 out of 64 times).
      1063                     tm.timemon->timedout(&remaining);
      1064                     if (remaining/2<sleeptime)
      1065                         sleeptime = remaining/2;
      1066                 }
      1067                 Sleep(sleeptime);       // prevent multiple retries beating
      1068                 if (ep.port == securitySettings.daFileSrvSSLPort)
      

        Attachments

          Activity

            People

            • Assignee:
              mckellyln Mark Kelly
              Reporter:
              ghalliday Gavin Halliday
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: