Federico Cuello
1f89c037b9
fix compile warning: -Wunused-variable
...
Don't define variables only used for debuggin when debug is not enabled.
2018-12-21 15:01:00 +01:00
Federico Cuello
20036b73b8
fix compile warning: -Wformat
...
Use macros defined in inttypes.h for the proper format for 64 bit types
and fall-back to previously define format when inttypes.h is not
available.
2018-12-21 14:56:55 +01:00
Andrey Prygunkov
0ee60ab844
#466 : keep log-file longer open
...
that improve logging performance especially in debug build
2017-11-06 22:18:40 +01:00
Andrey Prygunkov
7deb3c1b68
#461 : renamed option "LogBufferSize" to "LogBuffer"
...
and removed obsolete options “SaveQueue” and “ReloadQueue” from
config-file
2017-10-29 13:07:00 +01:00
Andrey Prygunkov
1214c79eab
correction in debug logging
...
which could cause crash on shutdown in debug mode
2017-07-31 18:02:24 +02:00
Andrey Prygunkov
5948729b87
#185 : guarded containers
...
Using guarded lists to automatically unlock containers.
2016-03-18 21:45:29 +01:00
Andrey Prygunkov
f973388879
#185 : use guards with private mutexes
...
Use guard objects to automatically unlock private mutexes when leaving
current scope.
2016-03-16 22:37:19 +01:00
Andrey Prygunkov
f3f7fbd0de
#176 : updated copyright notice in source files
...
- added link to http://nzbget.net ;
- replaced FSF Post address with a web link;
- removed unusable subversion-tags;
- updated year.
2016-03-01 19:45:07 +01:00
Andrey Prygunkov
bfa5027bf9
#175 : in-class member initializers
2016-02-28 19:53:37 +01:00
Andrey Prygunkov
9da07e1e54
#168 : unique smart pointers for global variables
...
and restructured main module “nzbget.cpp”
2016-02-17 22:03:33 +01:00
Andrey Prygunkov
b32b4c0691
#152 : for-range loops with iterators
2016-01-12 00:30:17 +01:00
Andrey Prygunkov
81f2c7825d
#143 : store Message directly in container
...
…instead of pointer to object.
2016-01-03 20:49:30 +01:00
Andrey Prygunkov
69c995359b
#126 : time formatting functions
2016-01-01 15:56:53 +01:00
Andrey Prygunkov
3e89638b39
refactor: replaced "time(NULL)" with an utility function
2016-01-01 14:57:48 +01:00
Andrey Prygunkov
04c3e0d263
#138 : use "nullptr" instead of "NULL"
2015-12-30 16:35:07 +01:00
Andrey Prygunkov
e11dfb62d0
#136 : Unicode-Windows-API for file operations
...
- internally all paths are handled in UTF8;
- all paths are stored in config-file in UTF8;
- when calling file access Windows API functions the paths are
converted to wide-chars and Unicode-API is used;
- extra long paths are prefixed with “\\?\” (extended path format).
2015-12-28 10:56:11 +01:00
Andrey Prygunkov
c68ba306fe
#131 : using enum for file mode in function DiskFile::Open
2015-12-26 17:19:12 +01:00
Andrey Prygunkov
6840ef4439
#131 : routing a few more remaining function calls through module "FileSystem"
...
“rename”, “remove” and “rmdir”.
2015-12-25 22:55:46 +01:00
Andrey Prygunkov
dce6f0c9a3
#131 : new class DiskFile to wrap "FILE*"-functions
2015-12-25 18:11:50 +01:00
Andrey Prygunkov
eae6fd5d91
#131 : wrapped function "remove" into module FileSystem
...
under name “DeleteFile”.
2015-12-24 18:34:15 +01:00
Andrey Prygunkov
321c7efa41
#130 : moved parts from module "Util" into new module "FileSystem"
2015-12-22 22:01:03 +01:00
Andrey Prygunkov
99d8cee0db
#126 : class BString supports initialization via assignment
...
which makes the code clearer.
2015-12-20 23:46:22 +01:00
Andrey Prygunkov
d87d6ac2ac
#126 : using CString for ref-parameters and return values
...
1) for parameters use references to CString instead of pointers to
buffers;
2) when returning strings use CString instead of pointer to char buffer
which caller needs to deallocate;
3) use BString even more.
2015-12-20 16:27:01 +01:00
Andrey Prygunkov
9e2d8544da
#126 : full use of class BString
...
1) replaced characters arrays with class BString through the whole
program. The string formatting code has become much cleaner.
2) class Util returns error message via CString instead of character
buffers.
3) few more places to use CString.
2015-12-19 18:43:52 +01:00
Andrey Prygunkov
17d3e05e16
#126 : update project file for Windows
...
and fixed a few warnings.
2015-12-13 17:09:52 +01:00
Andrey Prygunkov
558fce9b47
#126 : replaced C-style strings with class "CString"
...
: replaced all data members.
2015-12-12 16:36:25 +01:00
Andrey Prygunkov
4e4816c3c8
#116 : use size specific integer types
2015-11-21 00:02:22 +01:00
Andrey Prygunkov
ec17d119a1
#115 : put all external headers together
...
into “nzbget.h”
2015-11-19 23:51:02 +01:00
Andrey Prygunkov
70ccfd9802
normalized whitespace formatting
...
1) removed trailing spaces and tabs;
2) replaced occasional leading spaces with tabs.
2015-11-05 23:45:19 +01:00
Andrey Prygunkov
bf49f16d7c
#103 : renamed global variables
2015-11-01 21:42:35 +01:00
Andrey Prygunkov
5adb50274e
#103 : renamed local, member variables and function parameters
2015-10-27 22:37:23 +01:00
Andrey Prygunkov
6b8c27fdcc
#61 : 860f05eb70: fixed: crash in debug mode when reloading
2015-08-02 00:57:39 +02:00
Andrey Prygunkov
860f05eb70
fixed #61 : config error messages were not printed to log or screen
...
but only to stdout, where users typically don’t see them.
2015-07-25 14:45:44 +02:00
Andrey Prygunkov
31a7e133fa
refactor: moved initialization of logging from main module into module "Log"; removed (now unused) global function "abort"
2015-05-21 10:55:06 +00:00
Andrey Prygunkov
7e6f8f19eb
each nzb now has its own individual log, where messages printed during download or post-processing are saved; the messages can be retrieved later at any time; new button "Log" in the history details dialog; button "Log" in the download details dialog is now active during download too (not only during post-processing); the log contains all nzb-related messages except detail-messages and errors printed during retrieving of articles (they would produce way too many messages and are not that useful anyway); new option "NzbLog" to deactivate per-nzb logging if necessary; per-nzb logs are saved in the queue-directory (option "QueueDir"); new RPC-method "loadlog" returns the previously saved messages for a given nzb-file; new field "MessageCount" is returned by RPC-methods "listgroups" and "history" and indicates if there are any messages saved for the item; parameter "NumberOfLogEntries" of RPC-method "listgroups" and the field "Log" returned by the method are now deprecated, use method "loadlag" instead; field "PostInfoText" returned by RPC-method "listgroups" is now automatically filled with the latest message printed by a pp-script eliminating the need to access deprecated field "Log"
2015-02-26 20:57:38 +00:00
Andrey Prygunkov
79426ec959
fixed: when rotating log-files option TimeCorrection were not respected when bulding new file name - the filename could have wrong date stamp in the name (bug introduced in r1059)
2014-08-09 10:42:13 +00:00
Andrey Prygunkov
39d9fe2794
added log file rotation; options "CreateLog" and "ResetLog" replaced with new option "WriteLog (none, append, reset, rotate)"; new option "RotateLog" defines rotation period; when compiled in debug mode new field "process id" is printed to the file log for each row (it is easier to identify processes than threads)
2014-07-18 23:17:16 +00:00
Andrey Prygunkov
8c36a4d4c6
fixed: renaming or deleting of temporary files could fail, especially when options "UnpackPauseQueue" and "ScriptPauseQueue" were not active (windows only)
2014-05-22 16:58:16 +00:00
Andrey Prygunkov
8d3afa0bb6
remote command "-B dump" now can be used also in release (non-debug) versions and prints useful debug data as "INFO" instead of "DEBUG"
2014-03-20 21:18:27 +00:00
Andrey Prygunkov
3fd7bbc0a3
refactor: reducing dependencies between modules
2014-03-20 21:14:39 +00:00
Andrey Prygunkov
8168804f05
reorganized source code directory structure: created directory 'daemon' with several subdirectories and put all source code files there
2014-02-24 22:11:14 +00:00