if (NS_SUCCEEDED(rv)) {
if (NS_SUCCEEDED(rv) && value) {
char * PromptUserCallback(void *arg, char *prompt, int isPasswd){    nsresult rv = NS_OK;    PRUnichar *password;    PRInt32  value;    NS_WITH_PROXIED_SERVICE(nsIPrompt, dialog, kNetSupportDialogCID, NS_UI_THREAD_EVENTQ, &rv);        if (NS_SUCCEEDED(rv)) {	    rv = dialog->PromptPassword(nsnull, NS_ConvertASCIItoUCS2(prompt).GetUnicode(),                                  NS_ConvertASCIItoUCS2(" ").GetUnicode(),      // hostname                                  PR_TRUE, &password, &value);        if (NS_SUCCEEDED(rv)) {            nsString a(password);            char* str = a.ToNewCString();            Recycle(password);            return str;        }    }    return nsnull;}