Ignore:
Timestamp:
May 24, 2009, 7:45:16 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.2

Location:
branches/samba-3.3.x/source/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/lib/fault.c

    r206 r222  
    162162        }
    163163
    164         SAFE_FREE(corepath);
    165164        SAFE_FREE(logbase);
    166165
  • branches/samba-3.3.x/source/lib/interfaces.c

    r206 r222  
    1919*/
    2020
    21 
    22 /* working out the interfaces for a OS is an incredibly non-portable
    23    thing. We have several possible implementations below, and autoconf
    24    tries each of them to see what works
    25 
    26    Note that this file does _not_ include includes.h. That is so this code
    27    can be called directly from the autoconf tests. That also means
    28    this code cannot use any of the normal Samba debug stuff or defines.
    29    This is standalone code.
    30 
    31 */
    32 
    33 #ifndef AUTOCONF_TEST
    34 #include "config.h"
    35 #endif
    36 
    37 #include <unistd.h>
    38 #include <stdio.h>
    39 #include <sys/types.h>
    40 #include <netdb.h>
    41 #include <sys/ioctl.h>
    42 #include <netdb.h>
    43 #include <sys/ioctl.h>
    44 #include <sys/time.h>
    45 #include <sys/socket.h>
    46 #include <netinet/in.h>
    47 #include <arpa/inet.h>
    48 
    49 #ifdef HAVE_IFADDRS_H
    50 #include <ifaddrs.h>
    51 #endif
    52 
    53 #ifdef HAVE_SYS_TIME_H
    54 #include <sys/time.h>
    55 #endif
    56 
    57 #ifndef SIOCGIFCONF
    58 #ifdef HAVE_SYS_SOCKIO_H
    59 #include <sys/sockio.h>
    60 #endif
    61 #endif
    62 
    63 #ifdef HAVE_STDLIB_H
    64 #include <stdlib.h>
    65 #endif
    66 
    67 #ifdef HAVE_STRING_H
    68 #include <string.h>
    69 #endif
    70 
    71 #ifdef HAVE_STRINGS_H
    72 #include <strings.h>
    73 #endif
    74 
    75 #ifdef __COMPAR_FN_T
    76 #define QSORT_CAST (__compar_fn_t)
    77 #endif
    78 
    79 #ifndef QSORT_CAST
    80 #define QSORT_CAST (int (*)(const void *, const void *))
    81 #endif
    82 
    83 #ifdef HAVE_NET_IF_H
    84 #include <net/if.h>
    85 #endif
    86 
    87 #define SOCKET_WRAPPER_NOT_REPLACE
    88 #include "interfaces.h"
    89 #include "lib/replace/replace.h"
    90 
    91 /****************************************************************************
    92  Utility functions.
    93 ****************************************************************************/
     21#include "includes.h"
    9422
    9523/****************************************************************************
  • branches/samba-3.3.x/source/lib/messages.c

    r206 r222  
    279279
    280280        for (cb = msg_ctx->callbacks; cb != NULL; cb = cb->next) {
    281                 if (cb->msg_type == msg_type) {
     281                /* we allow a second registration of the same message
     282                   type if it has a different private pointer. This is
     283                   needed in, for example, the internal notify code,
     284                   which creates a new notify context for each tree
     285                   connect, and expects to receive messages to each of
     286                   them. */
     287                if (cb->msg_type == msg_type && private_data == cb->private_data) {
     288                        DEBUG(5,("Overriding messaging pointer for type %u - private_data=%p\n",
     289                                  (unsigned)msg_type, private_data));
    282290                        cb->fn = fn;
    283291                        cb->private_data = private_data;
     
    310318                if ((cb->msg_type == msg_type)
    311319                    && (cb->private_data == private_data)) {
     320                        DEBUG(5,("Deregistering messaging pointer for type %u - private_data=%p\n",
     321                                  (unsigned)msg_type, private_data));
    312322                        DLIST_REMOVE(ctx->callbacks, cb);
    313323                        TALLOC_FREE(cb);
     
    355365                        cb->fn(msg_ctx, cb->private_data, rec->msg_type,
    356366                               rec->src, &rec->buf);
    357                         return;
     367                        /* we continue looking for matching messages
     368                           after finding one. This matters for
     369                           subsystems like the internal notify code
     370                           which register more than one handler for
     371                           the same message type */
    358372                }
    359373        }
Note: See TracChangeset for help on using the changeset viewer.