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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Vlad Pătrașcu
  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 9e842178d6c3d96143f4d1881bb57cdd180153f6
      https://github.com/OpenSIPS/opensips/commit/9e842178d6c3d96143f4d1881bb57cdd180153f6
  Author: Liviu Chircu <[hidden email]>
  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



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel