mirror of
https://github.com/nzbget/nzbget.git
synced 2026-01-03 11:37:46 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64abcbb577 |
@@ -1,11 +1,3 @@
|
||||
nzbget-14.2:
|
||||
- fixed: the program could crash during download when article cache was
|
||||
active (more likely on very high download speeds);
|
||||
- fixed: unlike to all other scripts the update-script should not be
|
||||
automatically terminated when the program quits;
|
||||
- fixed: XML-RPC method "history" returned invalid xml when used with
|
||||
parameter "hidden=true" (JSON-RPC was fine).
|
||||
|
||||
nzbget-14.1:
|
||||
- fixed: program could crash during unpack (Posix) or unpack failure
|
||||
was reported (Windows);
|
||||
|
||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for nzbget 14.2.
|
||||
# Generated by GNU Autoconf 2.61 for nzbget 14.1.
|
||||
#
|
||||
# Report bugs to <hugbug@users.sourceforge.net>.
|
||||
#
|
||||
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='nzbget'
|
||||
PACKAGE_TARNAME='nzbget'
|
||||
PACKAGE_VERSION='14.2'
|
||||
PACKAGE_STRING='nzbget 14.2'
|
||||
PACKAGE_VERSION='14.1'
|
||||
PACKAGE_STRING='nzbget 14.1'
|
||||
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
|
||||
|
||||
ac_unique_file="daemon/main/nzbget.cpp"
|
||||
@@ -1233,7 +1233,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures nzbget 14.2 to adapt to many kinds of systems.
|
||||
\`configure' configures nzbget 14.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1304,7 +1304,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of nzbget 14.2:";;
|
||||
short | recursive ) echo "Configuration of nzbget 14.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1435,7 +1435,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
nzbget configure 14.2
|
||||
nzbget configure 14.1
|
||||
generated by GNU Autoconf 2.61
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1449,7 +1449,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by nzbget $as_me 14.2, which was
|
||||
It was created by nzbget $as_me 14.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2245,7 +2245,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=nzbget
|
||||
VERSION=14.2
|
||||
VERSION=14.1
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -10756,7 +10756,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by nzbget $as_me 14.2, which was
|
||||
This file was extended by nzbget $as_me 14.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -10809,7 +10809,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
nzbget config.status 14.2
|
||||
nzbget config.status 14.1
|
||||
configured by $0, generated by GNU Autoconf 2.61,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(nzbget, 14.2, hugbug@users.sourceforge.net)
|
||||
AC_INIT(nzbget, 14.1, hugbug@users.sourceforge.net)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(nzbget, 14.2)
|
||||
AM_INIT_AUTOMAKE(nzbget, 14.1)
|
||||
AC_CONFIG_SRCDIR([daemon/main/nzbget.cpp])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of nzbget
|
||||
*
|
||||
* Copyright (C) 2013-2015 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
||||
* Copyright (C) 2013-2014 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -229,9 +229,6 @@ bool Maintenance::ReadPackageInfoStr(const char* szKey, char** pValue)
|
||||
|
||||
void UpdateScriptController::Run()
|
||||
{
|
||||
// the update-script should not be automatically terminated when the program quits
|
||||
UnregisterRunningScript();
|
||||
|
||||
m_iPrefixLen = 0;
|
||||
PrintMessage(Message::mkInfo, "Executing update-script %s", GetScript());
|
||||
|
||||
|
||||
@@ -627,7 +627,14 @@ void ArticleWriter::CompleteFileParts()
|
||||
|
||||
void ArticleWriter::FlushCache()
|
||||
{
|
||||
detail("Flushing cache for %s", m_szInfoName);
|
||||
char szInfoFilename[1024];
|
||||
// the locking is needed for accessing the members of NZBInfo
|
||||
DownloadQueue::Lock();
|
||||
snprintf(szInfoFilename, 1024, "%s%c%s", m_pFileInfo->GetNZBInfo()->GetName(), (int)PATH_SEPARATOR, m_pFileInfo->GetFilename());
|
||||
szInfoFilename[1024-1] = '\0';
|
||||
DownloadQueue::Unlock();
|
||||
|
||||
detail("Flushing cache for %s", szInfoFilename);
|
||||
|
||||
bool bDirectWrite = g_pOptions->GetDirectWrite() && m_pFileInfo->GetOutputInitialized();
|
||||
FILE* outfile = NULL;
|
||||
@@ -729,7 +736,7 @@ void ArticleWriter::FlushCache()
|
||||
|
||||
g_pArticleCache->UnlockFlush();
|
||||
|
||||
detail("Saved %i articles (%.2f MB) from cache into disk for %s", iFlushedArticles, (float)(iFlushedSize / 1024.0 / 1024.0), m_szInfoName);
|
||||
detail("Saved %i articles (%.2f MB) from cache into disk for %s", iFlushedArticles, (float)(iFlushedSize / 1024.0 / 1024.0), szInfoFilename);
|
||||
}
|
||||
|
||||
bool ArticleWriter::MoveCompletedFiles(NZBInfo* pNZBInfo, const char* szOldDestDir)
|
||||
@@ -962,8 +969,6 @@ bool ArticleCache::CheckFlush(bool bFlushEverything)
|
||||
{
|
||||
debug("Checking cache, Allocated: %i, FlushEverything: %i", m_iAllocated, (int)bFlushEverything);
|
||||
|
||||
char szInfoName[1024];
|
||||
|
||||
DownloadQueue* pDownloadQueue = DownloadQueue::Lock();
|
||||
for (NZBList::iterator it = pDownloadQueue->GetQueue()->begin(); it != pDownloadQueue->GetQueue()->end() && !m_pFileInfo; it++)
|
||||
{
|
||||
@@ -974,8 +979,6 @@ bool ArticleCache::CheckFlush(bool bFlushEverything)
|
||||
if (pFileInfo->GetCachedArticles() > 0 && (pFileInfo->GetActiveDownloads() == 0 || bFlushEverything))
|
||||
{
|
||||
m_pFileInfo = pFileInfo;
|
||||
snprintf(szInfoName, 1024, "%s%c%s", m_pFileInfo->GetNZBInfo()->GetName(), (int)PATH_SEPARATOR, m_pFileInfo->GetFilename());
|
||||
szInfoName[1024-1] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -986,7 +989,6 @@ bool ArticleCache::CheckFlush(bool bFlushEverything)
|
||||
{
|
||||
ArticleWriter* pArticleWriter = new ArticleWriter();
|
||||
pArticleWriter->SetFileInfo(m_pFileInfo);
|
||||
pArticleWriter->SetInfoName(szInfoName);
|
||||
pArticleWriter->FlushCache();
|
||||
delete pArticleWriter;
|
||||
m_pFileInfo = NULL;
|
||||
|
||||
@@ -782,11 +782,6 @@ void QueueCoordinator::StatFileInfo(FileInfo* pFileInfo, bool bCompleted)
|
||||
|
||||
void QueueCoordinator::DeleteFileInfo(DownloadQueue* pDownloadQueue, FileInfo* pFileInfo, bool bCompleted)
|
||||
{
|
||||
while (g_pArticleCache->FileBusy(pFileInfo))
|
||||
{
|
||||
usleep(5*1000);
|
||||
}
|
||||
|
||||
bool fileDeleted = pFileInfo->GetDeleted();
|
||||
pFileInfo->SetDeleted(true);
|
||||
|
||||
@@ -990,6 +985,11 @@ bool QueueCoordinator::DeleteQueueEntry(DownloadQueue* pDownloadQueue, FileInfo*
|
||||
}
|
||||
}
|
||||
|
||||
while (g_pArticleCache->FileBusy(pFileInfo))
|
||||
{
|
||||
usleep(20*1000);
|
||||
}
|
||||
|
||||
if (!bDownloading)
|
||||
{
|
||||
DeleteFileInfo(pDownloadQueue, pFileInfo, false);
|
||||
|
||||
@@ -2539,7 +2539,8 @@ void HistoryXmlCommand::Execute()
|
||||
"<member><name>DupeScore</name><value><i4>%i</i4></value></member>\n"
|
||||
"<member><name>DupeMode</name><value><string>%s</string></value></member>\n"
|
||||
"<member><name>DupStatus</name><value><string>%s</string></value></member>\n"
|
||||
"<member><name>Status</name><value><string>%s</string></value></member>\n";
|
||||
"<member><name>Status</name><value><string>%s</string></value></member>\n"
|
||||
"</struct></value>\n";
|
||||
|
||||
const char* JSON_HISTORY_DUP_ITEM =
|
||||
"{\n"
|
||||
|
||||
@@ -220,11 +220,6 @@ ScriptController::~ScriptController()
|
||||
free(m_szArgs);
|
||||
}
|
||||
|
||||
UnregisterRunningScript();
|
||||
}
|
||||
|
||||
void ScriptController::UnregisterRunningScript()
|
||||
{
|
||||
m_mutexRunning.Lock();
|
||||
m_RunningScripts.erase(std::find(m_RunningScripts.begin(), m_RunningScripts.end(), this));
|
||||
m_mutexRunning.Unlock();
|
||||
|
||||
@@ -85,7 +85,6 @@ protected:
|
||||
void ResetEnv();
|
||||
void PrepareEnvOptions(const char* szStripPrefix);
|
||||
void PrepareArgs();
|
||||
void UnregisterRunningScript();
|
||||
|
||||
public:
|
||||
ScriptController();
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
/* Define to 1 if spinlocks are supported */
|
||||
#define HAVE_SPINLOCK
|
||||
|
||||
#define VERSION "14.2"
|
||||
#define VERSION "14.1"
|
||||
|
||||
/* Suppress warnings */
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
Reference in New Issue
Block a user