alpine 3.7
obsolete weakness #13

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

sipp/src/sipp-3.3/sipp.cpp

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.7 obsolete weakness.

          NULL,
         (void *(*)(void *)) rtp_echo_thread,
         (void*)&media_socket_video) 
        == -1) {
      ERROR_NO("Unable to create second RTP echo thread");
      }
    }

  traffic_thread();

  if (scenario_file != NULL) {
    delete [] scenario_file ;
    scenario_file = NULL ;
  }

}

#endif

void sipp_usleep(unsigned long usec) {
	if (usec >= 1000000) {
		sleep(usec / 1000000);
	}
	usec %= 1000000;
	usleep(usec);
}

bool reconnect_allowed() {
  if (reset_number == -1) {
    return true;
  }
  return (reset_number > 0);
}

void reset_connection(struct sipp_socket *socket) {
  if (!reconnect_allowed()) {
      ERROR_NO("Max number of reconnections reached");
    }

  if (reset_number != -1) {
	reset_number--;
  }

  if (reset_close) {
    WARNING("Closing calls, because of TCP reset or close!");
    close_calls(socket);
  }

  /* Sleep for some period of time before the reconnection. */
  usleep(1000 * reset_sleep); 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.