зеркало из https://github.com/mozilla/pjs.git
lower count, and remove printfs.
This commit is contained in:
Родитель
05d3858b4a
Коммит
007aa66aec
|
@ -95,7 +95,7 @@
|
||||||
#define PREF_NEWS_CANCEL_CONFIRM "news.cancel.confirm"
|
#define PREF_NEWS_CANCEL_CONFIRM "news.cancel.confirm"
|
||||||
#define PREF_NEWS_CANCEL_ALERT_ON_SUCCESS "news.cancel.alert_on_success"
|
#define PREF_NEWS_CANCEL_ALERT_ON_SUCCESS "news.cancel.alert_on_success"
|
||||||
#define DEFAULT_NEWS_CHUNK_SIZE -1
|
#define DEFAULT_NEWS_CHUNK_SIZE -1
|
||||||
#define READ_NEWS_LIST_COUNT_MAX 20 /* number of groups to process at a time when reading the list from the server */
|
#define READ_NEWS_LIST_COUNT_MAX 4 /* number of groups to process at a time when reading the list from the server */
|
||||||
|
|
||||||
// ***jt -- the following were pirated from xpcom/io/nsByteBufferInputStream
|
// ***jt -- the following were pirated from xpcom/io/nsByteBufferInputStream
|
||||||
// which is not currently in the build system
|
// which is not currently in the build system
|
||||||
|
@ -2932,9 +2932,6 @@ PRInt32 nsNNTPProtocol::ReadNewsList(nsIInputStream * inputStream, PRUint32 leng
|
||||||
nsresult
|
nsresult
|
||||||
nsNNTPProtocol::PostReadNewsListEvent(nsNNTPProtocol * aNNTPProtocol, nsIInputStream *aInputStream, PLHandleEventProc aHandler)
|
nsNNTPProtocol::PostReadNewsListEvent(nsNNTPProtocol * aNNTPProtocol, nsIInputStream *aInputStream, PLHandleEventProc aHandler)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("PostReadNewsListEvent()\n");
|
|
||||||
#endif
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
nsCOMPtr<nsIEventQueueService> svc = do_GetService(kEventQueueServiceCID, &rv);
|
nsCOMPtr<nsIEventQueueService> svc = do_GetService(kEventQueueServiceCID, &rv);
|
||||||
|
@ -2979,9 +2976,6 @@ nsNNTPProtocol::PostReadNewsListEvent(nsNNTPProtocol * aNNTPProtocol, nsIInputSt
|
||||||
void*
|
void*
|
||||||
nsNNTPProtocol::HandleReadNewsListEvent(PLEvent* aEvent)
|
nsNNTPProtocol::HandleReadNewsListEvent(PLEvent* aEvent)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("HandleReadNewsListEvent()\n");
|
|
||||||
#endif
|
|
||||||
ReadNewsListEvent* event = NS_REINTERPRET_CAST(ReadNewsListEvent*, aEvent);
|
ReadNewsListEvent* event = NS_REINTERPRET_CAST(ReadNewsListEvent*, aEvent);
|
||||||
nsNNTPProtocol* aNNTPProtocol = event->mNNTPProtocol;
|
nsNNTPProtocol* aNNTPProtocol = event->mNNTPProtocol;
|
||||||
|
|
||||||
|
@ -2994,9 +2988,6 @@ nsNNTPProtocol::HandleReadNewsListEvent(PLEvent* aEvent)
|
||||||
void
|
void
|
||||||
nsNNTPProtocol::DestroyReadNewsListEvent(PLEvent* aEvent)
|
nsNNTPProtocol::DestroyReadNewsListEvent(PLEvent* aEvent)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("DestroyReadNewsListEvent()\n");
|
|
||||||
#endif
|
|
||||||
ReadNewsListEvent* event = NS_REINTERPRET_CAST(ReadNewsListEvent*, aEvent);
|
ReadNewsListEvent* event = NS_REINTERPRET_CAST(ReadNewsListEvent*, aEvent);
|
||||||
NS_RELEASE(event->mNNTPProtocol);
|
NS_RELEASE(event->mNNTPProtocol);
|
||||||
NS_RELEASE(event->mInputStream);
|
NS_RELEASE(event->mInputStream);
|
||||||
|
|
|
@ -519,9 +519,6 @@ nsNntpIncomingServer::SetNewsgroupAsSubscribed(const char *aName)
|
||||||
NS_ASSERTION(aName,"newsgroup with no name");
|
NS_ASSERTION(aName,"newsgroup with no name");
|
||||||
if (!aName) return NS_ERROR_FAILURE;
|
if (!aName) return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("SetNewsgroupAsSubscribed(%s)\n",aName);
|
|
||||||
#endif
|
|
||||||
nsXPIDLCString serverUri;
|
nsXPIDLCString serverUri;
|
||||||
|
|
||||||
rv = GetServerURI(getter_Copies(serverUri));
|
rv = GetServerURI(getter_Copies(serverUri));
|
||||||
|
@ -604,9 +601,6 @@ nsNntpIncomingServer::AddNewNewsgroup(const char *aName)
|
||||||
|
|
||||||
nsCOMPtr<nsIRDFResource> newsgroupResource;
|
nsCOMPtr<nsIRDFResource> newsgroupResource;
|
||||||
rv = rdfService->GetResource((const char *) groupUri, getter_AddRefs(newsgroupResource));
|
rv = rdfService->GetResource((const char *) groupUri, getter_AddRefs(newsgroupResource));
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("child=%s\n",(const char *)groupUri);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nsCOMPtr<nsIRDFLiteral> nameLiteral;
|
nsCOMPtr<nsIRDFLiteral> nameLiteral;
|
||||||
nsAutoString nameString; nameString.AssignWithConversion(aName);
|
nsAutoString nameString; nameString.AssignWithConversion(aName);
|
||||||
|
@ -647,16 +641,10 @@ nsNntpIncomingServer::AddNewNewsgroup(const char *aName)
|
||||||
if (dotpos > slashpos) {
|
if (dotpos > slashpos) {
|
||||||
groupUri.Truncate(dotpos);
|
groupUri.Truncate(dotpos);
|
||||||
|
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("parent=%s\n\n",(const char *)groupUri);
|
|
||||||
#endif
|
|
||||||
rv = rdfService->GetResource((const char *)groupUri, getter_AddRefs(parent));
|
rv = rdfService->GetResource((const char *)groupUri, getter_AddRefs(parent));
|
||||||
if(NS_FAILED(rv)) return rv;
|
if(NS_FAILED(rv)) return rv;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef DEBUG_sspitzer
|
|
||||||
printf("parent=%s\n\n",(const char *)serverUri);
|
|
||||||
#endif
|
|
||||||
rv = rdfService->GetResource((const char *)serverUri, getter_AddRefs(parent));
|
rv = rdfService->GetResource((const char *)serverUri, getter_AddRefs(parent));
|
||||||
if(NS_FAILED(rv)) return rv;
|
if(NS_FAILED(rv)) return rv;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче