From bcb1f8fe1c18f2f1e0aaf1349e9ae9c576646c30 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Thu, 21 Apr 2005 05:16:57 +0000 Subject: [PATCH] Added vaspid to billing and cdr modules --- mbuni/libtool | 4 ++-- mbuni/mmlib/mms_billing.c | 2 +- mbuni/mmlib/mms_billing.h | 3 ++- mbuni/mmlib/mms_billing_shell.c | 2 +- mbuni/mmsc/mmsglobalsender.c | 2 ++ 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mbuni/libtool b/mbuni/libtool index b71e8ab..b144fa5 100755 --- a/mbuni/libtool +++ b/mbuni/libtool @@ -66,7 +66,7 @@ fast_install=yes # The host system. host_alias= -host=powerpc-apple-darwin7.8.0 +host=powerpc-apple-darwin7.9.0 # An echo program that does not interpret backslashes. echo="echo" @@ -6652,7 +6652,7 @@ fast_install=needless # The host system. host_alias= -host=powerpc-apple-darwin7.8.0 +host=powerpc-apple-darwin7.9.0 # An echo program that does not interpret backslashes. echo="echo" diff --git a/mbuni/mmlib/mms_billing.c b/mbuni/mmlib/mms_billing.c index b2a4784..b8d23ed 100644 --- a/mbuni/mmlib/mms_billing.c +++ b/mbuni/mmlib/mms_billing.c @@ -33,7 +33,7 @@ static int mms_billingmodule_fini(void *module_data) return module_data ? fclose(module_data) : -1; } -static double mms_billmsg(Octstr *from, List *to, unsigned long msg_size, void *module_data) +static double mms_billmsg(Octstr *from, List *to, unsigned long msg_size, Octstr *vaspid, void *module_data) { return 0; } diff --git a/mbuni/mmlib/mms_billing.h b/mbuni/mmlib/mms_billing.h index f5d1f7c..5b795b9 100644 --- a/mbuni/mmlib/mms_billing.h +++ b/mbuni/mmlib/mms_billing.h @@ -30,6 +30,7 @@ typedef struct MmsCdrStruct { char from[CBUFSIZE]; char to[CBUFSIZE]; char msgid[CBUFSIZE]; + char vaspid[CBUFSIZE]; unsigned long msg_size; } MmsCdrStruct; @@ -46,7 +47,7 @@ typedef struct MmsBillingFuncStruct { /* Bills a message. Returns >= 0 if billed ok, -1 if message should be rejected, * -2 on internal (temporary) error. */ - double (*mms_billmsg)(Octstr *from, List *to, unsigned long msg_size, void *module_data); + double (*mms_billmsg)(Octstr *from, List *to, unsigned long msg_size, Octstr *vaspid, void *module_data); int (*mms_billingmodule_fini)(void *module_data); } MmsBillingFuncStruct; diff --git a/mbuni/mmlib/mms_billing_shell.c b/mbuni/mmlib/mms_billing_shell.c index 1c42827..564513a 100644 --- a/mbuni/mmlib/mms_billing_shell.c +++ b/mbuni/mmlib/mms_billing_shell.c @@ -17,7 +17,7 @@ static int mms_billingmodule_fini(void *module_data) return 0; } -static double mms_billmsg(Octstr *from, List *to, unsigned long msg_size, void *module_data) +static double mms_billmsg(Octstr *from, List *to, unsigned long msg_size, Octstr *vaspid, void *module_data) { int i; diff --git a/mbuni/mmsc/mmsglobalsender.c b/mbuni/mmsc/mmsglobalsender.c index af86e5c..57c861d 100644 --- a/mbuni/mmsc/mmsglobalsender.c +++ b/mbuni/mmsc/mmsglobalsender.c @@ -82,6 +82,7 @@ static int sendMsg(MmsEnvelope *e) amt = settings->mms_billfuncs->mms_billmsg(e->from, l, e->msize, + e->vaspid, settings->mms_bill_module_data); list_destroy(l, NULL); @@ -278,6 +279,7 @@ static int sendMsg(MmsEnvelope *e) strncpy(cdr->from, octstr_get_cstr(e->from), sizeof cdr->from); strncpy(cdr->to, octstr_get_cstr(to->rcpt), sizeof cdr->to); strncpy(cdr->msgid, e->msgId ? octstr_get_cstr(e->msgId) : "", sizeof cdr->msgid); + strncpy(cdr->vaspid, e->vaspid ? octstr_get_cstr(e->vaspid) : "", sizeof cdr->vaspid); cdr->msg_size = e->msize; list_produce(cdr_list, cdr); /* Put it on list so sending thread sends it. */