Make the S/MIME related and Java/JS tabs stay away no matter which tab on the

left side is clicked.

Plug some more memory leaks in security advisor.
This commit is contained in:
javi%netscape.com 2000-09-01 23:30:25 +00:00
parent 9bd82fdf30
commit 5e555e3a5f
2 changed files with 30 additions and 16 deletions

View File

@ -265,7 +265,14 @@ SSMSecurityAdvisorContext_Destroy(SSMResource *res, PRBool doFree)
if (ct->socketStatus) { if (ct->socketStatus) {
SSM_FreeResource(&ct->socketStatus->super); SSM_FreeResource(&ct->socketStatus->super);
} }
PR_FREEIF(ct->hostname);
PR_FREEIF(ct->senderAddr);
if (ct->recipients) {
for (i=0; i<ct->numRecipients; i++) {
PR_FREEIF(ct->recipients[i]);
}
PR_FREEIF(ct->recipients);
}
/* Free if asked */ /* Free if asked */
if (doFree) if (doFree)
PR_Free(ct); PR_Free(ct);
@ -3296,11 +3303,14 @@ SSM_ListCRLs(SSMTextGenContext *cx)
} }
SSMStatus SSMStatus
ssm_getStringForAbleAgent(SSMTextGenContext *cx, const char *agents[], ssm_getStringForAbleAgent(SSMTextGenContext *cx, const char *agents[])
const char *key)
{ {
int i; int i;
SSMStatus rv; SSMStatus rv;
char *key;
key = SSM_At(cx->m_params, 0);
for (i=0; agents[i] != NULL; i++) { for (i=0; agents[i] != NULL; i++) {
if (PL_strstr(cx->m_request->agent, agents[i]) != NULL) { if (PL_strstr(cx->m_request->agent, agents[i]) != NULL) {
@ -3317,15 +3327,15 @@ ssm_getStringForAbleAgent(SSMTextGenContext *cx, const char *agents[],
SSMStatus SSM_LayoutSMIMETab(SSMTextGenContext *cx) SSMStatus SSM_LayoutSMIMETab(SSMTextGenContext *cx)
{ {
return ssm_getStringForAbleAgent(cx, kSMimeApps, "app_does_smime"); return ssm_getStringForAbleAgent(cx, kSMimeApps);
} }
SSMStatus SSM_LayoutJavaJSTab(SSMTextGenContext *cx) SSMStatus SSM_LayoutJavaJSTab(SSMTextGenContext *cx)
{ {
return ssm_getStringForAbleAgent(cx, kJavaJSApps, "app_does_javajs"); return ssm_getStringForAbleAgent(cx, kJavaJSApps);
} }
SSMStatus SSM_LayoutOthersTab(SSMTextGenContext *cx) SSMStatus SSM_LayoutOthersTab(SSMTextGenContext *cx)
{ {
return ssm_getStringForAbleAgent(cx, kSMimeApps, "app_uses_others"); return ssm_getStringForAbleAgent(cx, kSMimeApps);
} }

View File

@ -895,23 +895,26 @@ left1-2_content={leftframework left1-2tabs,info_about}
app_does_smime={link_left_tab {text_messenger},2,2} app_does_smime={link_left_tab {text_messenger},2,2}
app_does_javajs={link_left_tab {text_javajs},2,3} app_does_javajs={link_left_tab {text_javajs},2,3}
app_does_smime_selected={select_left_tab {text_messenger},2,2}
app_does_javajs_selected={select_left_tab {text_javajs},2,3}
; ;
; Applications pane ; Applications pane
; ;
left2-1tabs: left2-1tabs:
{select_left_tab {text_navigator}} {select_left_tab {text_navigator}}
{_smime_tab} {_smime_tab app_does_smime}
{_java_js_tab} {_java_js_tab app_does_javajs}
:left2-1tabs :left2-1tabs
left2-2tabs: left2-2tabs:
{link_left_tab {text_navigator},2,1} {link_left_tab {text_navigator},2,1}
{_smime_tab} {_smime_tab app_does_smime_selected}
{_java_js_tab} {_java_js_tab app_does_javajs}
:left2-2tabs :left2-2tabs
left2-3tabs: left2-3tabs:
{link_left_tab {text_navigator},2,1} {link_left_tab {text_navigator},2,1}
{_smime_tab} {_smime_tab app_does_smime}
{_java_js_tab} {_java_js_tab app_does_javajs_selected}
:left2-3tabs :left2-3tabs
; Top level pages ; Top level pages
@ -923,31 +926,32 @@ left2-3_type=text/html
left2-3_content={leftframework left2-3tabs,apps_javajs} left2-3_content={leftframework left2-3tabs,apps_javajs}
app_uses_others={link_left_tab {text_others},3,2} app_uses_others={link_left_tab {text_others},3,2}
app_uses_others_selected={select_left_tab {text_others},3,2}
; ;
; Certificates pane ; Certificates pane
; ;
left3-1tabs: left3-1tabs:
{select_left_tab {text_mine},3,1} {select_left_tab {text_mine},3,1}
{_addOthersCerts} {_addOthersCerts app_uses_others}
{link_left_tab {text_websites},3,3} {link_left_tab {text_websites},3,3}
{link_left_tab {text_authorities},3,4} {link_left_tab {text_authorities},3,4}
:left3-1tabs :left3-1tabs
left3-2tabs: left3-2tabs:
{link_left_tab {text_mine},3,1} {link_left_tab {text_mine},3,1}
{_addOthersCerts} {_addOthersCerts app_uses_others_selected}
{link_left_tab {text_websites},3,3} {link_left_tab {text_websites},3,3}
{link_left_tab {text_authorities},3,4} {link_left_tab {text_authorities},3,4}
:left3-2tabs :left3-2tabs
left3-3tabs: left3-3tabs:
{link_left_tab {text_mine},3,1} {link_left_tab {text_mine},3,1}
{_addOthersCerts} {_addOthersCerts app_uses_others}
{select_left_tab {text_websites},3,3} {select_left_tab {text_websites},3,3}
{link_left_tab {text_authorities},3,4} {link_left_tab {text_authorities},3,4}
:left3-3tabs :left3-3tabs
left3-4tabs: left3-4tabs:
{link_left_tab {text_mine},3,1} {link_left_tab {text_mine},3,1}
{_addOthersCerts} {_addOthersCerts app_uses_others}
{link_left_tab {text_websites},3,3} {link_left_tab {text_websites},3,3}
{select_left_tab {text_authorities},3,4} {select_left_tab {text_authorities},3,4}
:left3-4tabs :left3-4tabs