*** empty log message ***
This commit is contained in:
parent
82d5a85805
commit
55f9ee3766
|
@ -46,8 +46,10 @@ static int mms_logcdr(MmsCdrStruct *cdr)
|
|||
|
||||
localtime_r(&cdr->sdate, &tm);
|
||||
gw_strftime(buf, sizeof buf, "%Y-%m-%d %H:%M:%S", &tm);
|
||||
fprintf(cdr->module_data, "%s\t%.128s\t%.128s\t%.256s\t%.256s\t%ld\n",
|
||||
buf, cdr->src_interface[0] ? cdr->src_interface : "MM2",
|
||||
fprintf(cdr->module_data, "%s\t%.128s\t%.128s\t%.128s\t%.256s\t%.256s\t%ld\n",
|
||||
buf,
|
||||
cdr->src_interface[0] ? cdr->src_interface : "MM2",
|
||||
cdr->dst_interface[0] ? cdr->dst_interface : "MM2",
|
||||
cdr->from, cdr->to, cdr->msgid, cdr->msg_size);
|
||||
fflush(cdr->module_data);
|
||||
} else
|
||||
|
@ -57,7 +59,7 @@ static int mms_logcdr(MmsCdrStruct *cdr)
|
|||
}
|
||||
|
||||
MmsCdrStruct *make_cdr_struct(void *module_data, time_t sdate, char *from, char *to, char *msgid,
|
||||
char *vaspid, char *src_int, unsigned long msg_size)
|
||||
char *vaspid, char *src_int, char *dst_int, unsigned long msg_size)
|
||||
{
|
||||
|
||||
MmsCdrStruct *cdr = gw_malloc(sizeof *cdr);
|
||||
|
@ -69,6 +71,7 @@ MmsCdrStruct *make_cdr_struct(void *module_data, time_t sdate, char *from, char
|
|||
strncpy(cdr->msgid, msgid ? msgid : "", sizeof cdr->msgid);
|
||||
strncpy(cdr->vaspid, vaspid ? vaspid : "", sizeof cdr->vaspid);
|
||||
strncpy(cdr->src_interface, src_int ? src_int : "MM2", sizeof cdr->src_interface);
|
||||
strncpy(cdr->dst_interface, dst_int ? dst_int : "MM2", sizeof cdr->dst_interface);
|
||||
|
||||
cdr->msg_size = msg_size;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ typedef struct MmsCdrStruct {
|
|||
char msgid[CBUFSIZE];
|
||||
char vaspid[CBUFSIZE];
|
||||
char src_interface[CBUFSIZE];
|
||||
char dst_interface[CBUFSIZE];
|
||||
unsigned long msg_size;
|
||||
} MmsCdrStruct;
|
||||
|
||||
|
@ -57,5 +58,5 @@ extern MmsBillingFuncStruct mms_billfuncs; /* The module must expose this symbol
|
|||
|
||||
/* utility function. */
|
||||
MmsCdrStruct *make_cdr_struct(void *module_data, time_t sdate, char *from, char *to, char *msgid,
|
||||
char *vaspid, char *src_int, unsigned long msg_size);
|
||||
char *vaspid, char *src_int, char *dst_int, unsigned long msg_size);
|
||||
#endif
|
||||
|
|
|
@ -424,6 +424,7 @@ int main(int argc, char *argv[])
|
|||
o_to ? octstr_get_cstr(o_to) : "",
|
||||
e->msgId ? octstr_get_cstr(e->msgId) : "",
|
||||
e->vaspid ? octstr_get_cstr(e->vaspid) : "",
|
||||
e->src_interface,
|
||||
"MM4", e->msize);
|
||||
settings->mms_billfuncs->mms_logcdr(cdr);
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
int res = MMS_SEND_OK, m;
|
||||
MmsEnvelopeTo *to = gwlist_get(e->to, i);
|
||||
time_t tnow = time(NULL);
|
||||
|
||||
char *dst_int = "NONE";
|
||||
|
||||
if (!to || !to->process) /* Already processed. */
|
||||
continue;
|
||||
|
@ -158,6 +158,8 @@ static int sendMsg(MmsEnvelope *e)
|
|||
int len = octstr_len(e->from);
|
||||
Octstr *pfrom;
|
||||
|
||||
dst_int = "MM3";
|
||||
|
||||
if (j > 0 && j - 1 + sizeof "/TYPE=PLMN" == len)
|
||||
pfrom = octstr_copy(e->from, 0, j);
|
||||
else if (k > 0 && k + sizeof "/TYPE=IPv" == len)
|
||||
|
@ -223,6 +225,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
res = mms_sendtomobile(e->from,
|
||||
to->rcpt, e->subject, e->fromproxy,
|
||||
e->msgId, e->expiryt, msg, e->dlr, &err);
|
||||
dst_int = "MM1";
|
||||
sent = 1;
|
||||
goto done;
|
||||
} else {
|
||||
|
@ -241,6 +244,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
e->msgId,
|
||||
e->hdrs,
|
||||
msg, &err);
|
||||
dst_int = "MM7";
|
||||
sent = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -283,6 +287,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
e->subject, e->fromproxy,
|
||||
e->msgId, e->expiryt, msg, e->dlr,
|
||||
&err);
|
||||
dst_int = "MM1";
|
||||
sent = 1;
|
||||
} else {
|
||||
|
||||
|
@ -308,6 +313,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
octstr_get_cstr(xtransid),
|
||||
e->msgId, e->expiryt, msg,
|
||||
mp->confirmed_mm4, mp->sendmail, e->hdrs, &err);
|
||||
dst_int = "MM4";
|
||||
sent = 1;
|
||||
octstr_destroy(xtransid);
|
||||
octstr_destroy(xfrom);
|
||||
|
@ -325,6 +331,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
e->msgId,
|
||||
e->hdrs,
|
||||
msg, &err);
|
||||
dst_int = "MM7";
|
||||
sent = 1;
|
||||
break;
|
||||
}
|
||||
|
@ -335,7 +342,6 @@ static int sendMsg(MmsEnvelope *e)
|
|||
if (!sent) {
|
||||
res = MMS_SEND_ERROR_FATAL;
|
||||
err = octstr_format("MMSC error: Don't know how to deliver to %S !", to->rcpt);
|
||||
|
||||
}
|
||||
octstr_destroy(phonenum);
|
||||
}
|
||||
|
@ -398,6 +404,7 @@ static int sendMsg(MmsEnvelope *e)
|
|||
e->msgId ? octstr_get_cstr(e->msgId) : "",
|
||||
e->vaspid ? octstr_get_cstr(e->vaspid) : "",
|
||||
e->src_interface,
|
||||
dst_int,
|
||||
e->msize);
|
||||
|
||||
gwlist_produce(cdr_list, cdr); /* Put it on list so sending thread sends it. */
|
||||
|
|
Loading…
Reference in New Issue