*** empty log message ***
This commit is contained in:
parent
c2c0ce7fe3
commit
d98f7906b6
|
@ -1,3 +1,5 @@
|
|||
2009-01-28 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||
* Minor fix: mmsbox sendmms default content type
|
||||
2009-01-22 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||
* Fix: PGSQL Queue module was not honouring send_time fully
|
||||
2009-01-21 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||
|
|
|
@ -370,7 +370,7 @@ static MmsEnvelope *pgq_queue_readenvelope_ex(char *qf, char *mms_queuedir, int
|
|||
|
||||
/* read and block, to ensure no one else touches it. */
|
||||
sprintf(cmd, "SELECT id,cdate,lastt,sendt,edate,num_attempts,sender,data FROM "
|
||||
" mms_messages_view WHERE qdir='%s' AND qfname = '%s' %s FOR UPDATE %s",
|
||||
" mms_messages_view WHERE qdir='%.128s' AND qfname = '%.256s' %s FOR UPDATE %s",
|
||||
mms_queuedir, _qf,
|
||||
check_send_time ? " AND send_time <= current_timestamp " : "",
|
||||
shouldblock ? "" : "NOWAIT"); /* nice little PostgreSQL 8.x addition. */
|
||||
|
@ -1032,8 +1032,9 @@ static MmsMsg *pgq_queue_getdata(MmsEnvelope *e)
|
|||
struct Qthread_data_t {
|
||||
int64_t qid;
|
||||
char qf[QFNAMEMAX];
|
||||
char _pad1;
|
||||
char dir[QFNAMEMAX]; /* item to load. */
|
||||
|
||||
char _pad2;
|
||||
int (*deliver)(MmsEnvelope *e);
|
||||
};
|
||||
|
||||
|
@ -1105,10 +1106,11 @@ static void pgq_queue_run(char *dir,
|
|||
(qid = PQgetvalue(r, i, 0)) != NULL) {
|
||||
struct Qthread_data_t *d = gw_malloc(sizeof *d);
|
||||
|
||||
memset(d, 0, sizeof *d);
|
||||
d->qid = strtoull(qid, NULL, 10);
|
||||
strncpy(d->qf, qfname, sizeof d->qf);
|
||||
strncpy(d->dir, dir, sizeof d->dir);
|
||||
d->_pad1 = d->_pad2 = 0; /* Just in case! */
|
||||
|
||||
d->deliver = deliver;
|
||||
|
||||
gwlist_produce(items_list, d);
|
||||
|
|
|
@ -1476,6 +1476,8 @@ static void dispatch_sendmms_recv(List *rl)
|
|||
_xctype = http_cgi_variable(cgivar_ctypes, "content");
|
||||
if (_xctype)
|
||||
ctype = octstr_duplicate(_xctype);
|
||||
else
|
||||
ctype = octstr_create("application/octet-stream");
|
||||
} else if (h->body && tparse != 0) { /* if all above fails,
|
||||
use send-mms msg body if any. */
|
||||
data = octstr_duplicate(h->body);
|
||||
|
|
|
@ -58,7 +58,7 @@ static Octstr *admin_deny_ip = NULL;
|
|||
|
||||
static gwthread_func_t *mmsc_receiver_func;
|
||||
|
||||
struct SendMmsPortInfo sendmms_port;
|
||||
struct SendMmsPortInfo sendmms_port = {-1};
|
||||
|
||||
struct MmsBoxMTfilter *mt_filter = NULL;
|
||||
|
||||
|
@ -211,10 +211,14 @@ int mms_load_mmsbox_settings(Octstr *fname, gwthread_func_t *mmsc_handler_func)
|
|||
#ifdef HAVE_LIBSSL
|
||||
mms_cfg_get_bool(cfg, grp, octstr_imm("sendmms-port-ssl"), &send_port_ssl);
|
||||
#endif
|
||||
if (http_open_port(sendmms_port.port, send_port_ssl) < 0)
|
||||
|
||||
if (sendmms_port.port > 0 &&
|
||||
http_open_port(sendmms_port.port, send_port_ssl) < 0)
|
||||
mms_error(0, "mmsbox", NULL, "Failed to start sendmms HTTP server on %ld: %s!",
|
||||
sendmms_port.port,
|
||||
strerror(errno));
|
||||
else
|
||||
sendmms_port.port = -1;
|
||||
|
||||
sendmms_port.allow_ip = mms_cfg_get(cfg, grp, octstr_imm("allow-ip"));
|
||||
sendmms_port.deny_ip = mms_cfg_get(cfg, grp, octstr_imm("deny-ip"));
|
||||
|
|
Loading…
Reference in New Issue