1 2003-01-26 Richard Hult <rhult@codefactory.se>
3 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
4 the file descriptor list, since it can change under us.
6 2003-01-25 Anders Carlsson <andersca@codefactory.se>
8 * glib/dbus-gmain.c: (dbus_connection_prepare),
9 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
10 (remove_watch), (dbus_connection_hookup_with_g_main):
11 Rewrite the glib handling to use its own GSource instead of a
12 GIOChannel so we can catch messages put in the queue while waiting
15 2003-01-25 Anders Carlsson <andersca@codefactory.se>
18 * bus/connection.c: (connection_disconnect_handler),
19 (connection_watch_callback), (bus_connection_setup):
20 * bus/dispatch.c: (send_one_message),
21 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
22 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
24 * bus/driver.c: (bus_driver_send_service_deleted),
25 (bus_driver_send_service_created), (bus_driver_handle_hello),
26 (bus_driver_send_welcome_message),
27 (bus_driver_handle_list_services), (bus_driver_remove_connection),
28 (bus_driver_handle_message):
30 Refactor code, put the message dispatching in its own file. Use
31 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
34 2003-01-25 Anders Carlsson <andersca@codefactory.se>
36 * dbus/dbus-internals.h:
37 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
39 * dbus/dbus-message.c: (dbus_message_get_sender):
40 * dbus/dbus-message.h:
41 Implement dbus_message_get_sender.
43 * dbus/dbus-protocol.h:
44 Add message and service defines.
46 2003-01-25 Anders Carlsson <andersca@codefactory.se>
48 * dbus/dbus-connection.c: (dbus_connection_send_message):
49 * dbus/dbus-message-internal.h:
50 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
51 (dbus_message_write_header):
52 Remove _dbus_messag_unlock and don't set the client serial on a
53 message if one already exists.
55 2003-01-24 Havoc Pennington <hp@pobox.com>
57 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
60 * bus/driver.c (bus_driver_handle_list_services): fix a leak
63 2003-01-25 Anders Carlsson <andersca@codefactory.se>
65 * dbus/dbus-list.c: (alloc_link), (free_link):
66 Use a memory pool for the links.
68 2003-01-25 Anders Carlsson <andersca@codefactory.se>
70 * bus/connection.c: (bus_connection_foreach):
72 Add new bus_connection_foreach function.
74 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
75 Add function that broadcasts a message to all clients.
77 (bus_driver_send_service_created), (bus_driver_handle_hello),
78 (bus_driver_send_welcome_message),
79 (bus_driver_handle_list_services), (bus_driver_message_handler):
80 Implement functions that take care of listing services, and notifying
81 clients when new services are created.
83 * bus/services.c: (bus_services_list):
85 Add new function that returns an array of strings with the currently
90 Update copyright year.
92 2003-01-25 Anders Carlsson <andersca@codefactory.se>
94 * dbus/dbus-connection.c: (dbus_connection_send_message):
95 Unlock the message in case it was sent earlier.
97 (dbus_connection_send_message_with_reply_and_block):
98 Remove the reply message from the list.
100 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
101 Set array_len and new_pos correctly.
103 (_dbus_marshal_test):
106 * dbus/dbus-message-internal.h:
107 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
108 New function that returns the reply serial.
110 (_dbus_message_unlock):
111 New function that unlocks a message and resets its header.
113 (dbus_message_append_string_array),
114 (dbus_message_get_fields_valist),
115 (dbus_message_iter_get_field_type),
116 (dbus_message_iter_get_string_array),
117 (dbus_message_get_fields),
118 (dbus_message_append_fields_valist):
119 Handle string arrays.
121 (dbus_message_set_sender):
122 Make this function public since the bus daemon needs it.
124 (decode_header_data):
125 Set the reply serial to -1 initially.
127 * dbus/dbus-message.h:
128 Add dbus_message_set_sender.
130 2003-01-24 Havoc Pennington <hp@pobox.com>
132 * doc/dbus-specification.sgml: add some stuff
134 2003-01-22 Havoc Pennington <hp@pobox.com>
136 * doc/dbus-specification.sgml: Start to document the protocol.
138 2003-01-22 Havoc Pennington <hp@pobox.com>
140 * dbus/dbus-connection.c
141 (dbus_connection_send_message_with_reply_and_block): add some @todo
143 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
145 2003-01-21 Havoc Pennington <hp@pobox.com>
147 (patch untested because can't compile)
149 * bus/driver.c (create_unique_client_name): make this function
150 never recycle client names. Also, caller should initialize
153 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
155 2003-01-21 Anders Carlsson <andersca@codefactory.se>
157 * dbus/dbus-marshal.c: (_dbus_marshal_double),
158 (_dbus_marshal_int32), (_dbus_marshal_uint32),
159 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
160 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
161 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
162 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
163 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
164 * dbus/dbus-marshal.h:
165 * dbus/dbus-protocol.h:
166 Add support for marshalling and demarshalling integer, double
169 2003-01-21 Anders Carlsson <andersca@codefactory.se>
174 * bus/connection.c: (connection_disconnect_handler):
175 Remove the connection from the bus driver's list.
177 (connection_watch_callback): Dispatch messages.
179 (free_connection_data): Free connection name.
181 (bus_connection_setup): Add connection to the bus driver's list.
182 (bus_connection_remove_owned_service):
183 (bus_connection_set_name), (bus_connection_get_name):
184 Add functions for setting and getting the connection's name.
187 Add function headers.
189 * bus/driver.c: (create_unique_client_name),
190 (bus_driver_handle_hello_message),
191 (bus_driver_send_welcome_message), (bus_driver_message_handler),
192 (bus_driver_add_connection), (bus_driver_remove_connection):
195 * bus/services.c: (bus_service_free):
197 New file that handles communication and registreation with the bus
200 2003-01-21 Anders Carlsson <andersca@codefactory.se>
202 * dbus/dbus-connection.c: (dbus_connection_send_message):
203 Add a new client_serial parameter.
205 (dbus_connection_send_message_with_reply):
206 Remove a @todo since we've implemented the blocking function.
208 (dbus_connection_send_message_with_reply_and_block):
209 New function that sends a message and waits for a reply and
210 then returns the reply.
212 * dbus/dbus-connection.h:
215 * dbus/dbus-errors.c: (dbus_result_to_string):
216 * dbus/dbus-errors.h:
219 * dbus/dbus-message-internal.h:
220 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
221 (_dbus_message_set_sender), (dbus_message_write_header),
222 (dbus_message_new_reply), (decode_header_data),
223 (_dbus_message_loader_return_buffer), (_dbus_message_test):
224 * dbus/dbus-message.h:
225 Add new functions that set the reply serial and sender.
226 Also marshal and demarshal them correctly and add test.
228 * dbus/dbus-protocol.h:
229 Add new DBUS_MESSAGE_TYPE_SENDER.
232 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
233 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
234 (dbus_connection_hookup_with_g_main):
235 * glib/test-dbus-glib.c: (main):
236 Rewrite to use GIOChannel and remove the GSource crack.
238 * test/echo-client.c: (main):
239 * test/watch.c: (check_messages):
240 Update for changed APIs
242 2003-01-19 Anders Carlsson <andersca@codefactory.se>
244 * dbus/Makefile.am: Add dbus-timeout.[cħ]
246 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
247 Create a DBusTimeoutList.
248 (dbus_connection_set_timeout_functions): Add new function to
249 set timeout callbacks
251 * dbus/dbus-connection.h: Add public DBusTimeout API.
253 * dbus/dbus-message.c: (dbus_message_get_service):
254 * dbus/dbus-message.h: New function.
256 * dbus/dbus-server.c: Fix small doc typo.
258 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
260 2003-01-19 Anders Carlsson <andersca@codefactory.se>
262 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
263 of the string, just as long as specified.
265 2003-01-19 Havoc Pennington <hp@pobox.com>
267 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
270 * dbus/dbus-server.c (dbus_server_set_max_connections)
271 (dbus_server_get_max_connections, dbus_server_get_n_connections):
272 keep track of current number of connections, and add API for
273 setting a max (but haven't implemented enforcing the max yet)
275 2003-01-18 Havoc Pennington <hp@pobox.com>
277 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
278 reading/writing if read_watch != NULL or write_watch != NULL.
280 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
281 the message loader code to actually load message->header and
282 message->body into the newly-created message.
284 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
287 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
288 (dbus_connection_get_max_message_size)
289 (dbus_connection_set_max_live_messages_size)
290 (dbus_connection_get_max_live_messages_size): implement some
291 resource limitation functions
293 * dbus/dbus-resources.c: new file implementing some of the
294 resource limits stuff
296 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
297 missing docs, add @todo to handle OOM etc.
299 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
302 2003-01-18 Havoc Pennington <hp@pobox.com>
304 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
305 connection if it hasn't been already.
307 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
308 replace with DisconnectFunction.
310 2003-01-18 Havoc Pennington <hp@pobox.com>
312 Building --disable-verbose-mode --disable-asserts --disable-tests
313 cuts the library from 112K to 45K or so
315 * configure.in: check for varargs macro support,
316 add --enable-verbose-mode, --enable-asserts.
318 * dbus/dbus-internals.h (_dbus_assert): support
320 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
322 2003-01-18 Havoc Pennington <hp@pobox.com>
324 * dbus/dbus-test.c: include config.h so that tests actually run
326 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
327 so the failure mode when that assumption fails will be plenty
330 2003-01-18 Havoc Pennington <hp@pobox.com>
332 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
334 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
337 * test/Makefile.am: don't use special variable "TESTS" for echo-*
338 since we don't want to use those in make check
340 2003-01-15 Havoc Pennington <hp@redhat.com>
346 2003-01-15 Havoc Pennington <hp@redhat.com>
348 * test/Makefile.am: fix so that test source code ends up in the
349 distribution on make distcheck
351 2003-01-15 Havoc Pennington <hp@redhat.com>
357 2003-01-15 Havoc Pennington <hp@redhat.com>
359 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
360 fix build when --disable-tests
362 * Makefile.am (EXTRA_DIST): put HACKING in here
364 * HACKING: document procedure for making a tarball release.
366 2003-01-14 Anders Carlsson <andersca@codefactory.se>
368 * bus/connection.c: (connection_error_handler),
369 (bus_connection_setup):
370 * bus/main.c: (main):
371 Make sure that the DBusConnectionData struct is NULLed
372 out to prevent a segfault.
374 * dbus/dbus-errors.c: (dbus_result_to_string):
375 * dbus/dbus-errors.h:
376 * dbus/dbus-message.c: (dbus_message_get_fields),
377 (dbus_message_get_fields_valist), (_dbus_message_test):
378 * dbus/dbus-message.h:
379 Make dbus_message_get_fields return a result code so we can
380 track invalid fields as well as oom.
382 2003-01-11 Havoc Pennington <hp@pobox.com>
384 * configure.in: change --enable-test/--enable-ansi action-if-given
385 to enable_foo=$enableval instead of enable_foo=yes
387 2003-01-08 Havoc Pennington <hp@pobox.com>
389 * dbus/dbus-string.c (_dbus_string_align_length): new function
391 * dbus/dbus-test-main.c: move main() for test app here
393 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
394 symbol to run tests, because dbus-test isn't in the main
397 Code review nitpicks.
399 * dbus/dbus-message.c (dbus_message_write_header): add newlines
400 for people with narrow emacs ;-). Assert client_serial was filled
401 in. Assert message->name != NULL.
402 (dbus_message_append_fields): have "first_field_type" arg separate
403 from va list, needed for C++ binding that also uses varargs IIRC
404 and helps with type safety
405 (dbus_message_new): add @todo about using DBusString to store
406 service/name internally
407 (dbus_message_new): don't leak ->service and ->name on OOM later
409 (dbus_message_unref): free the service name
410 (dbus_message_get_fields): same change to varargs
411 i.e. first_field_type
412 (_dbus_message_loader_return_buffer): assert that the message data
413 is aligned (if not it's a bug in our code). Put in verbose griping
414 about why we set corrupted = TRUE.
415 (decode_header_data): add FIXME that char* is evil. Was going to
416 add FIXME about evil locale-specific string.h strncmp, but just
417 switched to wacky string-as-uint32 optimization. Move check for
418 "no room for field name" above get_const_data_len() to avoid
419 assertion failure in get_const_data_len if we have trailing 2
420 bytes or the like. Check for service and name fields being
421 provided twice. Don't leak service/name on error. Require field
422 names to be aligned to 4 bytes.
424 * dbus/dbus-marshal.c: move byte swap stuff to header
425 (_dbus_pack_int32): uscore-prefix
426 (_dbus_unpack_int32): uscore-prefix
427 (_dbus_unpack_uint32): export
428 (_dbus_demarshal_string): add @todo complaining about use of
430 (_dbus_marshal_get_field_end_pos): add @todo about bad error
431 handling allowing corrupt data to go unchecked
433 2003-01-08 Havoc Pennington <hp@redhat.com>
435 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
436 to the select() as needed for authentication. (should be using
437 _dbus_poll() not select, but for another day)
439 * dbus/dbus.h: include dbus/dbus-protocol.h
441 2003-01-08 Anders Carlsson <andersca@codefactory.se>
443 * dbus/Makefile.am (dbusinclude_HEADERS): Install
446 2003-01-08 Anders Carlsson <andersca@codefactory.se>
448 * dbus/dbus-internals.c: (_dbus_type_to_string):
449 New function that returns a string describing a type.
451 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
452 * dbus/dbus-marshal.h:
453 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
454 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
455 (dbus_message_iter_get_byte_array):
456 * dbus/dbus-message.h:
457 Add new convenience functions for appending and getting message fields.
458 Also add demarshalling routines for byte arrays.
460 2003-01-07 Anders Carlsson <andersca@codefactory.se>
462 * dbus/dbus-connection-internal.h:
463 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
464 (_dbus_connection_get_next_client_serial),
465 (dbus_connection_send_message):
466 * dbus/dbus-internals.h:
467 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
468 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
469 (_dbus_marshal_uint32), (_dbus_demarshal_double),
470 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
471 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
472 (_dbus_verbose_bytes), (_dbus_marshal_test):
473 * dbus/dbus-marshal.h:
474 * dbus/dbus-message-internal.h:
475 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
476 (dbus_message_write_header), (_dbus_message_lock),
477 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
478 (dbus_message_get_name), (dbus_message_append_int32),
479 (dbus_message_append_uint32), (dbus_message_append_double),
480 (dbus_message_append_string), (dbus_message_append_byte_array),
481 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
482 (dbus_message_iter_unref), (dbus_message_iter_has_next),
483 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
484 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
485 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
486 (decode_header_data), (_dbus_message_loader_return_buffer),
487 (message_iter_test), (_dbus_message_test):
488 * dbus/dbus-message.h:
489 * dbus/dbus-protocol.h:
490 * dbus/dbus-test.c: (main):
492 * glib/test-dbus-glib.c: (message_handler), (main):
493 * test/echo-client.c: (main):
494 * test/watch.c: (check_messages):
495 Make messages sendable and receivable for real.
497 2003-01-07 Anders Carlsson <andersca@codefactory.se>
499 * dbus/dbus-marshal.c: (_dbus_marshal_double),
500 (_dbus_marshal_string), (_dbus_marshal_byte_array):
501 * dbus/dbus-message.c: (dbus_message_append_int32),
502 (dbus_message_append_uint32), (dbus_message_append_double),
503 (dbus_message_append_string), (dbus_message_append_byte_array):
504 Handle OOM restoration.
506 2003-01-07 Anders Carlsson <andersca@codefactory.se>
508 * dbus/dbus-marshal.c: (_dbus_marshal_string),
509 (_dbus_demarshal_string), (_dbus_marshal_test):
510 * dbus/dbus-marshal.h:
511 * dbus/dbus-message.c: (dbus_message_get_name),
512 Document these functions.
514 (dbus_message_append_int32), (dbus_message_append_uint32),
515 (dbus_message_append_double), (dbus_message_append_string),
516 (dbus_message_append_byte_array):
517 * dbus/dbus-message.h:
518 Add functions for adding message fields of different types.
520 * dbus/dbus-protocol.h:
521 Add the different types.
523 2003-01-05 Havoc Pennington <hp@pobox.com>
525 * bus/connection.c: implement routines for handling connections,
526 first thing is keeping a list of owned services on each connection
527 and setting up watches etc.
529 * bus/services.c: implement a mapping from service names to lists
532 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
534 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
535 to use static mutexes for global data
537 * dbus/dbus-connection.c (dbus_connection_set_data): add new
538 collection of functions to set/get application-specific data
539 on the DBusConnection.
541 2003-01-04 Havoc Pennington <hp@pobox.com>
543 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
544 (_dbus_poll): new function
546 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
549 * bus/loop.c: initial code for the daemon main loop
551 2003-01-04 Havoc Pennington <hp@pobox.com>
553 * test/watch.c (error_handler): make it safe if the error handler
554 is called multiple times (if we s/error handler/disconnect
555 handler/ we should just guarantee it's called only once)
557 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
558 error handler on disconnect (it's quite possible we should
559 just change the error handler to a "disconnect handler," I'm
560 not sure we have any other meaningful errors)
562 * configure.in: check for getpwnam_r
564 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
565 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
566 mechanism as in SASL spec, using socket credentials
568 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
569 (_dbus_send_credentials_unix_socket): new function
571 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
573 (_dbus_write): only check errno if <0 returned
574 (_dbus_write_two): ditto
576 2003-01-02 Anders Carlsson <andersca@codefactory.se>
578 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
579 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
580 (_dbus_marshal_test):
581 * dbus/dbus-marshal.h:
582 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
583 to _dbus_marshal_utf8_string. Also fix some tests.
585 2002-12-28 Harri Porten <porten@kde.org>
587 * configure.in: added check for C++ compiler and a very cheesy
588 check for the Qt integration
590 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
592 * qt/Makefile.am: added
594 * qt/.cvsignore: added
596 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
597 latter, added #ifdef QT_THREAD_SUPPORT guard.
599 * dbus/Makefile.am: added missing headers for make dist
601 2002-12-28 Kristian Rietveld <kris@gtk.org>
603 * dbus/Makefile.am: fixup export-symbols-regex.
605 2002-12-27 Anders Carlsson <andersca@codefactory.se>
607 * acinclude.m4: Add this file and put the
608 PKG_CHECK_MODULE macro in it.
610 2002-12-27 Anders Carlsson <andersca@codefactory.se>
612 * dbus/dbus-marshal.c: (_dbus_marshal_string),
613 (_dbus_demarshal_double), (_dbus_demarshal_int32),
614 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
615 (_dbus_marshal_test):
616 Make the demarshalling routines align the pos argument.
617 Add string marshalling tests and fix the obvious bugs
620 2002-12-26 Havoc Pennington <hp@pobox.com>
622 * dbus/dbus-auth.c: fixes fixes fixes
624 * dbus/dbus-transport-unix.c: wire up support for
625 encoding/decoding data on the wire
627 * dbus/dbus-auth.c (_dbus_auth_encode_data)
628 (_dbus_auth_decode_data): append to target string
629 instead of nuking it.
631 2002-12-26 Havoc Pennington <hp@pobox.com>
633 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
634 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
637 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
638 avoid swap_bytes() overhead (ignoring possible assembly stuff for
639 now). Main point is because I wanted unpack_uint32 to implement
641 (_dbus_verbose_bytes): new function
643 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
645 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
646 mechanism to handle a corrupt message stream
647 (_dbus_message_loader_new): fix preallocation to only prealloc,
650 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
651 (_dbus_string_test): enhance tests for copy/move and fix the
654 * dbus/dbus-transport-unix.c: Hold references in more places to
655 avoid reentrancy problems
657 * dbus/dbus-transport.c: ditto
659 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
660 leak reference count in no-message case
662 * test/watch.c (do_mainloop): handle adding/removing watches
663 during iteration over the watches. Also, ref the connection/server
664 stored on a watch, so we don't try to mangle a destroyed one.
666 * dbus/dbus-transport-unix.c (do_authentication): perform
669 * dbus/dbus-auth.c (get_state): add a state
670 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
671 (_dbus_auth_get_unused_bytes): append the unused bytes
672 to the passed in string, rather than prepend
674 * dbus/dbus-transport.c (_dbus_transport_init_base): create
675 the auth conversation DBusAuth
677 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
678 (_dbus_transport_new_for_domain_socket): when creating a
679 transport, pass in whether it's a client-side or server-side
680 transport so we know which DBusAuth to create
682 2002-12-03 Havoc Pennington <hp@pobox.com>
684 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
685 _after_ finalizing the derived members
686 (unix_connection_set): unref watch if we fail to add it
688 * dbus/dbus-connection.c (dbus_connection_unref): delete the
689 transport first, so that the connection owned by the
690 transport will be valid as the transport finalizes.
692 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
693 if necessary, and remove watches from the connection.
695 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
697 2002-12-26 Anders Carlsson <andersca@codefactory.se>
699 * dbus/dbus-marshal.c: (_dbus_marshal_string),
700 (_dbus_demarshal_double), (_dbus_demarshal_int32),
701 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
702 (_dbus_marshal_test):
703 * dbus/dbus-marshal.h:
704 Add string marshal functions and have the demarshal functions
705 return the new position.
707 2002-12-25 Havoc Pennington <hp@pobox.com>
709 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
710 it is a simple protocol that just maps directly to SASL.
712 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
713 initial implementation, not actually used yet.
715 * dbus/dbus-string.c (_dbus_string_find): new function
716 (_dbus_string_equal): new function
717 (_dbus_string_base64_encode): new function
718 (_dbus_string_base64_decode): new function
720 2002-12-25 Anders Carlsson <andersca@codefactory.se>
723 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
724 (_dbus_marshal_int32), (_dbus_marshal_uint32),
725 (_dbus_demarshal_double), (_dbus_demarshal_int32),
726 (_dbus_demarshal_uint32), (_dbus_marshal_test):
727 * dbus/dbus-marshal.h:
728 * dbus/dbus-protocol.h:
729 * dbus/dbus-test.c: (main):
731 Add un-optimized marshalling/demarshalling routines.
733 2002-12-25 Harri Porten <porten@kde.org>
735 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
737 2002-12-24 Zack Rusin <zack@kde.org>
739 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
740 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
743 2002-12-24 Havoc Pennington <hp@pobox.com>
745 * glib/dbus-gthread.c: fix include
747 * glib/dbus-glib.h: rename DBusMessageHandler for now.
748 I think glib API needs to change, though, as you don't
749 want to use DBusMessageFunction, you want to use the
750 DBusMessageHandler object. Probably
751 dbus_connection_open_with_g_main_loop()
752 and dbus_connection_setup_g_main_loop() or something like that
753 (but think of better names...) that just create a connection
754 that has watch/timeout functions etc. already set up.
756 * dbus/dbus-connection.c
757 (dbus_connection_send_message_with_reply): new function just to
758 show how the message handler helps us deal with replies.
760 * dbus/dbus-list.c (_dbus_list_remove_last): new function
762 * dbus/dbus-string.c (_dbus_string_test): free a string that
765 * dbus/dbus-hash.c: use memory pools for the hash entries
766 (rebuild_table): be more paranoid about overflow, and
767 shrink table when we can
768 (_dbus_hash_test): reduce number of sprintfs and write
769 valid C89. Add tests for case where we grow and then
770 shrink the hash table.
772 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
774 * dbus/dbus-connection.c (dbus_connection_register_handler)
775 (dbus_connection_unregister_handler): new functions
777 * dbus/dbus-message.c (dbus_message_get_name): new
779 * dbus/dbus-list.c: fix docs typo
781 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
782 an object representing a handler for messages.
784 2002-12-16 Anders Carlsson <andersca@codefactory.se>
787 * glib/dbus-gthread.c: (dbus_gthread_init):
788 Don't use the gdbus prefix for public functions.
790 2002-12-16 Anders Carlsson <andersca@codefactory.se>
794 Add GLib checks and fixup .pc files
798 * glib/dbus-gmain.c: (gdbus_connection_prepare),
799 (gdbus_connection_check), (gdbus_connection_dispatch),
800 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
801 (dbus_connection_gsource_new):
802 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
803 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
804 * glib/test-dbus-glib.c: (message_handler), (main):
807 2002-12-15 Harri Porten <porten@kde.org>
809 * autogen.sh: check for libtoolize before attempting to use it
811 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
814 * .cvsignore: ignore more stamp files
816 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
818 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
819 without make install.
821 2002-12-15 Havoc Pennington <hp@pobox.com>
823 * dbus/dbus-threads.c: add thread stubs that a higher library
824 layer can fill in. e.g. the GLib wrapper might fill them in with
825 GThread stuff. We still need to use this thread API to
826 thread-safe-ize the library.
828 2002-12-12 Havoc Pennington <hp@pobox.com>
830 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
831 below new interfaces and include fewer system headers.
833 * dbus/dbus-sysdeps.c (_dbus_read): new function
834 (_dbus_write): new function
835 (_dbus_write_two): new function
836 (_dbus_connect_unix_socket): new function
837 (_dbus_listen_unix_socket): new function
839 * dbus/dbus-message-internal.h: change interfaces to use
842 2002-12-11 Havoc Pennington <hp@pobox.com>
844 * dbus/dbus-types.h: add dbus_unichar
846 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
848 * dbus/dbus-connection.c (dbus_connection_send_message): return
851 * dbus/dbus-transport.c: include dbus-watch.h
853 * dbus/dbus-connection.c: include dbus-message-internal.h
855 * HACKING: add file with coding guidelines stuff.
857 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
858 handling here, for security purposes (as in vsftpd). Not actually
859 using this class yet.
861 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
862 system/libc usage here, as in vsftpd, for ease of auditing (and
863 should also simplify portability). Haven't actually moved all the
864 system/libc usage into here yet.
866 2002-11-25 Havoc Pennington <hp@pobox.com>
868 * dbus/dbus-internals.c (_dbus_verbose): fix to not
869 always print the first verbose message.
871 2002-11-24 Havoc Pennington <hp@pobox.com>
873 * test/echo-client.c, test/echo-server.c: cheesy test
876 * configure.in (AC_CHECK_FUNCS): check for writev
878 * dbus/dbus-message.c (_dbus_message_get_network_data): new
881 * dbus/dbus-list.c (_dbus_list_foreach): new function
883 * dbus/dbus-internals.c (_dbus_verbose): new function
885 * dbus/dbus-server.c, dbus/dbus-server.h: public object
886 representing a server that listens for connections.
888 * dbus/.cvsignore: create
890 * dbus/dbus-errors.h, dbus/dbus-errors.c:
891 public API for reporting errors
893 * dbus/dbus-connection.h, dbus/dbus-connection.c:
894 public object representing a connection that
895 sends/receives messages. (Same object used for
896 both client and server.)
898 * dbus/dbus-transport.h, dbus/dbus-transport.c:
899 Basic abstraction for different kinds of stream
900 that we might read/write messages from.
902 2002-11-23 Havoc Pennington <hp@pobox.com>
904 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
907 * dbus/dbus-test.c (main): add list test, and include
908 dbus-test.h as intended
910 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
911 (_dbus_hash_table_remove_int): return value indicates
912 whether the entry existed to remove
914 * dbus/dbus-list.c: add linked list utility class,
917 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
920 2002-11-23 Havoc Pennington <hp@pobox.com>
922 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
923 DBUS_END_DECLS to nothing, that should fix this once and for all
925 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
927 * dbus/dbus-message.c, dbus/dbus-hash.c:
928 add some missing @brief
930 2002-11-23 Havoc Pennington <hp@pobox.com>
932 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
933 to avoid confusing Doxygen
935 * dbus/dbus-hash.c: @} not }@
937 * dbus/dbus-message.c (struct DBusMessage): split out
940 2002-11-23 Havoc Pennington <hp@pobox.com>
942 * configure.in: pile on more warning flags if using gcc
944 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
945 to document static functions
947 * configure.in: add summary to end of configure so it
948 looks nice and attractive
950 * dbus/dbus-hash.c: finish implementation and write unit
953 * configure.in: add --enable-tests to enable unit tests
955 * dbus/dbus-test.c: test program to run unit tests
956 for all files in dbus/*, initially runs a test for
959 * dbus/dbus-internals.h: file to hold some internal utility stuff
961 2002-11-22 Havoc Pennington <hp@redhat.com>
963 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
964 "ported" away from Tcl
966 * dbus/dbus-types.h: header for types such as dbus_bool_t
968 2002-11-22 Havoc Pennington <hp@redhat.com>
970 * dbus/dbus.h: fixups for doc warnings
972 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
974 (QUIET): make it quiet so we can see warnings
976 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
978 2002-11-22 Havoc Pennington <hp@redhat.com>
980 * Makefile.am: include "Doxyfile" target in all-local
982 * configure.in: generate the Doxyfile
984 * Doxyfile.in: move Doxyfile here, so we can use
985 configure to generate a Doxyfile with the right
988 2002-11-22 Havoc Pennington <hp@redhat.com>
990 * dbus/dbus-message.c: move inline docs into .c file
992 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
993 so all docs are under doc/
994 (MAN_EXTENSION): generate man pages. Use extension
995 ".3dbus" which matches ".3qt" on my system,
996 I guess this is OK, I don't know really.
997 (FILE_PATTERNS): look for .c files not .h, makes sense
1000 2002-11-22 Havoc Pennington <hp@pobox.com>
1002 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1003 because any app can be a server, and any app can be a client,
1004 the bus is a special kind of server.
1006 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1008 * Doxyfile : adding. Still needs Makefile rules to be generated
1009 automatically (just run "doxygen" in the toplevel dir for now to
1012 * dbus/dbus-message.h : Adding sample docs (javadoc since
1013 resembles gtk-doc a little more)
1015 * dbus/dbus.h : Adding sample docs
1017 2002-11-21 Havoc Pennington <hp@redhat.com>
1019 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1020 so we can allow ourselves to include files directly,
1021 instead of having to use dbus.h
1023 * dbus/dbus.h: fill in
1025 * dbus/dbus-message.h: sketch out a sample header file.
1026 Include griping if you include it directly instead of
1029 * dbus/dbus-macros.h: new file with macros for extern "C",
1030 TRUE/FALSE, NULL, etc.
1032 * doc/file-boilerplate.c: put include guards in here
1034 2002-11-21 Havoc Pennington <hp@redhat.com>
1036 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1038 * COPYING: include the GPL as well, and license code
1039 under both AFL and GPL.
1041 2002-11-21 Havoc Pennington <hp@redhat.com>
1043 * acconfig.h: get rid of this
1045 * autogen.sh (run_configure): add --no-configure option
1047 * configure.in: remove AC_ARG_PROGRAM to make
1048 autoconf complain less. add AC_PREREQ.
1049 add AC_DEFINE third arg.
1051 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1054 Fix references so we can distcheck.
1056 2002-11-21 Havoc Pennington <hp@redhat.com>
1058 * Initial module creation