Changeset 1289 for TI05-delivery


Ignore:
Timestamp:
10/07/06 14:54:57 (13 years ago)
Author:
spascoe
Message:

Updated python code to reflect the renaming of the delivery package to pybbftp.
Some C tidying to reduce compiler warnings.

Location:
TI05-delivery/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/examples/deliveryclient.py

    r1280 r1289  
    1717sys.path.append(BUILDDIR) 
    1818 
    19 import delivery.client as DC 
     19import pybbftp.client as DC 
    2020 
    2121class AuthClientHandler(DC.AuthClientHandler): 
  • TI05-delivery/trunk/examples/deliveryd.py

    r1269 r1289  
    1111HOME = os.path.abspath(os.getenv('NDG_DELIVERY_HOME', os.curdir)) 
    1212BUILDDIR = glob('%s/build/lib.*' % HOME)[0] 
    13 BBFTP = glob('%s/src/bbftp-client*/bbftpc/bbftp' % HOME)[0] 
    1413DATADIR = '%s/test/data' % HOME 
    1514VERSION = open('%s/VERSION' % HOME).read() 
     
    2019sys.path.append(BUILDDIR) 
    2120 
    22 import delivery.server as server 
     21import pybbftp.server as server 
    2322 
    2423 
  • TI05-delivery/trunk/lib/python/pybbftp/client.py

    r1288 r1289  
    99 
    1010import sys 
    11 if sys.modules.has_key('delivery.bbftpd') and not sys.modules.has_key('epydoc'): 
    12     raise ImportError, "delivery.bbftpd extension already loaded.  You cannot use both client and server extensions together" 
     11if sys.modules.has_key('pybbftp.bbftpd') and not sys.modules.has_key('epydoc'): 
     12    raise ImportError, "pybbftp.bbftpd extension already loaded.  You cannot use both client and server extensions together" 
    1313 
    1414import bbftpc 
  • TI05-delivery/trunk/lib/python/pybbftp/server.py

    r1288 r1289  
    1313#       However if the module is being scanned by epydoc allow the import (This is a hack!) 
    1414import sys 
    15 if sys.modules.has_key('delivery.bbftpc') and not sys.modules.has_key('epydoc'): 
    16     raise ImportError, "delivery.bbftpc extension already loaded.  You cannot use both client and server extensions together" 
     15if sys.modules.has_key('pybbftp.bbftpc') and not sys.modules.has_key('epydoc'): 
     16    raise ImportError, "pybbftp.bbftpc extension already loaded.  You cannot use both client and server extensions together" 
    1717 
    1818import bbftpd 
  • TI05-delivery/trunk/setup.py

    r1281 r1289  
    9797 
    9898    def run(self): 
    99         cmd = 'epydoc -o doc/epydoc -v --docformat javadoc --name "NDG Delivery Service" build/lib*/delivery/' 
     99        cmd = ('epydoc -o doc/epydoc -v --docformat javadoc ' 
     100               '--name "NDG Delivery Service" build/lib*/pybbftp/') 
    100101        self.execute(os.system, (cmd,)) 
    101102        self.execute(os.system, ('doxygen',)) 
     
    117118 
    118119 
    119 bbftpd = Extension('delivery.bbftpd', 
     120bbftpd = Extension('pybbftp.bbftpd', 
    120121                   define_macros = [('NDG_AUTH', 1), ('LOCAL_SYSLOG_FACILITY', 1), 
    121122                                    ('_LARGEFILE64_SOURCE', 1), 
     
    124125                   include_dirs = [bbftpd_home+'/includes', bbftpd_home+'/bbftpd'], 
    125126                   libraries = ['crypt', 'crypto'], 
    126                    extra_compile_args = ["-O1"], 
     127                   extra_compile_args = ["-O1", "-Wno-strict-prototypes"], 
    127128                   sources = server_sources) 
    128129 
    129 bbftpc = Extension('delivery.bbftpc', 
     130bbftpc = Extension('pybbftp.bbftpc', 
    130131                   define_macros = [('NDG_AUTH', 1), ('LOCAL_SYSLOG_FACILITY', 1), 
    131132                                    ('_LARGEFILE64_SOURCE', 1), 
     
    134135                   include_dirs = [bbftpc_home+'/includes', bbftpc_home+'/bbftpc'], 
    135136                   libraries = ['crypt', 'crypto'], 
    136                    extra_compile_args = ["-O1"], 
     137                   extra_compile_args = ["-O1", "-Wno-strict-prototypes"], 
    137138                   sources = client_sources) 
    138139 
     
    143144      author_email = 'S.Pascoe@rl.ac.uk', 
    144145      package_dir = {'': 'lib/python'}, 
    145       packages = ['delivery'], 
     146      packages = ['pybbftp'], 
    146147      ext_modules = [ 
    147148                     bbftpd, 
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/bbftpc/bbftp_private_user.c

    r1265 r1289  
    2828*****************************************************************************/ 
    2929#include <stdio.h> 
     30#include <stdlib.h> 
    3031 
    3132#include <bbftp_private_user.h> 
    3233#include <client.h> 
    3334 
    34 #ifdef NDG_PRIVATE_AUTH 
     35#ifdef NDG_AUTH 
    3536int ndg_client_auth(char *logmessage); 
    3637#endif // NDG_PRIVATE_AUTH 
     
    5152void PRINTMESSAGE(FILE *strm , int flag, int errcode, int tok, char *fmt, ...); 
    5253 
    53  
     54#ifndef NDG_PYTHON_EMBED 
    5455/* prototypes */ 
    5556static int ndg_message_recv(char **buffer, int *length, char *logmessage); 
    5657static int ndg_message_send(char *buffer, int length, char *logmessage); 
     58#endif 
    5759 
    5860/******************************************************************************* 
     
    134136int bbftp_private_auth(char *logmessage)  
    135137{ 
     138 
     139#ifdef NDG_PYTHON_EMBED 
     140  return ndg_client_auth(logmessage); 
     141#else 
    136142  char *msg; 
    137143  char default_privatestr[] = "none"; 
    138144  int len; 
    139  
    140 #ifdef NDG_PYTHON_EMBED 
    141   return ndg_client_auth(logmessage); 
    142 #else 
    143145 
    144146  /* Send version verification message.  */ 
     
    171173} 
    172174 
     175 
     176 
     177#ifndef NDG_PYTHON_EMBED 
    173178/* 
    174179 * Higher level message transfer functions. 
     
    230235  return 0; 
    231236} 
    232    
     237 
     238#endif // !NDG_PYTHON_EMBED 
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/includes/ndg_client.h

    r1271 r1289  
    1616#define NDG_MESSAGE_LEN 256 
    1717 
     18/* From bbftp_private.c */ 
     19int bbftp_private_recv(char *buffertorecv, int lengthtorecv, char *logmessage); 
     20int bbftp_private_send(char *buffertosend, int buffertosendlength, char *logmessage); 
    1821 
    1922int ndg_client_message_send(char *buffer, int length, char *logmessage); 
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/bbftpd.c

    r1117 r1289  
    389389 
    390390#ifdef NDG_PYTHON_EMBED 
    391 int bbftpd_main (argc, argv, envp) 
     391int bbftpd_main (int argc, char **argv, char **envp) 
    392392#else 
    393393main (argc,argv,envp) 
    394 #endif //NDG_PYTHON_EMBED 
    395394    int     argc ; 
    396395    char    **argv ; 
    397396    char    **envp ; 
     397#endif //NDG_PYTHON_EMBED 
    398398{ 
    399399    extern char *optarg; 
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/ndg.c

    r1264 r1289  
    1010 */ 
    1111 
     12#include <Python.h> 
    1213#include <ndg.h> 
    1314 
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/includes/ndg.h

    r1259 r1289  
    2525 
    2626#ifdef NDG_PYTHON_EMBED 
    27 #include <Python.h> 
    2827 
    2928int bbftpd_private_authz_control(int msgcode, int transferoption, char *path, char *logmessage); 
  • TI05-delivery/trunk/src/python_ext/util.c

    r1259 r1289  
    1212#include <stdlib.h> 
    1313#include <string.h> 
     14#include <Python.h> 
     15 
    1416#include "util.h" 
    1517 
  • TI05-delivery/trunk/src/python_ext/util.h

    r1259 r1289  
    99 * 
    1010 */ 
    11  
    12 #include <Python.h> 
    1311 
    1412#define NDG_MAX_LOGMESSAGE 1024 
  • TI05-delivery/trunk/test/runclient.py

    r1268 r1289  
    1919sys.path.append(BUILDDIR) 
    2020 
    21 import delivery.client as DC 
     21import pybbftp.client as DC 
    2222 
    2323class AuthClientHandler(DC.AuthClientHandler): 
  • TI05-delivery/trunk/test/test_embedded.py

    r1281 r1289  
    2323sys.path.append(BUILDDIR) 
    2424 
    25 import delivery.server as server 
     25import pybbftp.server as server 
    2626import traceback 
    2727 
Note: See TracChangeset for help on using the changeset viewer.