Lines 1409-1415
Link Here
|
1409 |
{ |
1409 |
{ |
1410 |
// PRInt32 oldRecent = GetServerStateParser().NumberOfRecentMessages(); |
1410 |
// PRInt32 oldRecent = GetServerStateParser().NumberOfRecentMessages(); |
1411 |
nsCAutoString commandBuffer(GetServerCommandTag()); |
1411 |
nsCAutoString commandBuffer(GetServerCommandTag()); |
1412 |
commandBuffer.Append(" IDLE"CRLF); |
1412 |
commandBuffer.Append(" IDLE" CRLF); |
1413 |
|
1413 |
|
1414 |
do |
1414 |
do |
1415 |
{ |
1415 |
{ |
Lines 3287-3293
Link Here
|
3287 |
commandString.Append(messageIds); |
3287 |
commandString.Append(messageIds); |
3288 |
commandString.Append(" ("); |
3288 |
commandString.Append(" ("); |
3289 |
commandString.Append(attribute); |
3289 |
commandString.Append(attribute); |
3290 |
commandString.Append(")"CRLF); |
3290 |
commandString.Append(")" CRLF); |
3291 |
nsresult rv = SendData(commandString.get()); |
3291 |
nsresult rv = SendData(commandString.get()); |
3292 |
|
3292 |
|
3293 |
if (NS_SUCCEEDED(rv)) |
3293 |
if (NS_SUCCEEDED(rv)) |
Lines 5283-5289
Link Here
|
5283 |
|
5283 |
|
5284 |
IncrementCommandTagNumber(); |
5284 |
IncrementCommandTagNumber(); |
5285 |
nsCAutoString command(GetServerCommandTag()); |
5285 |
nsCAutoString command(GetServerCommandTag()); |
5286 |
command.Append(" expunge"CRLF); |
5286 |
command.Append(" expunge" CRLF); |
5287 |
|
5287 |
|
5288 |
nsresult rv = SendData(command.get()); |
5288 |
nsresult rv = SendData(command.get()); |
5289 |
if (NS_SUCCEEDED(rv)) |
5289 |
if (NS_SUCCEEDED(rv)) |
Lines 5359-5365
Link Here
|
5359 |
command.Append(gAppName); |
5359 |
command.Append(gAppName); |
5360 |
command.Append("\" \"version\" \""); |
5360 |
command.Append("\" \"version\" \""); |
5361 |
command.Append(gAppVersion); |
5361 |
command.Append(gAppVersion); |
5362 |
command.Append("\")"CRLF); |
5362 |
command.Append("\")" CRLF); |
5363 |
|
5363 |
|
5364 |
nsresult rv = SendData(command.get()); |
5364 |
nsresult rv = SendData(command.get()); |
5365 |
if (NS_SUCCEEDED(rv)) |
5365 |
if (NS_SUCCEEDED(rv)) |
Lines 5816-5822
Link Here
|
5816 |
nsCAutoString correctedPassword; |
5816 |
nsCAutoString correctedPassword; |
5817 |
EscapeUserNamePasswordString(password.get(), &correctedPassword); |
5817 |
EscapeUserNamePasswordString(password.get(), &correctedPassword); |
5818 |
command.Append(correctedPassword); |
5818 |
command.Append(correctedPassword); |
5819 |
command.Append("\""CRLF); |
5819 |
command.Append("\"" CRLF); |
5820 |
rv = SendData(command.get(), true /* suppress logging */); |
5820 |
rv = SendData(command.get(), true /* suppress logging */); |
5821 |
NS_ENSURE_SUCCESS(rv, rv); |
5821 |
NS_ENSURE_SUCCESS(rv, rv); |
5822 |
ParseIMAPandCheckForNewMail(); |
5822 |
ParseIMAPandCheckForNewMail(); |
Lines 7447-7453
Link Here
|
7447 |
nsCString command(GetServerCommandTag()); |
7447 |
nsCString command(GetServerCommandTag()); |
7448 |
command += " create \""; |
7448 |
command += " create \""; |
7449 |
command += escapedName; |
7449 |
command += escapedName; |
7450 |
command += "\""CRLF; |
7450 |
command += "\"" CRLF; |
7451 |
|
7451 |
|
7452 |
nsresult rv = SendData(command.get()); |
7452 |
nsresult rv = SendData(command.get()); |
7453 |
if(NS_SUCCEEDED(rv)) |
7453 |
if(NS_SUCCEEDED(rv)) |
Lines 7550-7556
Link Here
|
7550 |
nsCString command (GetServerCommandTag()); |
7550 |
nsCString command (GetServerCommandTag()); |
7551 |
command += " lsub \"\" \""; |
7551 |
command += " lsub \"\" \""; |
7552 |
command += escapedPattern; |
7552 |
command += escapedPattern; |
7553 |
command += "\""CRLF; |
7553 |
command += "\"" CRLF; |
7554 |
|
7554 |
|
7555 |
PR_Free(boxnameWithOnlineDirectory); |
7555 |
PR_Free(boxnameWithOnlineDirectory); |
7556 |
|
7556 |
|
Lines 7579-7585
Link Here
|
7579 |
command += useXLIST ? |
7579 |
command += useXLIST ? |
7580 |
" xlist \"\" \"" : " list \"\" \""; |
7580 |
" xlist \"\" \"" : " list \"\" \""; |
7581 |
command += escapedPattern; |
7581 |
command += escapedPattern; |
7582 |
command += "\""CRLF; |
7582 |
command += "\"" CRLF; |
7583 |
|
7583 |
|
7584 |
PR_Free(boxnameWithOnlineDirectory); |
7584 |
PR_Free(boxnameWithOnlineDirectory); |
7585 |
|
7585 |
|
Lines 7600-7606
Link Here
|
7600 |
nsCString command (GetServerCommandTag()); |
7600 |
nsCString command (GetServerCommandTag()); |
7601 |
command += " subscribe \""; |
7601 |
command += " subscribe \""; |
7602 |
command += escapedName; |
7602 |
command += escapedName; |
7603 |
command += "\""CRLF; |
7603 |
command += "\"" CRLF; |
7604 |
|
7604 |
|
7605 |
nsresult rv = SendData(command.get()); |
7605 |
nsresult rv = SendData(command.get()); |
7606 |
if (NS_SUCCEEDED(rv)) |
7606 |
if (NS_SUCCEEDED(rv)) |
Lines 7618-7624
Link Here
|
7618 |
nsCString command (GetServerCommandTag()); |
7618 |
nsCString command (GetServerCommandTag()); |
7619 |
command += " unsubscribe \""; |
7619 |
command += " unsubscribe \""; |
7620 |
command += escapedName; |
7620 |
command += escapedName; |
7621 |
command += "\""CRLF; |
7621 |
command += "\"" CRLF; |
7622 |
|
7622 |
|
7623 |
nsresult rv = SendData(command.get()); |
7623 |
nsresult rv = SendData(command.get()); |
7624 |
if (NS_SUCCEEDED(rv)) |
7624 |
if (NS_SUCCEEDED(rv)) |
Lines 7632-7638
Link Here
|
7632 |
if (m_urlInProgress) |
7632 |
if (m_urlInProgress) |
7633 |
return; |
7633 |
return; |
7634 |
nsCAutoString command (GetServerCommandTag()); |
7634 |
nsCAutoString command (GetServerCommandTag()); |
7635 |
command += " IDLE"CRLF; |
7635 |
command += " IDLE" CRLF; |
7636 |
nsresult rv = SendData(command.get()); |
7636 |
nsresult rv = SendData(command.get()); |
7637 |
if (NS_SUCCEEDED(rv)) |
7637 |
if (NS_SUCCEEDED(rv)) |
7638 |
{ |
7638 |
{ |
Lines 7659-7665
Link Here
|
7659 |
nsCOMPtr <nsIAsyncInputStream> asyncInputStream = do_QueryInterface(m_inputStream); |
7659 |
nsCOMPtr <nsIAsyncInputStream> asyncInputStream = do_QueryInterface(m_inputStream); |
7660 |
if (asyncInputStream) |
7660 |
if (asyncInputStream) |
7661 |
asyncInputStream->AsyncWait(nsnull, 0, 0, nsnull); |
7661 |
asyncInputStream->AsyncWait(nsnull, 0, 0, nsnull); |
7662 |
nsresult rv = SendData("DONE"CRLF); |
7662 |
nsresult rv = SendData("DONE" CRLF); |
7663 |
// set a short timeout if we don't want to wait for a response |
7663 |
// set a short timeout if we don't want to wait for a response |
7664 |
if (m_transport && !waitForResponse) |
7664 |
if (m_transport && !waitForResponse) |
7665 |
m_transport->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, 5); |
7665 |
m_transport->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, 5); |
Lines 7728-7735
Link Here
|
7728 |
PRUint32 msgsHandled = 0; |
7728 |
PRUint32 msgsHandled = 0; |
7729 |
const char *formatString; |
7729 |
const char *formatString; |
7730 |
formatString = (idsAreUid) |
7730 |
formatString = (idsAreUid) |
7731 |
? "%s uid store %s %s"CRLF |
7731 |
? "%s uid store %s %s" CRLF |
7732 |
: "%s store %s %s"CRLF; |
7732 |
: "%s store %s %s" CRLF; |
7733 |
|
7733 |
|
7734 |
do |
7734 |
do |
7735 |
{ |
7735 |
{ |