Changeset 222 for branches/samba-3.3.x/source/lib
- Timestamp:
- May 24, 2009, 7:45:16 AM (16 years ago)
- 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 162 162 } 163 163 164 SAFE_FREE(corepath);165 164 SAFE_FREE(logbase); 166 165 -
branches/samba-3.3.x/source/lib/interfaces.c
r206 r222 19 19 */ 20 20 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" 94 22 95 23 /**************************************************************************** -
branches/samba-3.3.x/source/lib/messages.c
r206 r222 279 279 280 280 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)); 282 290 cb->fn = fn; 283 291 cb->private_data = private_data; … … 310 318 if ((cb->msg_type == msg_type) 311 319 && (cb->private_data == private_data)) { 320 DEBUG(5,("Deregistering messaging pointer for type %u - private_data=%p\n", 321 (unsigned)msg_type, private_data)); 312 322 DLIST_REMOVE(ctx->callbacks, cb); 313 323 TALLOC_FREE(cb); … … 355 365 cb->fn(msg_ctx, cb->private_data, rec->msg_type, 356 366 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 */ 358 372 } 359 373 }
Note:
See TracChangeset
for help on using the changeset viewer.