1
0
Fork 0

- 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:
bagyenda 2006-07-13 12:01:24 +00:00
parent 7fd8045dd4
commit 79b19bac64
4 changed files with 11 additions and 12 deletions

View File

@ -8,7 +8,7 @@ storage-directory = /tmp/spool
max-send-threads = 5
maximum-send-attempts = 50
default-message-expiry = 360000
queue-run-interval = 0.1
queue-run-interval = 5
send-attempt-back-off = 300
sendmms-port = 10001

View File

@ -14,7 +14,7 @@ send-mail-prog = /usr/sbin/sendmail -f '%f' '%t'
unified-prefix = "+25637,037,37"
maximum-send-attempts = 50
default-message-expiry = 360000
queue-run-interval = 0.1
queue-run-interval = 5
send-attempt-back-off = 300
sendsms-url = http://localhost:13013/cgi-bin/sendsms
sendsms-username = tester

View File

@ -1008,12 +1008,11 @@ int parse_cgivars(List *request_headers, Octstr *request_body,
/* Go through body parts, pick out what we need. */
for (i = 0, n = list_len(m->multiparts); i < n; 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 *ct = NULL, *ch = NULL;
http_header_get_content_type(mp->headers, &ct, &ch);
if (name) {
HTTPCGIVar *x = gw_malloc(sizeof *x);
@ -1037,8 +1036,6 @@ int parse_cgivars(List *request_headers, Octstr *request_body,
}
octstr_destroy(name);
}
if (ch)
octstr_destroy(ch);
if (ct)
octstr_destroy(ct);

View File

@ -167,11 +167,13 @@ MmscSettings *mms_load_mmsc_settings(mCfg *cfg, List **proxyrelays)
if (from && octstr_len(from) > 1)
octstr_url_encode(from);
i = octstr_search_char(m->sendsms_url, '?', 0); /* If ? is in there, omit below. */
octstr_format_append(m->sendsms_url,
(from && octstr_len(from) > 1) ?
"?username=%S&password=%S&from=%S" :
"?username=%S&password=%S",
"%susername=%S&password=%S&from=%S" :
"%susername=%S&password=%S",
(i >= 0) ? "" : "?",
user,
pass,from);