throughput fix
This commit is contained in:
parent
cd52c8f1ee
commit
3ebb5316c1
|
@ -891,7 +891,7 @@ static int mms_sendtommsc(MmscGrp *mmc, Octstr *from, Octstr *to, Octstr *transi
|
||||||
*new_msgid = id;
|
*new_msgid = id;
|
||||||
|
|
||||||
octstr_destroy(groupid);
|
octstr_destroy(groupid);
|
||||||
if (id && throughput > 0)
|
if (throughput > 0)
|
||||||
gwthread_sleep(1.0/throughput);
|
gwthread_sleep(1.0/throughput);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ int mms_load_mmsbox_settings(mCfg *cfg, gwthread_func_t *mmsc_handler_func)
|
||||||
{
|
{
|
||||||
mCfgGrp *grp = mms_cfg_get_single(cfg, octstr_imm("mbuni"));
|
mCfgGrp *grp = mms_cfg_get_single(cfg, octstr_imm("mbuni"));
|
||||||
mCfgGrp *cgrp = mms_cfg_get_single(cfg, octstr_imm("core"));
|
mCfgGrp *cgrp = mms_cfg_get_single(cfg, octstr_imm("core"));
|
||||||
Octstr *gdir, *s;
|
Octstr *gdir, *s, *tmp;
|
||||||
int send_port_ssl = 0;
|
int send_port_ssl = 0;
|
||||||
List *l;
|
List *l;
|
||||||
int i, n, xx;
|
int i, n, xx;
|
||||||
|
@ -211,7 +211,13 @@ int mms_load_mmsbox_settings(mCfg *cfg, gwthread_func_t *mmsc_handler_func)
|
||||||
#ifdef HAVE_LIBSSL
|
#ifdef HAVE_LIBSSL
|
||||||
mms_cfg_get_bool(x, octstr_imm("incoming-port-ssl"), &ssl);
|
mms_cfg_get_bool(x, octstr_imm("incoming-port-ssl"), &ssl);
|
||||||
#endif
|
#endif
|
||||||
mms_cfg_get_int(x, octstr_imm("max-throughput"), &m->throughput);
|
if ((tmp = _mms_cfg_getx(x, octstr_imm("max-throughput"))) != NULL) {
|
||||||
|
if (octstr_parse_double(&m->throughput, tmp, 0) == -1)
|
||||||
|
m->throughput = 0;
|
||||||
|
octstr_destroy(tmp);
|
||||||
|
info(0, "Set throughput to %.3f for mmsc id <%s>",
|
||||||
|
m->throughput, octstr_get_cstr(m->id));
|
||||||
|
}
|
||||||
|
|
||||||
type = _mms_cfg_getx(x, octstr_imm("type"));
|
type = _mms_cfg_getx(x, octstr_imm("type"));
|
||||||
if (octstr_case_compare(type, octstr_imm("eaif")) == 0)
|
if (octstr_case_compare(type, octstr_imm("eaif")) == 0)
|
||||||
|
|
|
@ -32,7 +32,7 @@ typedef struct MmscGrp {
|
||||||
Octstr *allowed_prefix, *denied_prefix;
|
Octstr *allowed_prefix, *denied_prefix;
|
||||||
Octstr *allowed_sender_prefix, *denied_sender_prefix;
|
Octstr *allowed_sender_prefix, *denied_sender_prefix;
|
||||||
enum {UNKNOWN_MMSC = -1, CUSTOM_MMSC, SOAP_MMSC, EAIF_MMSC} type; /* type of connection. */
|
enum {UNKNOWN_MMSC = -1, CUSTOM_MMSC, SOAP_MMSC, EAIF_MMSC} type; /* type of connection. */
|
||||||
long throughput; /* Max send rate. */
|
double throughput; /* Max send rate. */
|
||||||
long threadid; /* handler thread. */
|
long threadid; /* handler thread. */
|
||||||
|
|
||||||
int reroute; /* whether messages from this mmsc are re-routed outwards. */
|
int reroute; /* whether messages from this mmsc are re-routed outwards. */
|
||||||
|
|
Loading…
Reference in New Issue