Summary: | digest splitting into single messages is broken | ||
---|---|---|---|
Product: | [Applications] kmail | Reporter: | Sebastian Seifert <lathander> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.5.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Sebastian Seifert
2003-09-17 20:18:15 UTC
Use View Source if you really want to see the raw digest. Making preprocessing optional won't happen. Please attach a sample digest message to this bug report. Subject: sample digest: gift-checkins digest, Vol 1 #873 - 9 msgs This is a sample of a broken digest message. Send gift-checkins mailing list submissions to gift-checkins@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/gift-checkins or, via email, send a message with subject or body 'help' to gift-checkins-request@lists.sourceforge.net You can reach the person managing the list at gift-checkins-admin@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of gift-checkins digest..." Today's Topics: 1. CVS: Gnutella configure.ac,1.18,1.19 (Craig Barnes) 2. CVS: Gnutella/m4 gift-prefix.m4,NONE,1.1 (Craig Barnes) 3. CVS: Gnutella configure.ac,1.19,1.20 (Craig Barnes) 4. CVS: Gnutella/m4 libxml.m4,NONE,1.1 (Craig Barnes) 5. CVS: Gnutella/src gt_gnutella.c,1.51,1.52 gt_http_client.c,1.37,1.38 gt_stats.c,1.12,1.13 gt_query_route.c,1.33,1.34 gt_protocol.h,1.8,1.9 gt_packet.c,1.22,1.23 (Craig Barnes) 6. CVS: Gnutella/src gt_node.c,1.35,1.36 (Craig Barnes) 7. CVS: Gnutella configure.ac,1.20,1.21 (Craig Barnes) 8. CVS: OpenFT/src/proto ft_handshake.c,1.14,1.15 ft_query.c,1.9,1.10 (Josh Guilfoyle) 9. CVS: OpenFT/src ft_netorg.c,1.28,1.29 ft_netorg.h,1.9,1.10 ft_node.c,1.46,1.47 ft_node.h,1.24,1.25 ft_node_cache.c,1.15,1.16 ft_openft.c,1.50,1.51 ft_protocol.h,1.16,1.17 ft_search.c,1.51,1.52 ft_search_exec.c,1.53,1.54 ft_search_exec.h,1.12,1.13 ft_search_obj.c,1.13,1.14 ft_search_obj.h,1.6,1.7 ft_session.c,1.84,1.85 ft_stream.c,1.24,1.25 ft_stream.h,1.10,1.11 (Josh Guilfoyle) --__--__-- Message: 1 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 15:44:23 -0700 Subject: [gift-checkins] CVS: Gnutella configure.ac,1.18,1.19 Update of /cvsroot/gift/Gnutella In directory sc8-pr-cvs1:/tmp/cvs-serv5237 Modified Files: configure.ac Log Message: Move prefix detection to m4/gift-prefix.m4 and use AC_MSG_WARN instead of serii of echoes Index: configure.ac =================================================================== RCS file: /cvsroot/gift/Gnutella/configure.ac,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** configure.ac 17 Sep 2003 22:26:07 -0000 1.18 --- configure.ac 17 Sep 2003 22:44:21 -0000 1.19 *************** *** 187,212 **** dnl ########################################################################### ! libgift_prefix=`pkg-config --variable=prefix libgift` ! ! gift_plugin_prefix=$prefix ! if test x"$prefix" = xNONE; then ! gift_plugin_prefix=/usr/local ! fi ! ! if test x"$libgift_prefix" != x"$gift_plugin_prefix"; then ! echo "WARNING" ! echo ! echo " You are trying to install in $gift_plugin_prefix, but I only" ! echo " detected a giFT installation in $libgift_prefix. You may" ! echo " be installing in the wrong place." ! echo ! echo " You should probably supply --prefix=$libgift_prefix" ! echo " to configure. Or, if you have a giFT installation in" ! echo " $gift_plugin_prefix, you could override the PKG_CONFIG_PATH" ! echo " environment variable to point there, so I can detect it." ! echo ! echo "WARNING" ! echo ! fi dnl ########################################################################### --- 187,191 ---- dnl ########################################################################### ! GIFT_PLUGIN_CHECK_INSTALL_PATH dnl ########################################################################### --__--__-- Message: 2 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 15:44:23 -0700 Subject: [gift-checkins] CVS: Gnutella/m4 gift-prefix.m4,NONE,1.1 Update of /cvsroot/gift/Gnutella/m4 In directory sc8-pr-cvs1:/tmp/cvs-serv5237/m4 Added Files: gift-prefix.m4 Log Message: Move prefix detection to m4/gift-prefix.m4 and use AC_MSG_WARN instead of serii of echoes --- NEW FILE: gift-prefix.m4 --- ############################################################################### ## $Id: gift-prefix.m4,v 1.1 2003/09/17 22:44:21 hipnod Exp $ ############################################################################### AC_DEFUN([GIFT_PLUGIN_CHECK_INSTALL_PATH],[ libgift_prefix=`pkg-config --variable=prefix libgift` gift_plugin_prefix=$prefix if test x"$prefix" = xNONE; then gift_plugin_prefix=/usr/local fi if test x"$libgift_prefix" != x"$gift_plugin_prefix"; then AC_MSG_WARN([ You are trying to install in $gift_plugin_prefix, but I only detected a giFT installation in $libgift_prefix. You may be installing in the wrong place. You should probably supply --prefix=$libgift_prefix to configure. Or, if you have a giFT installation in $gift_plugin_prefix, you could add ${gift_plugin_prefix}/lib/pkgconfig to the PKG_CONFIG_PATH environment variable, so I can detect it. ]) fi ]) --__--__-- Message: 3 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:25:53 -0700 Subject: [gift-checkins] CVS: Gnutella configure.ac,1.19,1.20 Update of /cvsroot/gift/Gnutella In directory sc8-pr-cvs1:/tmp/cvs-serv13860 Modified Files: configure.ac Log Message: Move libxml config to libxml.m4 Index: configure.ac =================================================================== RCS file: /cvsroot/gift/Gnutella/configure.ac,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** configure.ac 17 Sep 2003 22:44:21 -0000 1.19 --- configure.ac 17 Sep 2003 23:25:50 -0000 1.20 *************** *** 54,64 **** dnl ########################################################################### - dnl Initialize arguments... - dnl ########################################################################### - - AC_ARG_ENABLE(libxml2, [ --enable-libxml2 whether to use libxml2 ],[use_libxml2=$enableval], [use_libxml2=no]) - AM_CONDITIONAL(LIBXML2, test x$use_libxml2 = xyes) - - dnl ########################################################################### dnl Check for the necessary build tools and configure libtool dnl ########################################################################### --- 54,57 ---- *************** *** 117,125 **** ) ! if test x"$OPT_ZLIB" = xno; then ! echo ! echo "ERROR: zlib support is required" ! echo ! exit 1 fi --- 110,115 ---- ) ! if test x"$OPT_ZLIB" = xno; then ! AC_MSG_ERROR([zlib support is required]) fi *************** *** 127,147 **** dnl ########################################################################### ! dnl Test for libxml2... dnl ########################################################################### ! AC_MSG_CHECKING([whether libxml2 should be used]) ! ! if test "x$use_libxml2" = xyes; then ! AC_MSG_RESULT([yes]) ! AC_PATH_PROG(XML2_CONFIG, xml2-config, [no]) ! if test "x$XML2_CONFIG" != xno; then ! LIBXML2_CFLAGS=`$XML2_CONFIG --cflags` ! LIBXML2_LIBS=`$XML2_CONFIG --libs` ! AC_SUBST(LIBXML2_CFLAGS) ! AC_SUBST(LIBXML2_LIBS) ! AC_DEFINE(USE_LIBXML2) ! fi else AC_MSG_RESULT([no]) --- 117,137 ---- dnl ########################################################################### ! dnl Test for libxml... dnl ########################################################################### ! OPT_LIBXML=no ! AC_ARG_WITH(libxml,dnl ! [ --with-libxml[=DIR] where to look for libxml [compiler/linker default paths] ! DIR points to the libxml installation prefix [/usr/local]], ! OPT_LIBXML=$withval, ! ) ! AC_MSG_CHECKING([whether libxml should be used]) ! use_libxml2=no ! if test x"$OPT_LIBXML" != xno; then ! AC_MSG_RESULT([yes]) ! GIFT_GNUTELLA_CHECK_LIBXML ! use_libxml2=yes else AC_MSG_RESULT([no]) --__--__-- Message: 4 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:25:53 -0700 Subject: [gift-checkins] CVS: Gnutella/m4 libxml.m4,NONE,1.1 Update of /cvsroot/gift/Gnutella/m4 In directory sc8-pr-cvs1:/tmp/cvs-serv13860/m4 Added Files: libxml.m4 Log Message: Move libxml config to libxml.m4 --- NEW FILE: libxml.m4 --- ############################################################################### ## $Id: libxml.m4,v 1.1 2003/09/17 23:25:51 hipnod Exp $ ############################################################################### AC_DEFUN([GIFT_GNUTELLA_CHECK_LIBXML],[ # # Check on the user's PATH if no path was specified in OPT_LIBXML, # when the user has passed --with-libxml without a directory, # or check the directory if one was supplied. # if test x"$OPT_LIBXML" = xyes; then AC_PATH_PROG(XML2_CONFIG, xml2-config, [no]) else XMLPATH="$OPT_LIBXML/bin" AC_PATH_PROG(XML2_CONFIG, xml2-config, [no], [$XMLPATH]) fi if test x"$XML2_CONFIG" != xno; then LIBXML2_CFLAGS=`$XML2_CONFIG --cflags` LIBXML2_LIBS=`$XML2_CONFIG --libs` AC_SUBST(LIBXML2_CFLAGS) AC_SUBST(LIBXML2_LIBS) AC_DEFINE(USE_LIBXML2) else AC_MSG_ERROR([ Couldn't run ${OPT_LIBXML}/bin/xml2-config ]) fi ]) --__--__-- Message: 5 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:26:45 -0700 Subject: [gift-checkins] CVS: Gnutella/src gt_gnutella.c,1.51,1.52 gt_http_client.c,1.37,1.38 gt_stats.c,1.12,1.13 gt_query_route.c,1.33,1.34 gt_protocol.h,1.8,1.9 gt_packet.c,1.22,1.23 Update of /cvsroot/gift/Gnutella/src In directory sc8-pr-cvs1:/tmp/cvs-serv13998/src Modified Files: gt_gnutella.c gt_http_client.c gt_stats.c gt_query_route.c gt_protocol.h gt_packet.c Log Message: Fix a bunch of warnings missed by lack of -Wall Index: gt_gnutella.c =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_gnutella.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** gt_gnutella.c 24 Aug 2003 08:46:47 -0000 1.51 --- gt_gnutella.c 17 Sep 2003 23:26:43 -0000 1.52 *************** *** 20,23 **** --- 20,24 ---- #include "sha1.h" + #include "xml.h" #include "gt_share.h" Index: gt_http_client.c =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_http_client.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** gt_http_client.c 16 Aug 2003 08:07:08 -0000 1.37 --- gt_http_client.c 17 Sep 2003 23:26:43 -0000 1.38 *************** *** 308,312 **** char *retry_after; GtSource *gt; - int next; #if 0 char *msg; --- 308,311 ---- *************** *** 426,430 **** char *queue_line; int poll_min; - time_t next; if (!(gt = gt_transfer_get_source (xfer))) --- 425,428 ---- Index: gt_stats.c =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_stats.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** gt_stats.c 24 Aug 2003 08:50:04 -0000 1.12 --- gt_stats.c 17 Sep 2003 23:26:43 -0000 1.13 *************** *** 82,87 **** static void get_pong_stats (struct gt_stats *pong_stats) { - int i; - memset (pong_stats, 0, sizeof (struct gt_stats)); --- 82,85 ---- Index: gt_query_route.c =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_query_route.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** gt_query_route.c 24 Aug 2003 08:46:47 -0000 1.33 --- gt_query_route.c 17 Sep 2003 23:26:43 -0000 1.34 *************** *** 240,243 **** --- 240,245 ---- } + #if 0 + /* untested */ static void qrp_route_table_remove (struct qrp_route_table *qrt, uint32_t index) { *************** *** 278,281 **** --- 280,284 ---- qrt->present--; } + #endif static BOOL qrp_route_table_lookup (struct qrp_route_table *qrt, uint32_t index) *************** *** 557,562 **** static void start_build_timer (void) { - time_t interval; - if (build_timer) return; --- 560,563 ---- *************** *** 1072,1076 **** /* send a reset table first */ if (gt_packet_send_fmt (c, GT_QUERY_ROUTE, NULL, 1, 0, ! "%c%lu%c", 0, slots, infinity) < 0) { GT->DBGFN (GT, "error reseting table"); --- 1073,1077 ---- /* send a reset table first */ if (gt_packet_send_fmt (c, GT_QUERY_ROUTE, NULL, 1, 0, ! "%c%lu%c", 0, (long)slots, infinity) < 0) { GT->DBGFN (GT, "error reseting table"); Index: gt_protocol.h =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_protocol.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gt_protocol.h 17 Sep 2003 17:44:11 -0000 1.8 --- gt_protocol.h 17 Sep 2003 23:26:43 -0000 1.9 *************** *** 75,77 **** --- 75,82 ---- /*****************************************************************************/ + /* HACK: this isn't available in libgift, but giftd */ + extern int upload_availability (void); + + /*****************************************************************************/ + #endif /* __GT_PROTOCOL_H__ */ Index: gt_packet.c =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_packet.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** gt_packet.c 17 Sep 2003 17:44:11 -0000 1.22 --- gt_packet.c 17 Sep 2003 23:26:43 -0000 1.23 *************** *** 34,38 **** { GtPacket *packet; - int need_free = TRUE; unsigned char *data; --- 34,37 ---- --__--__-- Message: 6 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:31:17 -0700 Subject: [gift-checkins] CVS: Gnutella/src gt_node.c,1.35,1.36 Update of /cvsroot/gift/Gnutella/src In directory sc8-pr-cvs1:/tmp/cvs-serv15095/src Modified Files: gt_node.c Log Message: Include io/{rx,tx}_stack.h for definitions Index: gt_node.c =================================================================== RCS file: /cvsroot/gift/Gnutella/src/gt_node.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** gt_node.c 17 Sep 2003 17:44:11 -0000 1.35 --- gt_node.c 17 Sep 2003 23:31:15 -0000 1.36 *************** *** 27,30 **** --- 27,33 ---- #include "gt_node_cache.h" + #include "io/rx_stack.h" /* gt_rx_stack_free */ + #include "io/tx_stack.h" /* gt_tx_stack_free, gt_tx_stack_queue */ + /*****************************************************************************/ --__--__-- Message: 7 To: gift-checkins@lists.sourceforge.net From: Craig Barnes <hipnod@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:32:40 -0700 Subject: [gift-checkins] CVS: Gnutella configure.ac,1.20,1.21 Update of /cvsroot/gift/Gnutella In directory sc8-pr-cvs1:/tmp/cvs-serv15360 Modified Files: configure.ac Log Message: Use use_libxml instead of use_libxml2 Index: configure.ac =================================================================== RCS file: /cvsroot/gift/Gnutella/configure.ac,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** configure.ac 17 Sep 2003 23:25:50 -0000 1.20 --- configure.ac 17 Sep 2003 23:32:38 -0000 1.21 *************** *** 128,137 **** AC_MSG_CHECKING([whether libxml should be used]) ! use_libxml2=no if test x"$OPT_LIBXML" != xno; then AC_MSG_RESULT([yes]) GIFT_GNUTELLA_CHECK_LIBXML ! use_libxml2=yes else AC_MSG_RESULT([no]) --- 128,137 ---- AC_MSG_CHECKING([whether libxml should be used]) ! use_libxml=no if test x"$OPT_LIBXML" != xno; then AC_MSG_RESULT([yes]) GIFT_GNUTELLA_CHECK_LIBXML ! use_libxml=yes else AC_MSG_RESULT([no]) *************** *** 168,172 **** echo echo "use zlib................: yes (required)" ! echo "use libxml2.............: $use_libxml2" echo echo "-----------------------------" --- 168,172 ---- echo echo "use zlib................: yes (required)" ! echo "use libxml..............: $use_libxml" echo echo "-----------------------------" --__--__-- Message: 8 To: gift-checkins@lists.sourceforge.net From: Josh Guilfoyle <jasta@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:40:59 -0700 Subject: [gift-checkins] CVS: OpenFT/src/proto ft_handshake.c,1.14,1.15 ft_query.c,1.9,1.10 Update of /cvsroot/gift/OpenFT/src/proto In directory sc8-pr-cvs1:/tmp/cvs-serv16592/src/proto Modified Files: ft_handshake.c ft_query.c Log Message: typedef name changes Index: ft_handshake.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/proto/ft_handshake.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ft_handshake.c 16 Sep 2003 20:06:42 -0000 1.14 --- ft_handshake.c 17 Sep 2003 23:40:57 -0000 1.15 *************** *** 236,240 **** /* hack the class to emulate a search and/or index class gain */ node->klass &= ~(FT_NODE_SEARCH | FT_NODE_INDEX); ! ft_node_set_class (FT_NODE(c), (FTNodeClass)klass); /* set other attributes */ --- 236,240 ---- /* hack the class to emulate a search and/or index class gain */ node->klass &= ~(FT_NODE_SEARCH | FT_NODE_INDEX); ! ft_node_set_class (FT_NODE(c), (ft_class_t)klass); /* set other attributes */ *************** *** 326,330 **** static int nodelist_request (TCPC *c, FTPacket **listpkt, ! FTNodeClass klass, int nreq) { Array *args = NULL; --- 326,330 ---- static int nodelist_request (TCPC *c, FTPacket **listpkt, ! ft_class_t klass, int nreq) { Array *args = NULL; *************** *** 370,374 **** /* pass the work along to the real function */ ! nodes += nodelist_request (c, &reply, (FTNodeClass)klass, nreq); } --- 370,374 ---- /* pass the work along to the real function */ ! nodes += nodelist_request (c, &reply, (ft_class_t)klass, nreq); } Index: ft_query.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/proto/ft_query.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ft_query.c 11 Sep 2003 14:44:20 -0000 1.9 --- ft_query.c 17 Sep 2003 23:40:57 -0000 1.10 *************** *** 352,361 **** } ! static FTSearchType get_search_type (sparams_t *params) { ! FTNode *chk_parent; ! FTSearchType type; ! type = (FTSearchType)params->type; /* --- 352,361 ---- } ! static ft_search_flags_t get_search_type (sparams_t *params) { ! FTNode *chk_parent; ! ft_search_flags_t type; ! type = (ft_search_flags_t)params->type; /* *************** *** 388,392 **** /* provide debugging information */ ! if (FT_SEARCH_TYPE(params->type) == FT_SEARCH_FILENAME) { char *query_str; --- 388,392 ---- /* provide debugging information */ ! if (FT_SEARCH_METHOD(params->type) == FT_SEARCH_FILENAME) { char *query_str; *************** *** 610,620 **** } ! FTSearchType get_search_request_type (FTSearchType request) { ! FTSearchType type; ! /* extract only the type, ignoring any potentially dangerous internal * modifiers */ ! type = FT_SEARCH_TYPE(request); /* make sure a valid request type was made */ --- 610,620 ---- } ! ft_search_flags_t get_search_request_type (ft_search_flags_t request) { ! ft_search_flags_t type; ! /* extract only the method, ignoring any potentially dangerous internal * modifiers */ ! type = FT_SEARCH_METHOD(request); /* make sure a valid request type was made */ *************** *** 631,635 **** static int fill_params (sparams_t *params, FTNode *node, FTPacket *pkt) { ! FTSearchType type; memset (params, 0, sizeof (sparams_t)); --- 631,635 ---- static int fill_params (sparams_t *params, FTNode *node, FTPacket *pkt) { ! ft_search_flags_t type; memset (params, 0, sizeof (sparams_t)); --__--__-- Message: 9 To: gift-checkins@lists.sourceforge.net From: Josh Guilfoyle <jasta@users.sourceforge.net> Date: Wed, 17 Sep 2003 16:40:59 -0700 Subject: [gift-checkins] CVS: OpenFT/src ft_netorg.c,1.28,1.29 ft_netorg.h,1.9,1.10 ft_node.c,1.46,1.47 ft_node.h,1.24,1.25 ft_node_cache.c,1.15,1.16 ft_openft.c,1.50,1.51 ft_protocol.h,1.16,1.17 ft_search.c,1.51,1.52 ft_search_exec.c,1.53,1.54 ft_search_exec.h,1.12,1.13 ft_search_obj.c,1.13,1.14 ft_search_obj.h,1.6,1.7 ft_session.c,1.84,1.85 ft_stream.c,1.24,1.25 ft_stream.h,1.10,1.11 Update of /cvsroot/gift/OpenFT/src In directory sc8-pr-cvs1:/tmp/cvs-serv16592/src Modified Files: ft_netorg.c ft_netorg.h ft_node.c ft_node.h ft_node_cache.c ft_openft.c ft_protocol.h ft_search.c ft_search_exec.c ft_search_exec.h ft_search_obj.c ft_search_obj.h ft_session.c ft_stream.c ft_stream.h Log Message: typedef name changes Index: ft_netorg.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_netorg.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ft_netorg.c 11 Sep 2003 04:00:07 -0000 1.28 --- ft_netorg.c 17 Sep 2003 23:40:56 -0000 1.29 *************** *** 50,57 **** /* * Hardcode the necessary size requirements for nodes_len. If FTNodeState or ! * FTNodeClass values change, this must be updated. */ #define STATE_MAX (4) /* maximum value for FTNodeState */ ! #define KLASS_MAX (31) /* maximum value for FTNodeClass after * the necessary shifting has occurred */ --- 50,57 ---- /* * Hardcode the necessary size requirements for nodes_len. If FTNodeState or ! * ft_class_t values change, this must be updated. */ #define STATE_MAX (4) /* maximum value for FTNodeState */ ! #define KLASS_MAX (31) /* maximum value for ft_class_t after * the necessary shifting has occurred */ *************** *** 72,76 **** /* * Apply the necessary shifting of the enumerated sets so that there are no ! * unused bits. If the way FTNodeState or FTNodeClass is defined changes, so * must this macro. */ --- 72,76 ---- /* * Apply the necessary shifting of the enumerated sets so that there are no ! * unused bits. If the way FTNodeState or ft_class_t is defined changes, so * must this macro. */ *************** *** 91,95 **** /*****************************************************************************/ ! static struct conn_list *get_conn_list (FTNodeState state) { struct conn_list *list_addr; --- 91,95 ---- /*****************************************************************************/ ! static struct conn_list *get_conn_list (ft_state_t state) { struct conn_list *list_addr; *************** *** 139,143 **** } ! static int add_conn_list (FTNodeState state, FTNode *node) { struct conn_list *clist; --- 139,143 ---- } ! static int add_conn_list (ft_state_t state, FTNode *node) { struct conn_list *clist; *************** *** 161,166 **** static void update_nodes_len (FTNode *node, ! FTNodeClass klass, FTNodeState state, ! FTNodeClass klass_orig, FTNodeState state_orig) { int idx_klass = KLASS_INDEX(klass); --- 161,166 ---- static void update_nodes_len (FTNode *node, ! ft_class_t klass, ft_state_t state, ! ft_class_t klass_orig, ft_state_t state_orig) { int idx_klass = KLASS_INDEX(klass); *************** *** 211,215 **** /*****************************************************************************/ ! static void rem_conn_list (FTNodeState state, FTNode *node) { struct conn_list *clist; --- 211,215 ---- /*****************************************************************************/ ! static void rem_conn_list (ft_state_t state, FTNode *node) { struct conn_list *clist; *************** *** 249,254 **** void ft_netorg_change (FTNode *node, ! FTNodeClass class_orig, ! FTNodeState state_orig) { if (!(netorg_valid (node))) --- 249,254 ---- void ft_netorg_change (FTNode *node, ! ft_class_t class_orig, ! ft_state_t state_orig) { if (!(netorg_valid (node))) *************** *** 277,281 **** static int conn_list_iter (struct conn_list *clist, ! FTNodeClass klass, FTNodeState state, int iter, FTNetorgForeach func, void *udata) { --- 277,281 ---- static int conn_list_iter (struct conn_list *clist, ! ft_class_t klass, ft_state_t state, int iter, FTNetorgForeach func, void *udata) { *************** *** 359,363 **** } ! static int foreach_list (FTNodeClass klass, FTNodeState state, int iter, FTNetorgForeach func, void *udata) { --- 359,363 ---- } ! static int foreach_list (ft_class_t klass, ft_state_t state, int iter, FTNetorgForeach func, void *udata) { *************** *** 399,403 **** } ! static int iter_state (FTNodeClass klass, FTNodeState state, int iter, int *looped, FTNetorgForeach func, void *udata) { --- 399,403 ---- } ! static int iter_state (ft_class_t klass, ft_state_t state, int iter, int *looped, FTNetorgForeach func, void *udata) { *************** *** 417,421 **** } ! int ft_netorg_foreach (FTNodeClass klass, FTNodeState state, int iter, FTNetorgForeach func, void *udata) { --- 417,421 ---- } ! int ft_netorg_foreach (ft_class_t klass, ft_state_t state, int iter, FTNetorgForeach func, void *udata) { *************** *** 445,449 **** /*****************************************************************************/ ! int ft_netorg_length (FTNodeClass klass, FTNodeState state) { int klass_idx, state_idx; --- 445,449 ---- /*****************************************************************************/ ! int ft_netorg_length (ft_class_t klass, ft_state_t state) { int klass_idx, state_idx; Index: ft_netorg.h =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_netorg.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ft_netorg.h 7 Sep 2003 14:56:33 -0000 1.9 --- ft_netorg.h 17 Sep 2003 23:40:56 -0000 1.10 *************** *** 74,79 **** */ void ft_netorg_change (FTNode *node, ! FTNodeClass class_orig, ! FTNodeState state_orig); /** --- 74,79 ---- */ void ft_netorg_change (FTNode *node, ! ft_class_t class_orig, ! ft_state_t state_orig); /** *************** *** 102,106 **** * value will never exceed the supplied value. */ ! int ft_netorg_foreach (FTNodeClass klass, FTNodeState state, int iter, FTNetorgForeach func, void *udata); --- 102,106 ---- * value will never exceed the supplied value. */ ! int ft_netorg_foreach (ft_class_t klass, ft_state_t state, int iter, FTNetorgForeach func, void *udata); *************** *** 113,117 **** * @return Number of nodes matched in the selected set. */ ! int ft_netorg_length (FTNodeClass klass, FTNodeState state); /** --- 113,117 ---- * @return Number of nodes matched in the selected set. */ ! int ft_netorg_length (ft_class_t klass, ft_state_t state); /** Index: ft_node.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_node.c,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** ft_node.c 16 Sep 2003 20:06:16 -0000 1.46 --- ft_node.c 17 Sep 2003 23:40:56 -0000 1.47 *************** *** 79,83 **** in_port_t port, in_port_t http_port, ! FTNodeClass klass, time_t vitality, time_t uptime, uint32_t ver) { --- 79,83 ---- in_port_t port, in_port_t http_port, ! ft_class_t klass, time_t vitality, time_t uptime, uint32_t ver) { *************** *** 120,124 **** /*****************************************************************************/ ! void ft_node_err (FTNode *node, FTNodeError err, char *errtxt) { if (!node) --- 120,124 ---- /*****************************************************************************/ ! void ft_node_err (FTNode *node, ft_error_t err, const char *errtxt) { if (!node) *************** *** 186,190 **** } ! static BOOL is_valid_alias (char *alias, size_t len) { char *ptr; --- 186,190 ---- } ! static BOOL is_valid_alias (const char *alias, size_t len) { char *ptr; *************** *** 197,201 **** * characters out instead of rejecting the alias. */ ! for (ptr = alias; *ptr; ptr++) { /* alias@ipaddr */ --- 197,201 ---- * characters out instead of rejecting the alias. */ ! for (ptr = (char *)alias; *ptr; ptr++) { /* alias@ipaddr */ *************** *** 207,211 **** } ! char *ft_node_set_alias (FTNode *node, char *alias) { size_t alias_len; --- 207,211 ---- } ! char *ft_node_set_alias (FTNode *node, const char *alias) { size_t alias_len; *************** *** 260,264 **** * modifiers. */ ! char *ft_node_classstr (FTNodeClass klass) { char *str; --- 260,264 ---- * modifiers. */ ! char *ft_node_classstr (ft_class_t klass) { char *str; *************** *** 290,294 **** } ! char *ft_node_classstr_full (FTNodeClass klass) { static char buf[128]; --- 290,294 ---- } ! char *ft_node_classstr_full (ft_class_t klass) { static char buf[128]; *************** *** 322,326 **** * information, and thus is more acceptable. */ ! char *ft_node_statestr (FTNodeState state) { char *str; --- 322,326 ---- * information, and thus is more acceptable. */ ! char *ft_node_statestr (ft_state_t state) { char *str; *************** *** 347,352 **** /*****************************************************************************/ ! static void handle_state_change (FTNode *node, FTNodeState orig, ! FTNodeState now) { /* notify the network organization code that a change has occurred and --- 347,352 ---- /*****************************************************************************/ ! static void handle_state_change (FTNode *node, ft_state_t orig, ! ft_state_t now) { /* notify the network organization code that a change has occurred and *************** *** 364,370 **** } ! void ft_node_set_state (FTNode *node, FTNodeState state) { ! FTNodeState orig; if (!node) --- 364,370 ---- } ! void ft_node_set_state (FTNode *node, ft_state_t state) { ! ft_state_t orig; if (!node) *************** *** 401,405 **** } ! static void handle_class_loss (FTNode *node, FTNodeClass orig, FTNodeClass loss) { if (loss & FT_NODE_PARENT) --- 401,405 ---- } ! static void handle_class_loss (FTNode *node, ft_class_t orig, ft_class_t loss) { if (loss & FT_NODE_PARENT) *************** *** 444,448 **** } ! static void handle_class_gain (FTNode *node, FTNodeClass orig, FTNodeClass gain) { /* if we have a new index || parent node, ask for a current stats digest --- 444,448 ---- } ! static void handle_class_gain (FTNode *node, ft_class_t orig, ft_class_t gain) { /* if we have a new index || parent node, ask for a current stats digest *************** *** 483,488 **** } ! static void log_class_change (FTNode *node, FTNodeClass loss, FTNodeClass gain, ! FTNodeClass klass) { char *hostfmt; --- 483,488 ---- } ! static void log_class_change (FTNode *node, ft_class_t loss, ft_class_t gain, ! ft_class_t klass) { char *hostfmt; *************** *** 523,530 **** static void handle_class_change (FTNode *node, ! FTNodeClass orig, ! FTNodeClass loss, ! FTNodeClass gain, ! FTNodeClass klass) { /* ignore class changes that have occurred to our own internal node --- 523,530 ---- static void handle_class_change (FTNode *node, ! ft_class_t orig, ! ft_class_t loss, ! ft_class_t gain, ! ft_class_t klass) { /* ignore class changes that have occurred to our own internal node *************** *** 554,561 **** } ! void ft_node_set_class (FTNode *node, FTNodeClass klass) { ! FTNodeClass orig; ! FTNodeClass loss, gain; /* disconnected nodes are not allowed to have class changes as they cannot --- 554,561 ---- } ! void ft_node_set_class (FTNode *node, ft_class_t klass) { ! ft_class_t orig; ! ft_class_t loss, gain; /* disconnected nodes are not allowed to have class changes as they cannot *************** *** 588,604 **** } ! void ft_node_add_class (FTNode *node, FTNodeClass klass) { ft_node_set_class (node, node->klass | klass); } ! void ft_node_remove_class (FTNode *node, FTNodeClass klass) { ft_node_set_class (node, node->klass & ~klass); } ! FTNodeClass ft_node_class (FTNode *node, BOOL session_info) { ! FTNodeClass klass; if (!node) --- 588,604 ---- } ! void ft_node_add_class (FTNode *node, ft_class_t klass) { ft_node_set_class (node, node->klass | klass); } ! void ft_node_remove_class (FTNode *node, ft_class_t klass) { ft_node_set_class (node, node->klass & ~klass); } ! ft_class_t ft_node_class (FTNode *node, BOOL session_info) { ! ft_class_t klass; if (!node) *************** *** 633,637 **** } ! char *ft_node_user_host (in_addr_t host, char *alias) { char *host_str; --- 633,637 ---- } ! char *ft_node_user_host (in_addr_t host, const char *alias) { char *host_str; Index: ft_node.h =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_node.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ft_node.h 9 Sep 2003 09:04:49 -0000 1.24 --- ft_node.h 17 Sep 2003 23:40:56 -0000 1.25 *************** *** 54,58 **** * "near-complete" OpenFT session * has been established */ ! } FTNodeState; #define FT_NODE_STATE_MASK (0x7) --- 54,58 ---- * "near-complete" OpenFT session * has been established */ ! } ft_state_t; #define FT_NODE_STATE_MASK (0x7) *************** *** 104,108 **** FT_NODE_PARENT_FULL = 0x400, /**< Node is unavailable for parenting, * temporarily. */ ! } FTNodeClass; #define FT_NODE_CLASS_MASK (0x707) --- 104,108 ---- FT_NODE_PARENT_FULL = 0x400, /**< Node is unavailable for parenting, * temporarily. */ ! } ft_class_t; #define FT_NODE_CLASS_MASK (0x707) *************** *** 120,124 **** FT_ERROR_VERMISMATCH, /**< Incompatible OpenFT versions */ FT_ERROR_UNKNOWN, /**< Undescribed error */ ! } FTNodeError; /** --- 120,124 ---- FT_ERROR_VERMISMATCH, /**< Incompatible OpenFT versions */ FT_ERROR_UNKNOWN, /**< Undescribed error */ ! } ft_error_t; /** *************** *** 153,160 **** char *alias; /**< Basically nickname */ ! FTNodeState state; /**< Connection state */ ! FTNodeClass klass; /**< Node class */ ! FTNodeError lasterr; /**< Like errno, but for node * connections */ char *lasterr_msg; /**< Simple message to append --- 153,160 ---- char *alias; /**< Basically nickname */ ! ft_state_t state; /**< Connection state */ ! ft_class_t klass; /**< Node class */ ! ft_error_t lasterr; /**< Like errno, but for node * connections */ char *lasterr_msg; /**< Simple message to append *************** *** 214,218 **** in_port_t port, in_port_t http_port, ! FTNodeClass klass, time_t vitality, time_t uptime, --- 214,218 ---- in_port_t port, in_port_t http_port, ! ft_class_t klass, time_t vitality, time_t uptime, *************** *** 252,256 **** * @param errtxt Optional error text. May specify NULL. */ ! void ft_node_err (FTNode *node, FTNodeError err, char *errtxt); /** --- 252,256 ---- * @param errtxt Optional error text. May specify NULL. */ ! void ft_node_err (FTNode *node, ft_error_t err, const char *errtxt); /** *************** *** 294,298 **** * parameter. */ ! char *ft_node_set_alias (FTNode *node, char *alias); /*****************************************************************************/ --- 294,298 ---- * parameter. */ ! char *ft_node_set_alias (FTNode *node, const char *alias); /*****************************************************************************/ *************** *** 312,316 **** * change noted by \em state. It is safe to set the same state twice. */ ! void ft_node_set_state (FTNode *node, FTNodeState state); /** --- 312,316 ---- * change noted by \em state. It is safe to set the same state twice. */ ! void ft_node_set_state (FTNode *node, ft_state_t state); /** *************** *** 318,322 **** * this affects OpenFT's behaviour. */ ! void ft_node_set_class (FTNode *node, FTNodeClass klass); /** --- 318,322 ---- * this affects OpenFT's behaviour. */ ! void ft_node_set_class (FTNode *node, ft_class_t klass); /** *************** *** 325,329 **** * how class changes are handled internally (in contrast with set_class). */ ! void ft_node_add_class (FTNode *node, FTNodeClass klass); /** --- 325,329 ---- * how class changes are handled internally (in contrast with set_class). */ ! void ft_node_add_class (FTNode *node, ft_class_t klass); /** *************** *** 331,335 **** * ::ft_node_add_class for more details. */ ! void ft_node_remove_class (FTNode *node, FTNodeClass klass); /** --- 331,335 ---- * ::ft_node_add_class for more details. */ ! void ft_node_remove_class (FTNode *node, ft_class_t klass); /** *************** *** 343,347 **** * @return This node's classification, or 0 on error. */ ! FTNodeClass ft_node_class (FTNode *node, int session_info); /** --- 343,347 ---- * @return This node's classification, or 0 on error. */ ! ft_class_t ft_node_class (FTNode *node, int session_info); /** *************** *** 352,356 **** * @return Static pointer representing the class string. */ ! char *ft_node_classstr (FTNodeClass klass); /** --- 352,356 ---- * @return Static pointer representing the class string. */ ! char *ft_node_classstr (ft_class_t klass); /** *************** *** 359,368 **** * benefits from greater visibility in a single string. */ ! char *ft_node_classstr_full (FTNodeClass klass); /** * Similar to ::ft_node_classstr, but utilized for connection states. */ ! char *ft_node_statestr (FTNodeState state); /*****************************************************************************/ --- 359,368 ---- * benefits from greater visibility in a single string. */ ! char *ft_node_classstr_full (ft_class_t klass); /** * Similar to ::ft_node_classstr, but utilized for connection states. */ ! char *ft_node_statestr (ft_state_t state); /*****************************************************************************/ *************** *** 389,393 **** * @return Pointer to static memory holding the formatted user. */ ! char *ft_node_user_host (in_addr_t host, char *alias); /** --- 389,393 ---- * @return Pointer to static memory holding the formatted user. */ ! char *ft_node_user_host (in_addr_t host, const char *alias); /** Index: ft_node_cache.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_node_cache.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ft_node_cache.c 7 Sep 2003 14:49:56 -0000 1.15 --- ft_node_cache.c 17 Sep 2003 23:40:56 -0000 1.16 *************** *** 69,73 **** * connect here */ if (!(node = ft_node_register_full (net_ip (host), port, http_port, ! (FTNodeClass)klass, vitality, uptime, version))) continue; --- 69,73 ---- * connect here */ if (!(node = ft_node_register_full (net_ip (host), port, http_port, ! (ft_class_t)klass, vitality, uptime, version))) continue; *************** *** 76,80 **** ft_node_set_port (node, port); ft_node_set_http_port (node, http_port); ! ft_node_set_class (node, (FTNodeClass)klass); /* manually assign a few cached members */ --- 76,80 ---- ft_node_set_port (node, port); ft_node_set_http_port (node, http_port); ! ft_node_set_class (node, (ft_class_t)klass); /* manually assign a few cached members */ *************** *** 140,146 **** static int write_node_cache (FTNode *node, FILE *f) { ! time_t vitality; ! time_t uptime; ! FTNodeClass klass; /* no reason to write out firewalled nodes or users which we would --- 140,146 ---- static int write_node_cache (FTNode *node, FILE *f) { ! time_t vitality; ! time_t uptime; ! ft_class_t klass; /* no reason to write out firewalled nodes or users which we would Index: ft_openft.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_openft.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** ft_openft.c 7 Aug 2003 16:44:34 -0000 1.50 --- ft_openft.c 17 Sep 2003 23:40:56 -0000 1.51 *************** *** 76,80 **** } ! static TCPC *ft_start (FTNodeClass klass, in_port_t port) { TCPC *c; --- 76,80 ---- } ! static TCPC *ft_start (ft_class_t klass, in_port_t port) { TCPC *c; *************** *** 166,170 **** /* bind the appropriate listening ports */ ! if ((OPENFT->ft = ft_start ((FTNodeClass)klass, ft_port))) OPENFT->http = http_start (http_port); --- 166,170 ---- /* bind the appropriate listening ports */ ! if ((OPENFT->ft = ft_start ((ft_class_t)klass, ft_port))) OPENFT->http = http_start (http_port); Index: ft_protocol.h =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_protocol.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ft_protocol.h 3 Aug 2003 10:56:34 -0000 1.16 --- ft_protocol.h 17 Sep 2003 23:40:56 -0000 1.17 *************** *** 260,264 **** FT_PUSH_FWD_REQUEST, FT_PUSH_FWD_RESPONSE, ! } FTCommand; /**************************************************************************/ --- 260,264 ---- FT_PUSH_FWD_REQUEST, FT_PUSH_FWD_RESPONSE, ! } ft_command_t; /**************************************************************************/ Index: ft_search.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_search.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** ft_search.c 2 Sep 2003 11:28:51 -0000 1.51 --- ft_search.c 17 Sep 2003 23:40:56 -0000 1.52 *************** *** 86,90 **** Share *share, unsigned int avail) { ! FTSearchParams *params; if (!srch) --- 86,90 ---- Share *share, unsigned int avail) { ! ft_search_parms_t *params; if (!srch) *************** *** 249,253 **** static void search_children (FTSearch *search) { ! FTSearchParams *params; params = &search->params; --- 249,253 ---- static void search_children (FTSearch *search) { ! ft_search_parms_t *params; params = &search->params; *************** *** 283,287 **** /*****************************************************************************/ ! static int exec_search (Protocol *p, IFEvent *event, FTSearchType type, char *query, char *exclude, char *realm, Dataset *meta) { --- 283,287 ---- /*****************************************************************************/ ! static int exec_search (Protocol *p, IFEvent *event, ft_search_flags_t type, char *query, char *exclude, char *realm, Dataset *meta) { Index: ft_search_exec.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_search_exec.c,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** ft_search_exec.c 7 Sep 2003 14:49:34 -0000 1.53 --- ft_search_exec.c 17 Sep 2003 23:40:56 -0000 1.54 *************** *** 58,71 **** typedef struct sdata { ! FTNode *node; /* cached node that owns the shares * we are currently iterating */ ! size_t nmax; ! size_t matches; /* number of successful matches */ ! FTSearchResultFn resultfn; /* callback when a result is found */ ! void *udata; /* user data for the above callback */ ! FTSearchType type; /* type of search we are performing */ ! FTSearchFunc sfunc; /* local matching function for this * search type */ --- 58,71 ---- typedef struct sdata { ! FTNode *node; /* cached node that owns the shares * we are currently iterating */ ! size_t nmax; ! size_t matches; /* number of successful matches */ ! FTSearchResultFn resultfn; /* callback when a result is found */ ! void *udata; /* user data for the above callback */ ! ft_search_flags_t type; /* type of search we are performing */ ! FTSearchFunc sfunc; /* local matching function for this * search type */ *************** *** 73,88 **** * @name FT_SEARCH_FILENAME */ ! unsigned long avail; /* cached availability */ ! char *f_query; /* query string */ ! char *f_exclude; /* exclude string */ ! uint32_t *f_qtokens; /* query tokens list */ ! uint32_t *f_etokens; /* exclude tokens list */ ! char *f_realm; /* optional realm to filter by */ /** * @name FT_SEARCH_MD5 */ ! unsigned char *m_query; /* 16-byte md5sum */ /** --- 73,88 ---- * @name FT_SEARCH_FILENAME */ ! unsigned long avail; /* cached availability */ ! char *f_query; /* query string */ ! char *f_exclude; /* exclude string */ ! uint32_t *f_qtokens; /* query tokens list */ ! uint32_t *f_etokens; /* exclude tokens list */ ! char *f_realm; /* optional realm to filter by */ /** * @name FT_SEARCH_MD5 */ ! unsigned char *m_query; /* 16-byte md5sum */ /** *************** *** 92,96 **** * browse results now. */ ! in_addr_t h_query; /* 4-byte host */ } SearchData; --- 92,96 ---- * browse results now. */ ! in_addr_t h_query; /* 4-byte host */ } SearchData; *************** *** 283,287 **** */ static void token_add_str (uint32_t **tokens, int *tok, int *tokalloc, ! char *s) { char *sdup, *s0; --- 283,287 ---- */ static void token_add_str (uint32_t **tokens, int *tok, int *tokalloc, ! const char *s) { char *sdup, *s0; *************** *** 320,324 **** } ! uint32_t *ft_search_tokenize (char *string) { uint32_t *tokens = NULL; --- 320,324 ---- } ! uint32_t *ft_search_tokenize (const char *string) { uint32_t *tokens = NULL; *************** *** 334,338 **** } ! uint32_t *ft_search_tokenizef (FileShare *file) { uint32_t *tokens = NULL; --- 334,338 ---- } ! uint32_t *ft_search_tokenizef (Share *file) { uint32_t *tokens = NULL; *************** *** 357,361 **** static int fill_sdata (SearchData *sdata, int nmax, FTSearchResultFn resultfn, void *udata, ! FTSearchType type, char *realm, void *query, void *exclude) { --- 357,361 ---- static int fill_sdata (SearchData *sdata, int nmax, FTSearchResultFn resultfn, void *udata, ! ft_search_flags_t type, const char *realm, void *query, void *exclude) { *************** *** 370,374 **** sdata->type = type; /* type of search */ ! switch (FT_SEARCH_TYPE(sdata->type)) { case FT_SEARCH_FILENAME: --- 370,374 ---- sdata->type = type; /* type of search */ ! switch (FT_SEARCH_METHOD(sdata->type)) { case FT_SEARCH_FILENAME: *************** *** 399,403 **** sdata->f_qtokens = qtokens; sdata->f_etokens = etokens; ! sdata->f_realm = realm; } break; --- 399,403 ---- sdata->f_qtokens = qtokens; sdata->f_etokens = etokens; ! sdata->f_realm = (char *)realm; } break; *************** *** 436,440 **** } ! if (FT_SEARCH_TYPE(sdata->type) == FT_SEARCH_FILENAME) { if (sdata->f_query) --- 436,440 ---- } ! if (FT_SEARCH_METHOD(sdata->type) == FT_SEARCH_FILENAME) { if (sdata->f_query) *************** *** 444,448 **** } } ! else if (FT_SEARCH_TYPE(sdata->type) == FT_SEARCH_MD5) { free (sdata->m_query); --- 444,448 ---- } } ! else if (FT_SEARCH_METHOD(sdata->type) == FT_SEARCH_MD5) { free (sdata->m_query); *************** *** 527,531 **** * consider this a TODO :) */ ! switch (FT_SEARCH_TYPE(sdata->type)) { case FT_SEARCH_MD5: --- 527,531 ---- * consider this a TODO :) */ ! switch (FT_SEARCH_METHOD(sdata->type)) { case FT_SEARCH_MD5: *************** *** 595,599 **** */ int ft_search (int nmax, FTSearchResultFn resultfn, void *udata, ! FTSearchType type, char *realm, void *query, void *exclude) { --- 595,599 ---- */ int ft_search (int nmax, FTSearchResultFn resultfn, void *udata, ! ft_search_flags_t type, const char *realm, void *query, void *exclude) { *************** *** 627,631 **** #ifdef SEARCH_TIMING ! if (FT_SEARCH_TYPE(type) == FT_SEARCH_FILENAME) { FT->DBGFN (FT, "%i(%i): %.06fs elapsed", (int)type, (int)sdata.matches, --- 627,631 ---- #ifdef SEARCH_TIMING ! if (FT_SEARCH_METHOD(type) == FT_SEARCH_FILENAME) { FT->DBGFN (FT, "%i(%i): %.06fs elapsed", (int)type, (int)sdata.matches, *************** *** 644,649 **** } ! BOOL ft_search_cmp (FileShare *file, FTSearchType type, ! char *realm, void *query, void *exclude) { FTShare *share; --- 644,649 ---- } ! BOOL ft_search_cmp (Share *file, ft_search_flags_t type, ! const char *realm, void *query, void *exclude) { FTShare *share; Index: ft_search_exec.h =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_search_exec.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ft_search_exec.h 29 May 2003 09:37:42 -0000 1.12 --- ft_search_exec.h 17 Sep 2003 23:40:56 -0000 1.13 *************** *** 68,72 **** * @return Dynamically allocated zero-terminated sorted list of hashed tokens. */ ! uint32_t *ft_search_tokenize (char *str); /** --- 68,72 ---- * @return Dynamically allocated zero-terminated sorted list of hashed tokens. */ ! uint32_t *ft_search_tokenize (const char *str); /** *************** *** 75,79 **** * data and any other relevant data. */ ! uint32_t *ft_search_tokenizef (FileShare *file); /** --- 75,79 ---- * data and any other relevant data. */ ! uint32_t *ft_search_tokenizef (Share *file); /** *************** *** 110,114 **** */ int ft_search (int nmax, FTSearchResultFn resultfn, void *udata, ! FTSearchType type, char *realm, void *query, void *exclude); /** --- 110,115 ---- */ int ft_search (int nmax, FTSearchResultFn resultfn, void *udata, ! ft_search_flags_t type, const char *realm, ! void *query, void *exclude); /** *************** *** 122,127 **** * faulty. */ ! BOOL ft_search_cmp (FileShare *file, FTSearchType type, char *realm, ! void *query, void *exclude); /*****************************************************************************/ --- 123,128 ---- * faulty. */ ! BOOL ft_search_cmp (Share *share, ft_search_flags_t type, ! const char *realm, void *query, void *exclude); /*****************************************************************************/ Index: ft_search_obj.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_search_obj.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ft_search_obj.c 9 Jul 2003 16:34:13 -0000 1.13 --- ft_search_obj.c 17 Sep 2003 23:40:56 -0000 1.14 *************** *** 32,37 **** /*****************************************************************************/ ! static void set_params (FTSearchParams *dst, FTSearchType type, char *realm, ! char *query, char *exclude) { assert (type != 0x00); --- 32,38 ---- /*****************************************************************************/ ! static void set_params (ft_search_parms_t *dst, ft_search_flags_t type, ! const char *realm, ! const char *query, const char *exclude) { assert (type != 0x00); *************** *** 63,68 **** } ! FTSearch *ft_search_new (IFEvent *event, FTSearchType type, char *realm, ! char *query, char *exclude) { FTSearch *srch; --- 64,70 ---- } ! FTSearch *ft_search_new (IFEvent *event, ft_search_flags_t type, ! const char *realm, ! const char *query, const char *exclude) { FTSearch *srch; *************** *** 80,84 **** } ! static void finish_params (FTSearchParams *params) { free (params->realm); --- 82,86 ---- } ! static void finish_params (ft_search_parms_t *params) { free (params->realm); Index: ft_search_obj.h =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_search_obj.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ft_search_obj.h 9 Jul 2003 06:42:52 -0000 1.6 --- ft_search_obj.h 17 Sep 2003 23:40:56 -0000 1.7 *************** *** 71,78 **** */ FT_SEARCH_HIDDEN = 0x20 ! } FTSearchType; /* take only the bits that determine what type of search it is */ ! #define FT_SEARCH_TYPE(type) ((type) & 0x03) /** --- 71,78 ---- */ FT_SEARCH_HIDDEN = 0x20 ! } ft_search_flags_t; /* take only the bits that determine what type of search it is */ ! #define FT_SEARCH_METHOD(flags) ((flags) & 0x03) /** *************** *** 82,95 **** typedef struct { ! FTSearchType type; /**< Search method/options */ ! char *realm; /**< Crude mime filtering */ ! char *query; /**< Literal search string */ ! char *exclude; /**< Exclude matches */ ! uint32_t *qtokens; /**< Query tokens */ ! uint32_t *etokens; /**< Exclude tokens */ ! } FTSearchParams; /** --- 82,95 ---- typedef struct { ! ft_search_flags_t type; /**< Search method/options */ ! char *realm; /**< Crude mime filtering */ ! char *query; /**< Literal search string */ ! char *exclude; /**< Exclude matches */ ! uint32_t *qtokens; /**< Query tokens */ ! uint32_t *etokens; /**< Exclude tokens */ ! } ft_search_parms_t; /** *************** *** 98,110 **** typedef struct { ! IFEvent *event; /**< Handle to reply to giFT */ ! ft_guid_t *guid; /**< Semi-unique search id */ ! timer_id timeout; /**< Automatic search timeout */ ! FTSearchParams params; /**< Search parameters */ ! Dataset *waiting_on; /**< Nodes that were sent search requests, ! * but have yet to reply. The ! * search is considered complete * when either the timeout is * reached, or this becomes empty */ --- 98,110 ---- typedef struct { ! IFEvent *event; /**< Handle to reply to giFT */ ! ft_guid_t *guid; /**< Semi-unique search id */ ! timer_id timeout; /**< Automatic search timeout */ ! ft_search_parms_t params; /**< Search parameters */ ! Dataset *waiting_on; /**< Nodes that were sent search ! * requests, but have yet to reply. ! * The search is considered complete * when either the timeout is * reached, or this becomes empty */ *************** *** 168,173 **** * @param exclude */ ! FTSearch *ft_search_new (IFEvent *event, FTSearchType type, char *realm, ! char *query, char *exclude); /** --- 168,174 ---- * @param exclude */ ! FTSearch *ft_search_new (IFEvent *event, ft_search_flags_t type, ! const char *realm, ! const char *query, const char *exclude); /** Index: ft_session.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_session.c,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** ft_session.c 16 Sep 2003 20:02:59 -0000 1.84 --- ft_session.c 17 Sep 2003 23:40:56 -0000 1.85 *************** *** 32,44 **** /*****************************************************************************/ ! static int session_auth_packet (TCPC *c, FTPacket *packet) { ! FTCommand cmd; ! int ret = FALSE; if (!packet) return FALSE; ! cmd = (FTCommand)ft_packet_command (packet); switch (FT_SESSION(c)->stage) --- 32,44 ---- /*****************************************************************************/ ! static BOOL session_auth_packet (TCPC *c, FTPacket *packet) { ! ft_command_t cmd; ! BOOL ret = FALSE; if (!packet) return FALSE; ! cmd = (ft_command_t)(ft_packet_command (packet)); switch (FT_SESSION(c)->stage) *************** *** 62,66 **** { FTPacket *packet; ! int ret = FALSE; packet = ft_packet_unserialize (data, len); --- 62,66 ---- { FTPacket *packet; ! BOOL ret = FALSE; packet = ft_packet_unserialize (data, len); Index: ft_stream.c =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_stream.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** ft_stream.c 25 Aug 2003 07:37:07 -0000 1.24 --- ft_stream.c 17 Sep 2003 23:40:56 -0000 1.25 *************** *** 56,60 **** /*****************************************************************************/ ! static int stream_init (FTStream *stream, FTStreamDirection dir) { #ifdef USE_ZLIB --- 56,60 ---- /*****************************************************************************/ ! static int stream_init (FTStream *stream, ft_stream_dir_t dir) { #ifdef USE_ZLIB *************** *** 89,94 **** } ! static FTStream *stream_new (TCPC *c, FTStreamDirection dir, ! uint32_t id, FTStreamFlags flags, uint16_t cmd) { --- 89,94 ---- } ! static FTStream *stream_new (TCPC *c, ft_stream_dir_t dir, ! uint32_t id, ft_stream_flags_t flags, uint16_t cmd) { *************** *** 135,139 **** /*****************************************************************************/ ! static Dataset **get_direction (TCPC *c, FTStreamDirection dir) { Dataset **d = NULL; --- 135,139 ---- /*****************************************************************************/ ! static Dataset **get_direction (TCPC *c, ft_stream_dir_t dir) { Dataset **d = NULL; *************** *** 171,175 **** #endif ! static FTStream *lookup_stream (TCPC *c, FTStreamDirection dir, uint32_t id) { --- 171,175 ---- #endif ! static FTStream *lookup_stream (TCPC *c, ft_stream_dir_t dir, uint32_t id) { *************** *** 185,189 **** } ! static int insert_stream (TCPC *c, FTStreamDirection dir, uint32_t id, FTStream *stream) { --- 185,189 ---- } ! static int insert_stream (TCPC *c, ft_stream_dir_t dir, uint32_t id, FTStream *stream) { *************** *** 214,222 **** } ! FTStream *ft_stream_get (TCPC *c, FTStreamDirection dir, FTPacket *packet) { ! FTStream *stream; ! FTStreamFlags flags = FT_STREAM_NONE; ! uint32_t id; if (!packet) --- 214,222 ---- } ! FTStream *ft_stream_get (TCPC *c, ft_stream_dir_t dir, FTPacket *packet) { ! FTStream *stream; ! ft_stream_flags_t flags = FT_STREAM_NONE; ! uint32_t id; if (!packet) *************** *** 595,599 **** } ! int ft_stream_clear (TCPC *c, FTStreamDirection dir) { Dataset **d; --- 595,599 ---- } ! int ft_stream_clear (TCPC *c, ft_stream_dir_t dir) { Dataset **d; Index: ft_stream.h =================================================================== RCS file: /cvsroot/gift/OpenFT/src/ft_stream.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ft_stream.h 25 Aug 2003 07:37:07 -0000 1.10 --- ft_stream.h 17 Sep 2003 23:40:56 -0000 1.11 *************** *** 57,61 **** FT_STREAM_RECV, FT_STREAM_SEND ! } FTStreamDirection; /** --- 57,61 ---- FT_STREAM_RECV, FT_STREAM_SEND ! } ft_stream_dir_t; /** *************** *** 71,75 **** FT_STREAM_ZLIB = 0x04, /**< ZLib compression. Implies * FT_STREAM_BLOCK. */ ! } FTStreamFlags; /** --- 71,75 ---- FT_STREAM_ZLIB = 0x04, /**< ZLib compression. Implies * FT_STREAM_BLOCK. */ ! } ft_stream_flags_t; /** *************** *** 88,93 **** * type of command can be sent per * stream instance. */ ! FTStreamDirection dir; /**< Stream data direction */ ! FTStreamFlags flags; /**< Stream flags (compression info) */ uint32_t id; /**< Stream id (channel number) */ --- 88,93 ---- * type of command can be sent per * stream instance. */ ! ft_stream_dir_t dir; /**< Stream data direction */ ! ft_stream_flags_t flags; /**< Stream flags (compression info) */ uint32_t id; /**< Stream id (channel number) */ *************** *** 138,142 **** * @return Dynamically allocated stream object or NULL on failure. */ ! FTStream *ft_stream_get (TCPC *c, FTStreamDirection dir, FTPacket *packet); --- 138,142 ---- * @return Dynamically allocated stream object or NULL on failure. */ ! FTStream *ft_stream_get (TCPC *c, ft_stream_dir_t dir, FTPacket *packet); *************** *** 193,197 **** * @return Number of streams destroyed. */ ! int ft_stream_clear (TCPC *c, FTStreamDirection dir); /** --- 193,197 ---- * @return Number of streams destroyed. */ ! int ft_stream_clear (TCPC *c, ft_stream_dir_t dir); /** --__--__-- _______________________________________________ gift-checkins mailing list gift-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gift-checkins End of gift-checkins Digest This seems to be a duplicate of my bug 53668 (and 54838). |