1
0
Fork 0

admin fixes

This commit is contained in:
bagyenda 2009-01-12 15:33:20 +00:00
parent 76cb3e6f5b
commit 037183a65a
2 changed files with 45 additions and 41 deletions

View File

@ -1,5 +1,6 @@
2009-01-12 P. A. Bagyenda <bagyenda@dsmagic.com>
* Minor fixes: Output from admin interfaces always valid XML
* Minor fixes: admin module
2008-12-24 P. A. Bagyenda <bagyenda@dsmagic.com>
* Improved MM1 performance
2008-12-17 P. A. Bagyenda <bagyenda@dsmagic.com>

View File

@ -671,7 +671,7 @@ static void delete_stale_mmsc(int delete_all)
MmscGrp *mmc;
int n = gwlist_len(mmsc_del_list);
while (n-- > 0 &&
while (n-- > 0 && mmsc_del_list &&
(mmc = gwlist_extract_first(mmsc_del_list)) != NULL)
if (delete_all ||
(mmc->use_count <= 0 &&
@ -707,14 +707,15 @@ void mmsbox_stop_all_mmsc_conn(void)
Octstr *mmc;
List *l = dict_keys(mmscs);
if (l) {
while ((mmc = gwlist_extract_first(l)) != NULL) {
mms_info(0, "mmsbox", NULL,"Stopping MMSC [%s]", octstr_get_cstr(mmc));
mmsbox_stop_mmsc_conn(mmc);
octstr_destroy(mmc);
}
gwlist_destroy(l, NULL);
}
}
/* Get the MMC that should handler this recipient. */
MmscGrp *get_handler_mmc(Octstr *id, Octstr *to, Octstr *from)
@ -1014,7 +1015,7 @@ static void admin_handler(void *unused)
gwlist_append(l, m);
}
/* Start MMSCs. */
if (l)
while ((m = gwlist_extract_first(l)) != NULL) {
List *e = gwlist_create();
List *w = gwlist_create();
@ -1044,6 +1045,7 @@ static void admin_handler(void *unused)
gwlist_append(l, octstr_duplicate(mmc_id));
}
if (l)
while ((x = gwlist_extract_first(l)) != NULL) {
int ret = mmsbox_stop_mmsc_conn(x);
octstr_format_append(rbody,
@ -1062,6 +1064,7 @@ static void admin_handler(void *unused)
gwlist_append(l, octstr_duplicate(mmc_id));
}
if (l)
while ((x = gwlist_extract_first(l)) != NULL) {
if ((mc = dict_get(mmscs, x)) != NULL)
append_mmsc_status(rbody, mc, NULL);