config.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * $Id$
  3. * This file is part of SIP-router, a free SIP server.
  4. *
  5. * SIP-router is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version
  9. *
  10. * SIP-router is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. *
  19. * History
  20. * -------
  21. * 2008-02-05 adapting tm module for the configuration framework (Miklos)
  22. */
  23. /*!
  24. * \file
  25. * \brief Siputils :: Configuration
  26. * \ingroup Siputils
  27. */
  28. #include "../../cfg/cfg.h"
  29. #include "../../parser/msg_parser.h" /* method types */
  30. #include "config.h"
  31. struct cfg_group_siputils default_siputils_cfg = {
  32. 0
  33. };
  34. void *siputils_cfg = &default_siputils_cfg;
  35. cfg_def_t siputils_cfg_def[] = {
  36. {"ring_timeout", CFG_VAR_INT | CFG_ATOMIC, 0, 0, ring_timeout_fixup, 0,
  37. "define how long the Call-id is kept in the internal list" },
  38. {0, 0, 0, 0, 0, 0}
  39. };
  40. int ring_timeout_fixup(void *handle, str* gname, str* name, void **val){
  41. if((int)(long)*val > 0) return 0;
  42. return -1;
  43. }