if (PL_strcasecmp(entry->hostname, thisHostname)==0 && PL_strcmp(entry->type, thisType)==0) {  if (PL_strcmp(entry->username,"")==0) { entry->server = server; return PR_FALSE; } else { if (PL_strcmp(entry->username, thisUsername)==0) { entry->server = server; return PR_FALSE; } }
PRBool checkType = PL_strcmp(entry->type, ""); PRBool checkHostname = PL_strcmp(entry->hostname,""); PRBool checkUsername = PL_strcmp(entry->username,""); if ((!checkType || (PL_strcmp(entry->type, thisType)==0)) && (!checkHostname || (PL_strcasecmp(entry->hostname, thisHostname)==0)) && (!checkUsername || (PL_strcmp(entry->username, thisUsername)==0))) { entry->server = server; return PR_FALSE;
nsMsgAccountManager::findServer(nsISupports *aElement, void *data){  nsresult rv;    nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(aElement, &rv);  if (NS_FAILED(rv)) return PR_TRUE;  findServerEntry *entry = (findServerEntry*) data;    nsXPIDLCString thisHostname;  rv = server->GetHostName(getter_Copies(thisHostname));  if (NS_FAILED(rv)) return PR_TRUE;  nsXPIDLCString thisUsername;  rv = server->GetUsername(getter_Copies(thisUsername));  if (NS_FAILED(rv)) return PR_TRUE;     nsXPIDLCString thisType;  rv = server->GetType(getter_Copies(thisType));  if (NS_FAILED(rv)) return PR_TRUE;   if (PL_strcasecmp(entry->hostname, thisHostname)==0 &&      PL_strcmp(entry->type, thisType)==0) {        // if we aren't looking for a username, don't compare.  we have a match  	if (PL_strcmp(entry->username,"")==0) {		entry->server = server;		return PR_FALSE;            // stop on first find         }        else {      		if (PL_strcmp(entry->username, thisUsername)==0) {		   entry->server = server;		   return PR_FALSE;            // stop on first find 		}	}  }  return PR_TRUE;}