sr_compat.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2008 iptelorg GmbH
  5. *
  6. * Permission to use, copy, modify, and distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  16. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*!
  19. * \file
  20. * \brief SIP-router core :: ser/kamailio/openser compatibility macros & vars.
  21. * \ingroup core
  22. * Module: \ref core
  23. */
  24. /*
  25. * History:
  26. * --------
  27. * 2008-11-29 initial version (andrei)
  28. */
  29. #include "sr_compat.h"
  30. /**
  31. * compatibility modes:
  32. * - SR_COMPAT_SER - strict compatibiliy with ser ($xy is avp)
  33. * - SR_COMPAT_KAMAILIO - strict compatibiliy with kamailio ($xy is pv)
  34. * - SR_COMPAT_MAX - max compatibiliy ($xy tried as pv, if not found, is avp)
  35. */
  36. #ifdef SR_SER
  37. #define SR_DEFAULT_COMPAT SR_COMPAT_SER
  38. #elif defined SR_KAMAILIO || defined SR_OPENSER
  39. #define SR_DEFAULT_COMPAT SR_COMPAT_MAX
  40. #elif defined SR_ALL || defined SR_MAX_COMPAT
  41. #define SR_DEFAULT_COMPAT SR_COMPAT_MAX
  42. #else
  43. /* default */
  44. #define SR_DEFAULT_COMPAT SR_COMPAT_MAX
  45. #endif
  46. int sr_compat=SR_DEFAULT_COMPAT;
  47. int sr_cfg_compat=SR_DEFAULT_COMPAT;