Added vaspid to billing and cdr modules
This commit is contained in:
parent
fdda50a286
commit
bcb1f8fe1c
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue