From 60f9dccefd06a25beecd926ea2bcda5150eb6283 Mon Sep 17 00:00:00 2001 From: "rhp%netscape.com" Date: Mon, 17 Apr 2000 04:16:06 +0000 Subject: [PATCH] Fix for crash on vCard Add button - Bug #34780 --- mailnews/addrbook/src/nsAddbookUrl.cpp | 52 -------------------------- 1 file changed, 52 deletions(-) diff --git a/mailnews/addrbook/src/nsAddbookUrl.cpp b/mailnews/addrbook/src/nsAddbookUrl.cpp index d5dd716f33d..1158c80fba6 100644 --- a/mailnews/addrbook/src/nsAddbookUrl.cpp +++ b/mailnews/addrbook/src/nsAddbookUrl.cpp @@ -105,58 +105,6 @@ NS_IMPL_ISUPPORTS1(nsAddbookUrl, nsIURI) NS_IMETHODIMP nsAddbookUrl::CrackAddURL(char *searchPart) { - nsCString emailAddr = ""; - nsCString folderName = ""; - - char *rest = searchPart; - - // okay, first, free up all of our old search part state..... - CleanupAddbookState(); - - // Start past the '?'... - if (rest && *rest == '?') - rest++; - - if (rest) - { - char *token = nsCRT::strtok(rest, "&", &rest); - while (token && *token) - { - char *value = 0; - char *eq = PL_strchr(token, '='); - if (eq) - { - value = eq+1; - *eq = 0; - } - - switch (nsCRT::ToUpper(*token)) - { - case 'E': - if (!nsCRT::strcasecmp (token, "email")) - emailAddr = value; - break; - case 'F': - if (!nsCRT::strcasecmp (token, "folder")) - folderName = value; - break; - } // end of switch statement... - - if (eq) - *eq = '='; // put it back - token = nsCRT::strtok(rest, "&", &rest); - } // while we still have part of the url to parse... - } // if rest && *rest - - nsUnescape(emailAddr); - mAbCardProperty->SetCardValue(kPriEmailColumn, nsString(emailAddr).GetUnicode()); - - if (!folderName.IsEmpty()) - { - nsUnescape(folderName); - mAbCardProperty->SetCardValue(kWorkAddressBook, nsString(folderName).GetUnicode()); - } - return NS_OK; }