[OpenSIPS-Devel] [OpenSIPS/opensips] 9e8421: rest_client: Explicitly set retcode_pv to 0 on error

Liviu Chircu noreply at github.com
Thu Mar 14 05:38:40 EDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 9e842178d6c3d96143f4d1881bb57cdd180153f6
      https://github.com/OpenSIPS/opensips/commit/9e842178d6c3d96143f4d1881bb57cdd180153f6
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-03-14 (Thu, 14 Mar 2019)

  Changed paths:
    M modules/rest_client/rest_client.c

  Log Message:
  -----------
  rest_client: Explicitly set retcode_pv to 0 on error

This avoids any scripting mistakes where:

    * the user does not init $var(http_rc) to 0 prior to rest_get()
    * rest_get() fails (e.g. connection timeout -- web server is down)
    * $var(http_rc) is untouched, yet mistakenly holds 200 from a
      previous (successful) run of the same process





More information about the Devel mailing list