Subversion Repositories tpanel

Rev

Rev 235 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 235 Rev 264
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (C) 2022 by Andreas Theofilu <andreas@theosys.at>
2
 * Copyright (C) 2022 to 2023 by Andreas Theofilu <andreas@theosys.at>
3
 *
3
 *
4
 * This program is free software; you can redistribute it and/or modify
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
6
 * the Free Software Foundation; either version 3 of the License, or
7
 * (at your option) any later version.
7
 * (at your option) any later version.
Line 37... Line 37...
37
#include <netinet/in.h>
37
#include <netinet/in.h>
38
#include <netdb.h>
38
#include <netdb.h>
39
#include <arpa/inet.h>
39
#include <arpa/inet.h>
40
 
40
 
41
#include "tfsfreader.h"
41
#include "tfsfreader.h"
42
#include "tsocket.h"
-
 
43
#include "tconfig.h"
42
#include "tconfig.h"
44
#include "terror.h"
43
#include "terror.h"
45
#include "tresources.h"
-
 
46
#include "readtp4.h"
44
#include "readtp4.h"
47
 
45
 
48
#if __cplusplus < 201402L
46
#if __cplusplus < 201402L
49
#   error "This module requires at least C++ 14 standard!"
47
#   error "This module requires at least C++ 14 standard!"
50
#else
48
#else
Line 129... Line 127...
129
        mFtpLib->SetConnmode(ftplib::port);
127
        mFtpLib->SetConnmode(ftplib::port);
130
 
128
 
131
    mFtpLib->SetCallbackLogFunction(&TFsfReader::callbackLog);      // Print some debugging messages
129
    mFtpLib->SetCallbackLogFunction(&TFsfReader::callbackLog);      // Print some debugging messages
132
    mFtpLib->SetCallbackErrorFunction(&TFsfReader::callbackError);  // Print errors or info's
130
    mFtpLib->SetCallbackErrorFunction(&TFsfReader::callbackError);  // Print errors or info's
133
    mFtpLib->SetCallbackXferFunction(&TFsfReader::callbackXfer);    // This is the progress
131
    mFtpLib->SetCallbackXferFunction(&TFsfReader::callbackXfer);    // This is the progress
134
    mFtpLib->SetCallbackBytes(10000L);                              // This tells the progress to be called every 10KiB
132
    mFtpLib->SetCallbackBytes(10000L);                              // This tells the progress to be called every 10Kb
135
    string scon = TConfig::getController() + ":21";
133
    string scon = TConfig::getController() + ":21";
136
    MSG_DEBUG("Trying to connect to " << scon);
134
    MSG_DEBUG("Trying to connect to " << scon);
137
 
135
 
138
    if (!mFtpLib->Connect(scon.c_str()))
136
    if (!mFtpLib->Connect(scon.c_str()))
139
    {
137
    {