Changeset 233 for branches/samba-3.2.x/source/lib/messages.c
- Timestamp:
- May 27, 2009, 11:39:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/lib/messages.c
r133 r233 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.