~ubuntu-branches/debian/experimental/nzbget/experimental

« back to all changes in this revision

Viewing changes to NewsServer.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Moog
  • Date: 2013-07-18 14:50:28 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130718145028-qhxse81w1sj5w424
Tags: 11.0+dfsg-1
* New upstream release (Closes: #701896)
* Repackage original tarball to remove copies of jquery and twitter-
  bootstrap
* debian/watch: Update for new versioning scheme
* debian/patches: Remove all old patches, add one patch:
  - dont-embed-libraries.patch: Don't install embedded jquery and bootstrap 
    libraries
* debian/combat: Upgrade to debhelper combat 9
* debian/control:
  - Fix Vcs-Git field
  - Adjust debhelper version for combat level 9
  - Add jquery and bootstrap to depends for integrated webserver
  - Add python to recommends for post-processing scripts
  - Bump build-depends on libpar2-dev to support the cancel function
* debian/links:
  - Use the system jquery and bootstrap libraries
* debian/rules:
  - Add get-orig-source target to build modified upstream tarball
* Adjust sample nzbget.conf:
  - Only listen to 127.0.0.1 instead of 0.0.0.0
  - Use nzbget.conf as template for webui configuration
* Adjust sample nzbgetd init file:
  - Point to correct location of nzbget binary

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  This file if part of nzbget
3
3
 *
4
4
 *  Copyright (C) 2004 Sven Henkel <sidddy@users.sourceforge.net>
5
 
 *  Copyright (C) 2007-2008 Andrei Prygounkov <hugbug@users.sourceforge.net>
 
5
 *  Copyright (C) 2007-2008 Andrey Prygunkov <hugbug@users.sourceforge.net>
6
6
 *
7
7
 *  This program is free software; you can redistribute it and/or modify
8
8
 *  it under the terms of the GNU General Public License as published by
18
18
 *  along with this program; if not, write to the Free Software
19
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
20
 *
21
 
 * $Revision: 198 $
22
 
 * $Date: 2008-07-29 22:32:23 +0200 (Tue, 29 Jul 2008) $
 
21
 * $Revision: 602 $
 
22
 * $Date: 2013-03-17 13:21:46 +0100 (Sun, 17 Mar 2013) $
23
23
 *
24
24
 */
25
25
 
26
26
 
27
27
#ifdef HAVE_CONFIG_H
28
 
#include <config.h>
 
28
#include "config.h"
29
29
#endif
30
30
 
31
31
#ifdef WIN32
37
37
 
38
38
#include "nzbget.h"
39
39
#include "NewsServer.h"
40
 
#include "Log.h"
41
40
 
42
 
NewsServer::NewsServer(const char* szHost, int iPort, const char* szUser, const char* szPass, bool bJoinGroup, bool bTLS, int iMaxConnections, int iLevel) : NetAddress(szHost, iPort)
 
41
NewsServer::NewsServer(int iID, const char* szHost, int iPort, const char* szUser, const char* szPass, bool bJoinGroup,
 
42
        bool bTLS, const char* szCipher, int iMaxConnections, int iLevel, int iGroup)
43
43
{
 
44
        m_iID = iID;
 
45
        m_szHost = NULL;
 
46
        m_iPort = iPort;
44
47
        m_szUser = NULL;
45
48
        m_szPassword = NULL;
46
49
        m_iLevel = iLevel;
 
50
        m_iGroup = iGroup;
47
51
        m_iMaxConnections = iMaxConnections;
48
52
        m_bJoinGroup = bJoinGroup;
49
53
        m_bTLS = bTLS;
50
 
 
51
 
        if (szUser)
52
 
        {
53
 
                m_szUser = strdup(szUser);
54
 
        }
55
 
        if (szPass)
56
 
        {
57
 
                m_szPassword = strdup(szPass);
58
 
        }
 
54
        m_szHost = szHost ? strdup(szHost) : NULL;
 
55
        m_szUser = szUser ? strdup(szUser) : NULL;
 
56
        m_szPassword = szPass ? strdup(szPass) : NULL;
 
57
        m_szCipher = szCipher ? strdup(szCipher) : NULL;
59
58
}
60
59
 
61
60
NewsServer::~NewsServer()
62
61
{
 
62
        if (m_szHost)
 
63
        {
 
64
                free(m_szHost);
 
65
        }
63
66
        if (m_szUser)
64
67
        {
65
68
                free(m_szUser);
68
71
        {
69
72
                free(m_szPassword);
70
73
        }
 
74
        if (m_szCipher)
 
75
        {
 
76
                free(m_szCipher);
 
77
        }
71
78
}