/* * Mbuni - Open Source MMS Gateway * * Mbuni sample billing handler module * * Copyright (C) 2003 - 2005, Digital Solutions Ltd. - http://www.dsmagic.com * * Paul Bagyenda * * This program is free software, distributed under the terms of * the GNU General Public License, with a few exceptions granted (see LICENSE) */ #include #include #ifndef DARWIN #ifndef FREEBSD #include #endif #endif #include #include "mms_billing.h" static Octstr *script = NULL; static void *mms_billingmodule_init(char *settings) { script = octstr_create(settings); return NULL; } static int mms_billingmodule_fini(void *module_data) { if (script) { octstr_destroy(script); script = NULL; } return 0; } static int mms_billmsg(Octstr *from, List *to, unsigned long msg_size, Octstr *vaspid, Octstr *msgid, void *module_data) { int i; if (script == NULL || octstr_len(script) == 0) return 0; for (i=0;i