- Minor fix for ? char in sendsms url
- Minor fix for default queue run interval (was 0.1, now 5 secs)
This commit is contained in:
parent
7fd8045dd4
commit
79b19bac64
|
@ -8,7 +8,7 @@ storage-directory = /tmp/spool
|
||||||
max-send-threads = 5
|
max-send-threads = 5
|
||||||
maximum-send-attempts = 50
|
maximum-send-attempts = 50
|
||||||
default-message-expiry = 360000
|
default-message-expiry = 360000
|
||||||
queue-run-interval = 0.1
|
queue-run-interval = 5
|
||||||
send-attempt-back-off = 300
|
send-attempt-back-off = 300
|
||||||
sendmms-port = 10001
|
sendmms-port = 10001
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ send-mail-prog = /usr/sbin/sendmail -f '%f' '%t'
|
||||||
unified-prefix = "+25637,037,37"
|
unified-prefix = "+25637,037,37"
|
||||||
maximum-send-attempts = 50
|
maximum-send-attempts = 50
|
||||||
default-message-expiry = 360000
|
default-message-expiry = 360000
|
||||||
queue-run-interval = 0.1
|
queue-run-interval = 5
|
||||||
send-attempt-back-off = 300
|
send-attempt-back-off = 300
|
||||||
sendsms-url = http://localhost:13013/cgi-bin/sendsms
|
sendsms-url = http://localhost:13013/cgi-bin/sendsms
|
||||||
sendsms-username = tester
|
sendsms-username = tester
|
||||||
|
|
|
@ -1008,12 +1008,11 @@ int parse_cgivars(List *request_headers, Octstr *request_body,
|
||||||
/* Go through body parts, pick out what we need. */
|
/* Go through body parts, pick out what we need. */
|
||||||
for (i = 0, n = list_len(m->multiparts); i < n; i++) {
|
for (i = 0, n = list_len(m->multiparts); i < n; i++) {
|
||||||
MIMEEntity *mp = list_get(m->multiparts, i);
|
MIMEEntity *mp = list_get(m->multiparts, i);
|
||||||
Octstr *cd = http_header_value(mp->headers, octstr_imm("Content-Disposition"));
|
Octstr *ct = http_header_value(mp->headers,
|
||||||
|
octstr_imm("Content-Type"));
|
||||||
|
Octstr *cd = http_header_value(mp->headers,
|
||||||
|
octstr_imm("Content-Disposition"));
|
||||||
Octstr *name = http_get_header_parameter(cd, octstr_imm("name"));
|
Octstr *name = http_get_header_parameter(cd, octstr_imm("name"));
|
||||||
Octstr *ct = NULL, *ch = NULL;
|
|
||||||
|
|
||||||
http_header_get_content_type(mp->headers, &ct, &ch);
|
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
HTTPCGIVar *x = gw_malloc(sizeof *x);
|
HTTPCGIVar *x = gw_malloc(sizeof *x);
|
||||||
|
|
||||||
|
@ -1037,8 +1036,6 @@ int parse_cgivars(List *request_headers, Octstr *request_body,
|
||||||
}
|
}
|
||||||
octstr_destroy(name);
|
octstr_destroy(name);
|
||||||
}
|
}
|
||||||
if (ch)
|
|
||||||
octstr_destroy(ch);
|
|
||||||
if (ct)
|
if (ct)
|
||||||
octstr_destroy(ct);
|
octstr_destroy(ct);
|
||||||
|
|
||||||
|
|
|
@ -167,11 +167,13 @@ MmscSettings *mms_load_mmsc_settings(mCfg *cfg, List **proxyrelays)
|
||||||
if (from && octstr_len(from) > 1)
|
if (from && octstr_len(from) > 1)
|
||||||
octstr_url_encode(from);
|
octstr_url_encode(from);
|
||||||
|
|
||||||
|
|
||||||
|
i = octstr_search_char(m->sendsms_url, '?', 0); /* If ? is in there, omit below. */
|
||||||
octstr_format_append(m->sendsms_url,
|
octstr_format_append(m->sendsms_url,
|
||||||
(from && octstr_len(from) > 1) ?
|
(from && octstr_len(from) > 1) ?
|
||||||
"?username=%S&password=%S&from=%S" :
|
"%susername=%S&password=%S&from=%S" :
|
||||||
"?username=%S&password=%S",
|
"%susername=%S&password=%S",
|
||||||
|
(i >= 0) ? "" : "?",
|
||||||
user,
|
user,
|
||||||
pass,from);
|
pass,from);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue