From f527940dbd350787472a394b4f9a794367cce9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giampaolo=20Rodol=C3=A0?= Date: Mon, 19 Apr 2010 22:10:56 +0000 Subject: Merged revisions 80228 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r80228 | giampaolo.rodola | 2010-04-20 00:05:54 +0200 (mar, 20 apr 2010) | 9 lines Merged revisions 80226 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80226 | giampaolo.rodola | 2010-04-19 23:46:28 +0200 (lun, 19 apr 2010) | 1 line Fix Issue #4841: timeout is now applied for connections resulting from PORT/EPRT commands ........ ................ --- Lib/ftplib.py | 4 ++++ Misc/NEWS | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Lib/ftplib.py b/Lib/ftplib.py index bcfa652..ea91c17 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -296,6 +296,8 @@ class FTP: resp = self.sendport(host, port) else: resp = self.sendeprt(host, port) + if self.timeout is not _GLOBAL_DEFAULT_TIMEOUT: + sock.settimeout(self.timeout) return sock def makepasv(self): @@ -348,6 +350,8 @@ class FTP: if resp[0] != '1': raise error_reply(resp) conn, sockaddr = sock.accept() + if self.timeout is not _GLOBAL_DEFAULT_TIMEOUT: + conn.settimeout(self.timeout) if resp[:3] == '150': # this is conditional in case we received a 125 size = parse150(resp) diff --git a/Misc/NEWS b/Misc/NEWS index 085edc0..8ae4a65 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -33,6 +33,9 @@ Core and Builtins Library ------- +- Issue #4814: timeout parameter is now applied also for connections resulting + from PORT/EPRT commands. + - Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code as stated in RFC-959 at chapter 5.4. -- cgit v0.12 efs/?id=5eaf1f41b17eb6f73420f1a9a5e48957015d2e4e'>refslogtreecommitdiffstats
path: root/doc/src/snippets/qsql-namespace/main.cpp
blob: 29facfda27b1e33d7b093bdcfb4eb3072e9076d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
**   * Redistributions of source code must retain the above copyright
**     notice, this list of conditions and the following disclaimer.
**   * Redistributions in binary form must reproduce the above copyright
**     notice, this list of conditions and the following disclaimer in
**     the documentation and/or other materials provided with the
**     distribution.
**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
**     the names of its contributors may be used to endorse or promote
**     products derived from this software without specific prior written
**     permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/

#include <QSql>

int main(int argc, char *argv[])
{
    return 0;
}