printf("\tCould not read pref %s\n", serverTypePref);
printf("\tCould not read pref %s\n", (const char*)serverTypePref);
nsMsgAccount::createIncomingServer(){  if (!m_accountKey) return NS_ERROR_NOT_INITIALIZED;  // from here, load mail.account.myaccount.server  // Load the incoming server  //  // ex) mail.account.myaccount.server = "myserver"  nsresult rv = getPrefService();  if (NS_FAILED(rv)) return rv;  // get the "server" pref  char *serverKeyPref = PR_smprintf("mail.account.%s.server", m_accountKey);  nsXPIDLCString serverKey;  rv = m_prefs->CopyCharPref(serverKeyPref, getter_Copies(serverKey));  PR_FREEIF(serverKeyPref);  if (NS_FAILED(rv)) return rv;    #ifdef DEBUG_alecf  printf("\t%s's server: %s\n", m_accountKey, (const char*)serverKey);#endif  // get the servertype  // ex) mail.server.myserver.type = imap  char *serverTypePref = PR_smprintf("mail.server.%s.type",                                     (const char*)serverKey);  nsXPIDLCString serverType;  rv = m_prefs->CopyCharPref(serverTypePref, getter_Copies(serverType));  PR_FREEIF(serverTypePref);  // the server type doesn't exist, use "generic"  if (NS_FAILED(rv)) {    serverType.Copy("generic");    return rv;  }    #ifdef DEBUG_alecf  if (NS_FAILED(rv)) {    printf("\tCould not read pref %s\n", serverTypePref);  } else {    printf("\t%s's   type: %s\n", m_accountKey, (const char*)serverType);  }#endif      // get the server from the account manager  NS_WITH_SERVICE(nsIMsgMailSession,session, NS_MSGMAILSESSION_PROGID, &rv);  if (NS_FAILED(rv)) return rv;      nsCOMPtr<nsIMsgAccountManager> am;  rv = session->GetAccountManager(getter_AddRefs(am));  if (NS_FAILED(rv)) return rv;      nsCOMPtr<nsIMsgIncomingServer> server;  rv = am->GetIncomingServer(serverKey, getter_AddRefs(server));  if (NS_FAILED(rv)) return rv;  #ifdef DEBUG_alecf  printf("%s loaded.\n", m_accountKey);#endif  // store the server in this structure  m_incomingServer = server;  return NS_OK;}