Pre-Submission Checklist

Type Of Change

Checklist:

Description

A new parameter timeout_mode is added.
This parameter defines if timeouts are enabled, and in which unit timeout values are expressed.

For reference, see discussion in: #3611

Implementation detail:

default global timeout = 0 (unconfigured).

Parse connections as usual. If they have a timeout configured, use it.

In mod_init:
  if global timeout == 0 (unconfigured), and timeout_mode is 1 or 2:
    if timeout_mode == 1 -> global timeout = 4 (seconds)
    if timeout_mode == 2 -> global timeout = 4000 (milliseconds)

  for each connection "conn" (fixup):
    if timeout_mode is not 1 or 2 -> conn.timeout = 0 (to reflect the fact that no timeout will be handled)
    else if conn.timeout is not configured -> conn.timeout = global timeout (in seconds or milliseconds, depending on timeout_mode).

When doing Curl requests (curL_request_url):
  if timeout_mode == 1: set CURLOPT_TIMEOUT
  if timeout_mode == 2: set CURLOPT_TIMEOUT_MS

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3615

Commit Summary

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3615@github.com>