*** empty log message ***
This commit is contained in:
parent
ec32ce868e
commit
28231a7d7e
|
@ -1,6 +1,7 @@
|
||||||
2008-12-10 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2008-12-10 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
* Extra mbuni headers in mmsbox url service call
|
* Extra mbuni headers in mmsbox url service call
|
||||||
* mmsbox EAIF receiver bug fix thanks to Marcin Bockowski (bocian@gmail.com)
|
* mmsbox EAIF receiver bug fix thanks to Marcin Bockowski (bocian@gmail.com)
|
||||||
|
* Fix for email2mms handling when mms2email VASP defined
|
||||||
2008-12-09 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2008-12-09 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
* MSISDN and IP request headers now list (MMSC)
|
* MSISDN and IP request headers now list (MMSC)
|
||||||
2008-12-04 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2008-12-04 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
|
|
|
@ -41,7 +41,7 @@ static struct {
|
||||||
|
|
||||||
static int find_own(int i, int argc, char *argv[]);
|
static int find_own(int i, int argc, char *argv[]);
|
||||||
|
|
||||||
static void fixup_recipient(void);
|
static void fixup_recipient(Octstr **host);
|
||||||
static void fixup_sender(void);
|
static void fixup_sender(void);
|
||||||
static void fixup_addresses(List *headers);
|
static void fixup_addresses(List *headers);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ int main(int argc, char *argv[])
|
||||||
MmsMsg *msg;
|
MmsMsg *msg;
|
||||||
|
|
||||||
Octstr *email, *me, *rstatus, *fname;
|
Octstr *email, *me, *rstatus, *fname;
|
||||||
Octstr *home_mmsc = NULL;
|
Octstr *home_mmsc = NULL, *rhost = NULL;
|
||||||
List *headers, *h2;
|
List *headers, *h2;
|
||||||
Octstr *mm4_type = NULL, *transid, *ack, *msgid, *orig_sys;
|
Octstr *mm4_type = NULL, *transid, *ack, *msgid, *orig_sys;
|
||||||
Octstr *newmsgid = NULL;
|
Octstr *newmsgid = NULL;
|
||||||
|
@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
||||||
/* normalize recipient address, then if phone number,
|
/* normalize recipient address, then if phone number,
|
||||||
* check whether we are allowed to process.
|
* check whether we are allowed to process.
|
||||||
*/
|
*/
|
||||||
fixup_recipient();
|
fixup_recipient(&rhost);
|
||||||
fixup_sender();
|
fixup_sender();
|
||||||
|
|
||||||
if (xto && ttype == TPLMN) /* Get the home mmsc domain for this recipient. */
|
if (xto && ttype == TPLMN) /* Get the home mmsc domain for this recipient. */
|
||||||
|
@ -248,7 +248,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
switch(mtype) {
|
switch(mtype) {
|
||||||
case MM4_FORWARD_REQ:
|
case MM4_FORWARD_REQ:
|
||||||
if (ttype != TPLMN) {
|
if (ttype != TPLMN && settings->mms2email == NULL) {
|
||||||
err = "Error-service-denied";
|
err = "Error-service-denied";
|
||||||
mms_error(0, "MM4", NULL, "Not allowed to send to non-phone recipient, to=%s!", octstr_get_cstr(xto));
|
mms_error(0, "MM4", NULL, "Not allowed to send to non-phone recipient, to=%s!", octstr_get_cstr(xto));
|
||||||
} else {
|
} else {
|
||||||
|
@ -258,7 +258,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
int dlr;
|
int dlr;
|
||||||
|
|
||||||
octstr_format_append(xto, "/TYPE=PLMN");
|
if (ttype == TPLMN)
|
||||||
|
octstr_format_append(xto, "/TYPE=PLMN");
|
||||||
|
else
|
||||||
|
octstr_format_append(xto, "@%S", rhost);
|
||||||
gwlist_append(lto, xto);
|
gwlist_append(lto, xto);
|
||||||
|
|
||||||
if (dreport &&
|
if (dreport &&
|
||||||
|
@ -299,15 +302,17 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MM4_DELIVERY_REPORT_REQ:
|
case MM4_DELIVERY_REPORT_REQ:
|
||||||
if (ttype != TPLMN) { /* We only send to phones from this interface */
|
if (ttype != TPLMN && settings->mms2email == NULL) { /* We only send to phones from this interface */
|
||||||
mms_error(0, "MM4", NULL, "Not allowed to send to %s!", octstr_get_cstr(xto));
|
mms_error(0, "MM4", NULL, "Not allowed to send to %s!", octstr_get_cstr(xto));
|
||||||
err = "Error-service-denied";
|
err = "Error-service-denied";
|
||||||
} else {
|
} else {
|
||||||
List *lto = gwlist_create();
|
List *lto = gwlist_create();
|
||||||
Octstr *qf;
|
Octstr *qf;
|
||||||
|
|
||||||
|
if (ttype == TPLMN)
|
||||||
octstr_format_append(xto, "/TYPE=PLMN");
|
octstr_format_append(xto, "/TYPE=PLMN");
|
||||||
|
else
|
||||||
|
octstr_format_append(xto, "@%S", rhost);
|
||||||
gwlist_append(lto, xto);
|
gwlist_append(lto, xto);
|
||||||
qf = settings->qfs->mms_queue_add(xfrom, lto, NULL,
|
qf = settings->qfs->mms_queue_add(xfrom, lto, NULL,
|
||||||
xproxy, NULL,
|
xproxy, NULL,
|
||||||
|
@ -333,14 +338,18 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MM4_READ_REPLY_REPORT_REQ:
|
case MM4_READ_REPLY_REPORT_REQ:
|
||||||
if (ttype != TPLMN) { /* We only send to phones from this interface */
|
if (ttype != TPLMN && settings->mms2email == NULL) { /* We only send to phones from this interface */
|
||||||
mms_error(0, "MM4", NULL, "Not allowed to send to %s!", octstr_get_cstr(xto));
|
mms_error(0, "MM4", NULL, "Not allowed to send to %s!", octstr_get_cstr(xto));
|
||||||
err = "Error-service-denied";
|
err = "Error-service-denied";
|
||||||
} else {
|
} else {
|
||||||
List *lto = gwlist_create();
|
List *lto = gwlist_create();
|
||||||
Octstr *qf;
|
Octstr *qf;
|
||||||
|
|
||||||
octstr_format_append(xto, "/TYPE=PLMN");
|
if (ttype == TPLMN)
|
||||||
|
octstr_format_append(xto, "/TYPE=PLMN");
|
||||||
|
else
|
||||||
|
octstr_format_append(xto, "@%S", rhost);
|
||||||
|
|
||||||
gwlist_append(lto, xto);
|
gwlist_append(lto, xto);
|
||||||
qf = settings->qfs->mms_queue_add(xfrom, lto, NULL,
|
qf = settings->qfs->mms_queue_add(xfrom, lto, NULL,
|
||||||
xproxy, NULL,
|
xproxy, NULL,
|
||||||
|
@ -482,6 +491,8 @@ int main(int argc, char *argv[])
|
||||||
octstr_destroy(xproxy);
|
octstr_destroy(xproxy);
|
||||||
octstr_destroy(me);
|
octstr_destroy(me);
|
||||||
|
|
||||||
|
octstr_destroy(rhost);
|
||||||
|
|
||||||
mms_destroy(msg);
|
mms_destroy(msg);
|
||||||
mms_cleanup_mmsc_settings(settings);
|
mms_cleanup_mmsc_settings(settings);
|
||||||
mms_lib_shutdown();
|
mms_lib_shutdown();
|
||||||
|
@ -516,7 +527,7 @@ static int find_own(int i, int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void fixup_recipient(void)
|
static void fixup_recipient(Octstr **host)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Octstr *typ = NULL;
|
Octstr *typ = NULL;
|
||||||
|
@ -525,8 +536,11 @@ static void fixup_recipient(void)
|
||||||
if (!xto) return;
|
if (!xto) return;
|
||||||
|
|
||||||
i = octstr_search_char(xto, '@', 0); /* Remove '@' */
|
i = octstr_search_char(xto, '@', 0); /* Remove '@' */
|
||||||
if (i>0)
|
if (i>0) {
|
||||||
|
*host = octstr_copy(xto, i+1, octstr_len(xto));
|
||||||
octstr_delete(xto, i, octstr_len(xto));
|
octstr_delete(xto, i, octstr_len(xto));
|
||||||
|
} else
|
||||||
|
*host = octstr_create("localhost");
|
||||||
|
|
||||||
i = octstr_search(xto, octstr_imm("/TYPE="), 0);
|
i = octstr_search(xto, octstr_imm("/TYPE="), 0);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
|
|
@ -172,7 +172,10 @@ static int sendMsg(MmsEnvelope *e)
|
||||||
if (octstr_search_char(e->from, '@', 0) < 0)
|
if (octstr_search_char(e->from, '@', 0) < 0)
|
||||||
octstr_format_append(pfrom,"@%S", settings->hostname);
|
octstr_format_append(pfrom,"@%S", settings->hostname);
|
||||||
|
|
||||||
if (settings->mms2email)
|
if (settings->mms2email && /* send, but don't loop back on it */
|
||||||
|
!(strcmp(e->src_interface, "MM7") == 0 &&
|
||||||
|
e->vaspid && settings->mms2email->id &&
|
||||||
|
octstr_compare(e->vaspid, settings->mms2email->id) == 0))
|
||||||
res = mms_sendtovasp(settings->mms2email,
|
res = mms_sendtovasp(settings->mms2email,
|
||||||
e->from, to->rcpt,
|
e->from, to->rcpt,
|
||||||
e->msgId,
|
e->msgId,
|
||||||
|
|
Loading…
Reference in New Issue