From 22fd2f9bd35234c03320e6139a2d8ad83b36281d Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Fri, 21 Oct 2005 08:04:42 +0000 Subject: [PATCH] Fixes for message id mis-spelling in encoder/decoder --- mbuni/mmlib/mms_msg.c | 4 ++-- mbuni/mmlib/mms_queue.c | 4 ++-- mbuni/mmlib/mms_util.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mbuni/mmlib/mms_msg.c b/mbuni/mmlib/mms_msg.c index fd1b291..3d253c0 100644 --- a/mbuni/mmlib/mms_msg.c +++ b/mbuni/mmlib/mms_msg.c @@ -1008,8 +1008,8 @@ static int fixup_msg(MmsMsg *m, Octstr *from) octstr_destroy(s); /* Check for msgid, put in if missing. */ - if ((s = http_header_value(m->headers, octstr_imm("MessageID"))) == NULL) - http_header_add(m->headers, "MessageID", "00000"); + if ((s = http_header_value(m->headers, octstr_imm("Message-ID"))) == NULL) + http_header_add(m->headers, "Message-ID", "00000"); else octstr_destroy(s); diff --git a/mbuni/mmlib/mms_queue.c b/mbuni/mmlib/mms_queue.c index 7f58a7f..3b18009 100644 --- a/mbuni/mmlib/mms_queue.c +++ b/mbuni/mmlib/mms_queue.c @@ -508,10 +508,10 @@ static int mkqf(char qf[QFNAMEMAX], char subdir[64], char *mms_queuedir) do { Octstr *tmp; - xqf = octstr_format("%cf%ld.%d.x%d%ld", + xqf = octstr_format("%cf%ld.%d.x%d.%ld", MQF, time(NULL), - ++ect, getpid(), random() % 100); + (++ect % 10000), getpid()%1000, random() % 1000); tmp = octstr_format("%.64s/%s%S", mms_queuedir, subdir, xqf); ctmp = octstr_get_cstr(tmp); diff --git a/mbuni/mmlib/mms_util.c b/mbuni/mmlib/mms_util.c index 776e233..c1d4c67 100644 --- a/mbuni/mmlib/mms_util.c +++ b/mbuni/mmlib/mms_util.c @@ -170,7 +170,7 @@ Octstr *mms_maketransid(char *qf, Octstr *mmscname) if (!qf) x = octstr_format("msg.%ld.x%d.%d.%d", - time(NULL), ++ct, getpid(), random()%10000); + time(NULL), (++ct % 10000), getpid()%1000, random()%1000); else x = octstr_create(qf);