2004-03-18 Richard Hult <richard@imendio.com>
[platform/upstream/dbus.git] / ChangeLog
1 2004-03-18  Richard Hult  <richard@imendio.com>
2
3         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
4         (dbus_message_set_auto_activation): Add doxygen docs.
5
6 2004-03-16  Richard Hult  <richard@imendio.com>
7
8         * bus/activation.c: (bus_activation_service_created),
9         (bus_activation_send_pending_auto_activation_messages),
10         (bus_activation_activate_service):
11         * bus/activation.h:
12         * bus/dispatch.c: (bus_dispatch),
13         (check_nonexistent_service_auto_activation),
14         (check_service_auto_activated),
15         (check_segfault_service_auto_activation),
16         (check_existent_service_auto_activation), (bus_dispatch_test):
17         * bus/driver.c: (bus_driver_handle_activate_service):
18         * bus/services.c: (bus_registry_acquire_service):
19         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
20         (dbus_message_get_auto_activation):
21         * dbus/dbus-message.h:
22         * dbus/dbus-protocol.h: Implement auto-activation.
23         
24         * doc/dbus-specification.xml: Add auto-activation to the spec.
25
26 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
27
28         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
29         fix a bug with CUSTOM types.
30
31         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
32         a unit test for this bug (used to fail).
33
34 2004-03-12  Mikael Hallendal  <micke@imendio.com>
35
36         * bus/activation.c:
37         (babysitter_watch_callback): notify all pending activations waiting for
38           the same exec that the activation failed.
39         (bus_activation_activate_service): shortcut the activation if we 
40           already waiting for the same executable to start up.
41
42 2004-03-12  Mikael Hallendal  <micke@imendio.com>
43
44         * bus/activation.c: 
45         - Added service file reloading. 
46           Each service files directory is kept in an hash table in 
47           BusActivation and each BusActivationEntry knows what .service-file it
48           was read from. So when you try to activate a service the bus will 
49           check if it's been updated, removed or if new .service-files has 
50           been installed.
51         - Test code at the bottom for the service file reloading.
52         * bus/test-main.c: (main):
53         * bus/test.h:
54         - added service reloading test.
55         * dbus/dbus-sysdeps.c: 
56         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
57
58 2004-03-08  Michael Meeks  <michael@ximian.com>
59
60         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
61         bail immediately if disconnected, to avoid busy loop.
62
63         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
64         cleanup cut/paste/inefficiency.
65
66 2004-03-01  David Zeuthen  <david@fubar.dk>
67
68         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
69         bug where args were used twice. This bug resulted in a segfault
70         on a Debian/PPC system when starting the messagebus daemon. Include
71         dbus-sysdeps.h for DBUS_VA_COPY
72
73         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
74
75         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
76         appropriate va_copy implementation. From GLib
77         
78 2004-02-24  Joe Shaw  <joe@ximian.com>
79
80         * bus/services.c (bus_registry_acquire_service): We need to pass
81         in the service name to dbus_set_error() to prevent a crash.
82
83 2003-12-26  Anders Carlsson  <andersca@gnome.org>
84
85         * AUTHORS: Reveal my True identity.
86
87 2003-12-17  Mikael Hallendal  <micke@imendio.com>
88
89         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
90         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
91
92 2003-12-13  Mikael Hallendal  <micke@imendio.com>
93
94         * doc/TODO: Added not about better error check of configuration files.
95
96 2003-12-02  Richard Hult  <richard@imendio.com>
97
98         * Update AFL version to 2.0 throughout the source files to reflect
99         the update that was done a while ago.
100
101 2003-12-02  Richard Hult  <richard@imendio.com>
102
103         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
104         wrote_dict_key to FALSE on the iter that the dict is appended to,
105         just like when appending other types. Fixes a bug where a dict
106         couldn't be put inside a dict.
107         (dbus_message_iter_append_dict_key): Fix typo in warning message.
108         (message_iter_test, _dbus_message_test): Add test case for dict
109         inside dict.
110
111 2003-12-01  David Zeuthen  <david@fubar.dk>
112
113         * python/dbus.py: Add the actual message when calling the reciever
114         of a signal such that parameters can be inspected. Add the method
115         remove_signal_receiver
116         
117 2003-11-26  Mikael Hallendal  <micke@imendio.com>
118
119         * bus/*.[ch]:
120         * dbus/*.[ch]:
121         * glib/*.[ch]: Made ref functions return the pointer
122
123 2003-11-25  Zack Rusin  <zack@kde.org>
124
125         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
126
127         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
128         wrappers,
129
130         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
131         the Integrator and to better fit with the server,
132
133 2003-11-24  Zack Rusin  <zack@kde.org>
134
135         * qt/connection.h, qt/connection.cpp: removing initDbus method since
136         the integrator handles it now
137
138         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
139         since QTimer wasn't really meant to be used the way DBusTimeout is
140
141 2003-11-24  Zack Rusin  <zack@kde.org>
142
143         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
144         Integrator class which integrates D-BUS with the Qt event loop,
145
146         * qt/connection.h, qt/connection.cpp: Move all the code which
147         was dealing with D-BUS integration to the Integrator class,
148         and start using Integrator,
149
150 2003-11-23  Zack Rusin  <zack@kde.org>
151
152         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
153         wrapper
154
155         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
156         switching namespaces to DBusQt, reworking the class,
157
158         * Makefile.cvs: switching dependencies so that it matches KDE 
159         schematics,
160         
161         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
162         the library
163
164 2003-11-19  Havoc Pennington  <hp@redhat.com>
165
166         * NEWS: update
167
168         * configure.in: bump version to 0.20
169
170         * configure.in (have_qt): add yet another place to look for qt
171         (someone hand trolltech a .pc file...)
172
173 2003-11-01  Havoc Pennington  <hp@redhat.com>
174
175         * doc/dbus-specification.xml: add state machine docs on the auth
176         protocol; just a first draft, I'm sure it's wrong.      
177
178 2003-10-28  David Zeuthen  <david@fubar.dk>
179
180         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
181         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
182         
183 2003-10-28  Havoc Pennington  <hp@redhat.com>
184
185         * dbus/dbus-message.c (get_next_field): delete unused function
186
187 2003-10-28  Havoc Pennington  <hp@redhat.com>
188
189         * bus/expirelist.c (do_expiration_with_current_time): detect
190         failure of the expire_func due to OOM
191
192         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
193
194         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
195         NoReply error that's now created by the bus when the service exits
196
197 2003-10-28  Havoc Pennington  <hp@redhat.com>
198
199         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
200         tests for set_path, set_interface, set_member, etc.
201
202         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
203
204         * dbus/dbus-message.c (set_string_field): always just delete and
205         re-append the field; accept NULL for deletion
206         (re_align_fields_recurse): reimplement
207         
208 2003-10-26  Havoc Pennington  <hp@redhat.com>
209
210         * dbus/dbus-connection.c: fix docs to properly describe the
211         disconnected message
212         (_dbus_connection_notify_disconnected): remove this function; 
213         we can't synchronously add the disconnected message, we have to 
214         do it after we've queued any remaining real messages
215         (_dbus_connection_get_dispatch_status_unlocked): queue the
216         disconnect message only if the transport has finished queueing all
217         its real messages and is disconnected.
218         (dbus_connection_disconnect): update the dispatch status here
219
220 2003-10-22  Havoc Pennington  <hp@redhat.com>
221
222         * bus/bus.c (bus_context_check_security_policy): fix up assertion
223
224         * bus/connection.c (bus_transaction_send_from_driver): set the
225         destination to the connection's base service
226
227 2003-10-20  Havoc Pennington  <hp@redhat.com>
228
229         hmm, make check is currently not passing.
230         
231         * doc/dbus-specification.xml: add requirement that custom type
232         names follow the same rules as interface names.
233
234         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
235         duplication and allow 'c' to be 'custom'; dict is now 'm' for
236         'map'
237
238         * doc/dbus-specification.xml: update type codes to match
239         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
240         CUSTOM. Add type OBJECT_PATH to the spec.
241
242 2003-10-17  Havoc Pennington  <hp@redhat.com>
243
244         * bus/driver.c (create_unique_client_name): use "." as separator
245         in base service names instead of '-'
246
247         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
248         byte at the end of the string
249
250         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
251         optimization macros since string validation seems to be a slow
252         point.
253         
254         * doc/dbus-specification.xml: restrict valid
255         service/interface/member/error names. Add test suite code for the
256         name validation.
257
258         * dbus/dbus-string.c: limit service/interface/member/error names 
259         to [0-9][A-Z][a-z]_
260
261         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
262         format arg to verbose spew
263
264         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
265         memory, return instead of g_error
266
267         * test/test-service.c (path_message_func): support emitting a
268         signal on request
269
270         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
271         activation bus type if DBUS_BUS_ACTIVATION was set; default to
272         assuming the activation bus was the session bus so that services
273         started manually will still register.
274         (init_connections_unlocked): fix so that in OOM situation we get
275         the same semantics when retrying the function
276         
277         * test/test-service.c (main): change to use path registration, to
278         test those codepaths; register with DBUS_BUS_ACTIVATION rather
279         than DBUS_BUS_SESSION
280
281 2003-10-16  Havoc Pennington  <hp@redhat.com>
282
283         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
284
285         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
286         coverage of the tests
287         (coverage-report.txt): don't move the .da and .bbg files around
288
289 2003-10-16  Havoc Pennington  <hp@redhat.com>
290
291         * bus/bus.c (struct BusContext): remove struct field I didn't mean
292         to put there
293
294 2003-10-16  Havoc Pennington  <hp@redhat.com>
295
296         * bus/connection.c (bus_pending_reply_expired): either cancel or
297         execute, not both
298         (bus_connections_check_reply): use unlink, not remove_link, as we
299         don't want to free the link; fixes double free mess
300
301         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
302         where no reply was received
303
304         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
305         fix a refcount leak
306
307         * bus/signals.c (match_rule_matches): add special cases for the
308         bus driver, so you can match on sender/destination for it.
309
310         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
311         DBUS_PRINT_BACKTRACE is set
312
313         * dbus/dbus-internals.c: add pid to assertion failure messages
314
315         * dbus/dbus-connection.c: add message type code to the debug spew
316
317         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
318         sender=foo not service=foo
319
320         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
321         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
322         DBUS_ACTIVATION_ADDRESS instead
323
324         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
325         DBUS_SYSTEM_BUS_ADDRESS if appropriate
326
327         * bus/bus.c (bus_context_new): handle OOM copying bus type into
328         context struct
329
330         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
331         (dbus_message_iter_get_object_path_array): new function (half
332         finished, disabled for the moment)
333         
334         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
335         DBUS_MESSAGE_TYPE_ERROR
336
337         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
338         avoid redirecting stderr to /dev/null
339         (babysit): close stdin if not doing the "exit_with_session" thing
340
341         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
342         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
343         stdout/stdin, so things don't get confused
344         
345         * bus/system.conf.in: fix to allow replies, I modified .conf
346         instead of .conf.in again.
347
348 2003-10-14  David Zeuthen  <david@fubar.dk>
349
350         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
351         argtype to arg_type when raising unknown arg type exception.
352         Changed type list to reflect the changes in dbus-protocol.h so 
353         the bindings actually work.
354
355 2003-10-14  Havoc Pennington  <hp@redhat.com>
356
357         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
358         to have a bug keeping it from outputting the .da files sometimes
359         (string_get_string): don't append garbage nul bytes to the string.
360
361 2003-10-15  Seth Nickell  <seth@gnome.org>
362
363         * python/Makefile.am:
364
365         Include dbus_h_wrapper.h in the dist tarball.
366
367 2003-10-14  Havoc Pennington  <hp@redhat.com>
368
369         * bus/bus.c (bus_context_check_security_policy): revamp this to
370         work more sanely with new policy-based requested reply setup
371
372         * bus/connection.c (bus_transaction_send_from_driver): set bus
373         driver messages as no reply
374
375         * bus/policy.c (bus_client_policy_check_can_receive): handle a
376         requested_reply attribute on allow/deny rules
377
378         * bus/system.conf: add <allow requested_reply="true"/>
379
380         * bus/driver.c (bus_driver_handle_message): fix check for replies
381         sent to the bus driver, which was backward. How did this ever work
382         at all though? I think I'm missing something.
383
384         * dbus/dbus-message.c (decode_header_data): require error and
385         method return messages to have a reply serial field to be valid
386         (_dbus_message_loader_queue_messages): break up this function;
387         validate that reply serial and plain serial are nonzero; 
388         clean up the OOM/error handling.
389         (get_uint_field): don't return -1 from this
390         (dbus_message_create_header): fix signed/unsigned bug
391
392         * bus/connection.c (bus_connections_expect_reply): save serial of
393         the incoming message, not reply serial
394
395 2003-10-14  Havoc Pennington  <hp@redhat.com>
396
397         * bus/connection.c: implement pending reply tracking using
398         BusExpireList
399
400         * bus/bus.c (bus_context_check_security_policy): verify that a
401         reply is pending in order to allow a reply to be sent. Deny 
402         messages of unknown type.
403
404         * bus/dbus-daemon-1.1.in: update to mention new resource limits
405
406         * bus/bus.c (bus_context_get_max_replies_per_connection): new
407         (bus_context_get_reply_timeout): new
408
409 2003-10-13  Seth Nickell  <seth@gnome.org>
410
411         * python/Makefile.am:
412
413         Pass "make distcheck": remove a couple files from DIST_FILES
414         that weren't included in the final version.
415
416 2003-10-12  Havoc Pennington  <hp@pobox.com>
417
418         Added test code that 1) starts an actual bus daemon and 2) uses
419         DBusGProxy; fixed bugs that were revealed by the test. Lots 
420         more testing possible, but this is the basic framework.
421         
422         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
423         empty proxy lists from the proxy list hash
424
425         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
426         couple of return_if_fail checks
427
428         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
429         to allocate, so everything is cleared to NULL as it should be.
430
431         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
432         source as data to dbus_connection_set_timeout_functions() as the 
433         timeout functions expected
434
435         * test/glib/run-test.sh: add a little script to start up a message
436         bus and run tests using it
437
438         * tools/dbus-launch.1: updates
439
440         * tools/dbus-launch.c (main): add --config-file option
441
442         * tools/dbus-launch.c (main): remove confusing else if (runprog)
443         that could never be reached.
444
445         * dbus/dbus-message.c (dbus_message_new_method_return) 
446         (dbus_message_new_error, dbus_message_new_signal): set the
447         no-reply-expected flag on all these. Redundant, but may
448         as well be consistent.
449
450 2003-10-11  Havoc Pennington  <hp@pobox.com>
451
452         * test/decode-gcov.c (function_solve_graph): make broken block
453         graph a nonfatal error since it seems to be broken. Need to debug
454         this.
455
456         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
457         can't just check type > INVALID < LAST anymore
458
459         * dbus/dbus-message.c (dbus_message_get_signature): new function
460         (dbus_message_has_signature): new function
461         (struct DBusMessage): add signature field (right now it isn't sent
462         over the wire, just generated on the fly)
463         (dbus_message_copy): copy the signature, and init strings to
464         proper length to avoid some reallocs
465         (dbus_message_iter_init_array_iterator): return void, since it
466         can't fail
467         (dbus_message_iter_init_dict_iterator): return void since it can't fail
468         (_dbus_message_loader_queue_messages): add silly temporary hack to
469         fill in message->signature on load
470
471         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
472         characters, so they are relatively human-readable.
473
474 2003-10-11  Havoc Pennington  <hp@pobox.com>
475
476         * dbus/dbus-message.c (_dbus_message_test): add more test
477         coverage, but #if 0 for now since they uncover a bug 
478         not fixed yet; I think in re_align_field_recurse()
479         (re_align_field_recurse): add FIXME about broken assertion
480
481         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
482
483         * bus/connection.c: share a couple code bits with expirelist.c
484
485         * bus/expirelist.h, bus/expirelist.c: implement a generic
486         expire-items-after-N-seconds facility, was going to share between
487         expiring connections and replies, decided not to use for expiring
488         connections for now.
489
490         * COPYING: include AFL 2.0 (still need to change all the file headers)
491
492 2003-10-09  Havoc Pennington  <hp@redhat.com>
493
494         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
495         gcc 3.3. Not that we do anything about it yet.
496
497         * bus/signals.c (bus_match_rule_parse): impose max length on the
498         match rule text
499
500         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
501
502 2003-10-09  Havoc Pennington  <hp@redhat.com>
503
504         Make matching rules theoretically work (add parser).
505         
506         * bus/bus.c (bus_context_check_security_policy): fix up to handle
507         the case where destination is explicitly specified as bus driver
508         and someone else is eavesdropping.
509         
510         * bus/policy.c (bus_client_policy_check_can_receive): fix up
511         definition of eavesdropping and assertion
512
513         * tools/dbus-send.c (main): use dbus_message_type_from_string
514
515         * bus/signals.c (bus_match_rule_parse): implement
516
517         * dbus/dbus-message.c (dbus_message_type_from_string): new
518
519         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
520
521 2003-10-02  Havoc Pennington  <hp@pobox.com>
522
523         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
524         dbus_gproxy_oneway_call
525
526         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
527         (dbus_server_setup_with_g_main): fix to allow calling them more
528         than once on the same args
529         (dbus_bus_get_with_g_main): new function
530
531 2003-10-02  Havoc Pennington  <hp@redhat.com>
532
533         * doc/dbus-tutorial.xml: write some stuff
534
535 2003-09-29  Havoc Pennington  <hp@pobox.com>
536
537         * configure.in: split checks for Doxygen from XML docs, check for
538         xmlto
539
540         * doc/Makefile.am: XML-ify all the docs, and add a blank
541         dbus-tutorial.xml
542
543 2003-09-29  Havoc Pennington  <hp@pobox.com>
544
545         * Merge dbus-object-names branch. To see the entire patch 
546         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
547         it's huuuuge though.
548         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
549         
550 2003-09-28  Havoc Pennington  <hp@pobox.com>
551
552         * HACKING: update to reflect new server
553
554 2003-09-26  Seth Nickell  <seth@gnome.org>
555
556         * python/dbus.py:
557         * python/examples/example-signals.py:
558
559         Start implementing some notions of signals. The API
560         is really terrible, but they sort of work (with the
561         exception of being able to filter by service, and to
562         transmit signals *as* a particular service). Need to
563         figure out how to make messages come from the service
564         we registered :-(
565         
566         * python/dbus_bindings.pyx.in:
567
568         Removed duplicate message_handler callbacks.
569         
570 2003-09-25  Havoc Pennington  <hp@redhat.com>
571
572         * bus/session.conf.in: fix my mess
573
574 2003-09-25  Havoc Pennington  <hp@pobox.com>
575
576         * bus/session.conf.in: fix security policy, reported by Seth Nickell
577
578 2003-09-25  Seth Nickell  <seth@gnome.org>
579
580         * python/examples/example-service.py:
581
582         Johan notices complete wrong code in example-service, but
583         completely wrong in a way that works exactly the same (!).
584         Johan is confused, how could this possibly work? Example
585         code fails to serve purpose of making things clear.
586         Seth fixes.
587
588 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
589
590         * doc/dbus-specification.sgml: don't require header fields
591         to be 4-byte aligned and specify that fields should be
592         distinguished from padding by the fact that zero is not
593         a valid field name.
594         
595         * doc/TODO: remove re-alignment item and add item to doc
596         the OBJECT_PATH type.
597         
598         * dbus/dbus-message.c:
599         (HeaderField): rename the original member to value_offset
600         and introduce a name_offset member to keep track of where
601         the field actually begins.
602         (adjust_field_offsets): remove.
603         (append_int_field), (append_uint_field),
604         (append_string_field): don't align the start of the header
605         field to a 4-byte boundary.
606         (get_next_field): impl finding the next marhsalled field
607         after a given field.
608         (re_align_field_recurse): impl re-aligning a number of
609         already marshalled fields.
610         (delete_field): impl deleting a field of any type and
611         re-aligning any following fields.
612         (delete_int_or_uint_field), (delete_string_field): remove.
613         (set_int_field), (set_uint_field): no need to re-check
614         that we have the correct type for the field.
615         (set_string_field): ditto and impl re-aligning any
616         following fields.
617         (decode_header_data): update to take into account that
618         the fields aren't 4-byte aligned any more and the new
619         way to distinguish padding from header fields. Also,
620         don't exit when there is too much header padding.
621         (process_test_subdir): print the directory.
622         (_dbus_message_test): add test to make sure a following
623         field is re-aligned correctly after field deletion.
624         
625         * dbus/dbus-string.[ch]:
626         (_dbus_string_insert_bytes): rename from insert_byte and
627         allow the insert of multiple bytes.
628         (_dbus_string_test): test inserting multiple bytes.
629
630         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
631         warning note to docs about having to re-align any
632         marshalled values following the string.
633         
634         * dbus/dbus-message-builder.c:
635         (append_string_field), (_dbus_message_data_load):
636         don't align the header field.
637         
638         * dbus/dbus-auth.c: (process_test_subdir): print the
639         directory.
640         
641         * test/break-loader.c: (randomly_add_one_byte): upd. for
642         insert_byte change.
643         
644         * test/data/invalid-messages/bad-header-field-alignment.message:
645         new test case.
646         
647         * test/data/valid-messages/unknown-header-field.message: shove
648         a dict in the unknown field.
649
650 2003-09-25  Seth Nickell  <seth@gnome.org>
651
652         * python/dbus.py:
653         * python/dbus_bindings.pyx.in:
654
655         Handle return values.
656         
657         * python/examples/example-client.py:
658         * python/examples/example-service.py:
659
660         Pass back return values from the service to the client.
661         
662 2003-09-24  Seth Nickell  <seth@gnome.org>
663
664         * python/dbus.py:
665
666         Connect Object methods (when you are sharing an object) up... pass
667         in a list of methods to be shared. Sharing all the methods just
668         worked out too weird. You can now create nice Services over the
669         DBus in Python. :-)
670         
671         * python/dbus_bindings.pyx.in:
672
673         Keep references to user_data tuples passed into C functions so 
674         Python doesn't garbage collect on us.
675
676         Implement MethodReturn and Error subclasses of Message for creating
677         DBusMessage's of those types.
678         
679         * python/examples/example-client.py:
680         * python/examples/example-service.py:
681
682         Simple example code showing both how create DBus services and objects,
683         and how to use them.
684
685 2003-09-23  Havoc Pennington  <hp@pobox.com>
686
687         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
688
689 2003-09-23  Havoc Pennington  <hp@redhat.com>
690
691         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
692         (dbus_gproxy_disconnect_signal): implement
693         (dbus_gproxy_manager_remove_signal_match): implement
694         (dbus_gproxy_manager_add_signal_match): implement
695         (dbus_gproxy_oneway_call): implement
696
697 2003-09-23  Havoc Pennington  <hp@pobox.com>
698
699         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
700         subclass. This means dropping the transparent thread safety of the
701         proxy; you now need a separate proxy per-thread, or your own
702         locking on the proxy. Probably right anyway.
703         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
704
705 2003-09-22  Havoc Pennington  <hp@redhat.com>
706
707         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
708
709 2003-09-21  Seth Nickell  <seth@gnome.org>
710
711         First checkin of the Python bindings.
712         
713         * python/.cvsignore:
714         * python/Makefile.am:
715         * python/dbus_bindings.pyx.in:
716         * python/dbus_h_wrapper.h:
717
718         Pieces for Pyrex to operate on, building a dbus_bindings.so
719         python module for low-level access to the DBus APIs.
720         
721         * python/dbus.py:
722
723         High-level Python module for accessing DBus objects.
724
725         * configure.in:
726         * Makefile.am:
727
728         Build stuff for the python bindings.
729
730         * acinclude.m4:
731
732         Extra macro needed for finding the Python C header files.
733
734 2003-09-21  Havoc Pennington  <hp@pobox.com>
735
736         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
737         implementing the proxy manager, didn't get very far.
738
739         * dbus/dbus-bus.c (dbus_bus_add_match): new
740         (dbus_bus_remove_match): new
741
742         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
743         path_name argument; adjust the other not-yet-implemented 
744         gproxy constructors to be what I think they should be.
745
746 2003-09-21  Havoc Pennington  <hp@pobox.com>
747
748         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
749         by default for message bus connections.
750
751         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
752         exit_on_disconnect flag is set and we process the disconnected
753         signal.
754         (dbus_connection_set_exit_on_disconnect): new function
755
756 2003-09-21  Havoc Pennington  <hp@pobox.com>
757
758         Get matching rules mostly working in the bus; only actually
759         parsing the rule text remains. However, the client side of
760         "signal connections" hasn't been started, this patch is only the
761         bus side.
762         
763         * dbus/dispatch.c: fix for the matching rules changes
764         
765         * bus/driver.c (bus_driver_handle_remove_match)
766         (bus_driver_handle_add_match): send an ack reply from these
767         method calls
768
769         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
770         arguments, reported by Seth Nickell
771
772         * bus/config-parser.c (append_rule_from_element): support
773         eavesdrop=true|false attribute on policies so match rules 
774         can be prevented from snooping on the system bus.
775
776         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
777         and "destination" in attribute names; fix some docs bugs; 
778         add eavesdrop=true|false attribute
779
780         * bus/driver.c (bus_driver_handle_add_match)
781         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
782         messages
783
784         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
785         rid of broadcast service concept, signals are just always broadcast
786
787         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
788         mostly implement matching rules stuff (currently only exposed as signal
789         connections)
790
791 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
792
793         * doc/dbus-specification.sgml: Change the header field name
794         to be an enum and update the rest of the spec to reference
795         the fields using the conventinal name.
796
797         * dbus/dbus-protocol.h: update to reflect the spec.
798
799         * doc/TODO: add item to remove the 4 byte alignment requirement.
800         
801         * dbus/dbus-message.c: Remove the code to generalise the
802         header/body length and serial number header fields as named
803         header fields so we can reference field names using the 
804         protocol values.
805         (append_int_field), (append_uint_field), (append_string_field):
806         Append the field name as a byte rather than four chars.
807         (delete_int_or_uint_field), (delete_string_field): reflect the
808         fact that the field name and typecode now occupy 4 bytes instead
809         of 8.
810         (decode_string_field), (decode_header_data): update to reflect
811         protocol changes and move the field specific encoding from
812         decode_string_field() back into decode_header_data().
813         
814         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
815         Add utility to aid debugging.
816         
817         * dbus/dbus-message-builder.c:
818         (append_string_field), (_dbus_message_data_load): Update to
819         reflect protocol changes; Change the FIELD_NAME directive
820         to HEADER_FIELD and allow it to take the field's conventional
821         name rather than the actual value.
822         
823         * test/data/*/*.message: Update to use HEADER_FIELD instead
824         of FIELD_NAME; Always align the header on an 8 byte boundary
825         *before* updating the header length.
826
827 2003-09-15  Havoc Pennington  <hp@pobox.com>
828
829         * dbus/dbus-pending-call.c: add the get/set object data
830         boilerplate as for DBusConnection, etc. Use generic object data
831         for the notify callback.
832
833         * glib/dbus-gparser.c (parse_node): parse child nodes
834
835         * tools/dbus-viewer.c: more hacking on the dbus-viewer
836         
837         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
838         contain functions shared between the convenience lib and the
839         installed lib
840
841         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
842         -export-symbols-regex to the GLib library
843
844         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
845         fix the locking in here, and add a default handler for
846         Introspect() that just returns sub-nodes.
847
848 2003-09-14  Havoc Pennington  <hp@pobox.com>
849
850         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
851         rather than gfoo consistent
852
853         * glib/dbus-gproxy.h: delete for now, move contents to
854         dbus-glib.h, because the include files don't work right since we
855         aren't in the dbus/ subdir.
856         
857         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
858         (dbus_gproxy_end_call): finish
859         (dbus_gproxy_begin_call): finish
860
861         * glib/dbus-gmain.c (dbus_set_g_error): new
862
863         * glib/dbus-gobject.c (handle_introspect): include information
864         about child nodes in the introspection
865
866         * dbus/dbus-connection.c (dbus_connection_list_registered): new
867         function to help in implementation of introspection
868
869         * dbus/dbus-object-tree.c
870         (_dbus_object_tree_list_registered_and_unlock): new function
871
872 2003-09-12  Havoc Pennington  <hp@pobox.com>
873
874         * glib/dbus-gidl.h: add common base class for all the foo_info
875         types
876
877         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
878         similar to kdcop
879
880         * test/Makefile.am: try test srcdir -ef . in addition to test
881         srcdir = ., one of them should work (yeah lame)
882         
883         * glib/Makefile.am: build the "idl" parser stuff as a convenience
884         library
885         
886         * glib/dbus-gparser.h: make description_load routines return
887         NodeInfo* not Parser*
888
889         * Makefile.am (SUBDIRS): build test dir after all library dirs
890
891         * configure.in: add GTK+ detection
892
893 2003-09-07  Havoc Pennington  <hp@pobox.com>
894
895         * Make Doxygen contented.
896
897 2003-09-07  Havoc Pennington  <hp@pobox.com>
898
899         * doc/dbus-specification.sgml: more updates
900
901 2003-09-06  Havoc Pennington  <hp@pobox.com>
902
903         * doc/dbus-specification.sgml: partial updates
904
905         * bus/dbus-daemon-1.1.in: fix the config file docs for the
906         zillionth time; hopefully I edited the right file this time.
907
908         * bus/config-parser.c (append_rule_from_element): support
909         send_type, send_path, receive_type, receive_path
910
911         * bus/policy.c: add message type and path to the list of things
912         that can be "firewalled"
913
914 2003-09-06  Havoc Pennington  <hp@pobox.com>
915
916         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
917         (dbus_connection_register_object_path): make this not handle
918         messages to paths below the given path
919
920 2003-09-03  Havoc Pennington  <hp@pobox.com>
921
922         * test/glib/Makefile.am: add this with random glib-linked test
923         programs
924
925         * glib/Makefile.am: remove the random test programs from here,
926         leave only the unit tests
927
928         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
929         uscore/javacaps conversion, and fix     
930         (get_object_property, set_object_property): change to .NET
931         convention for mapping props to methods, set_FooBar/get_FooBar, 
932         since one language has such a convention we may as well copy it. 
933         Plus real methods in either getFooBar or get_foo_bar style won't 
934         collide with this convention.
935
936 2003-09-01  Havoc Pennington  <hp@pobox.com>
937
938         * glib/dbus-gparser.c: implement
939
940         * glib/dbus-gobject.c: start implementing skeletons support
941
942         * configure.in: when disabling checks/assert, also define
943         G_DISABLE_ASSERT and G_DISABLE_CHECKS
944
945 2003-09-01  Havoc Pennington  <hp@pobox.com>
946
947         * glib/Makefile.am: rearrange a bunch of files and get "make
948         check" framework set up
949
950 2003-08-31  Havoc Pennington  <hp@pobox.com>
951
952         * fix build with --disable-tests
953
954 2003-08-30  Havoc Pennington  <hp@pobox.com>
955
956         * dbus/dbus-connection.c: purge DBusMessageHandler
957
958         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
959         use callbacks everywhere
960
961 2003-08-30  Havoc Pennington  <hp@pobox.com>
962
963         * test/data/valid-config-files/system.d/test.conf: change to 
964         root for the user so warnings don't get printed
965
966         * dbus/dbus-message.c: add dbus_message_get_path,
967         dbus_message_set_path
968         
969         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
970         dispatching to a path
971
972         * dbus/dbus-string.c (_dbus_string_validate_path): add
973
974         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
975         (_dbus_marshal_object_path): implement
976
977         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
978         to contain the path to the target object
979         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
980         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
981
982 2003-08-30  Havoc Pennington  <hp@pobox.com>
983
984         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
985
986 2003-08-29  Havoc Pennington  <hp@pobox.com>
987
988         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
989         registered
990         (struct DBusObjectSubtree): shrink this
991         a lot, since we may have a lot of them
992         (_dbus_object_tree_free_all_unlocked): implement
993         (_dbus_object_tree_dispatch_and_unlock): implement
994
995 2003-08-29  Havoc Pennington  <hp@pobox.com>
996
997         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
998
999 2003-08-28  Havoc Pennington  <hp@pobox.com>
1000
1001         purge DBusObjectID
1002         
1003         * dbus/dbus-connection.c: port to no ObjectID, create a
1004         DBusObjectTree, rename ObjectTree to ObjectPath in public API
1005
1006         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
1007         everything except UnregisterFunction and MessageFunction
1008         
1009         * dbus/dbus-marshal.c: port away from DBusObjectID, 
1010         add DBUS_TYPE_OBJECT_PATH
1011         
1012         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
1013         dbus/dbus-objectid.[hc]: remove these, we are moving to 
1014         path-based object IDs
1015
1016 2003-08-25  Havoc Pennington  <hp@pobox.com>
1017
1018         Just noticed that dbus_message_test is hosed, I wonder when I
1019         broke that. I thought make check was passing earlier...
1020         
1021         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
1022         container tree, will replace most of dbus-object-registry
1023
1024         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1025         screwup
1026
1027 2003-08-19  Havoc Pennington  <hp@pobox.com>
1028
1029         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1030         (dbus_message_is_error): fix this function
1031
1032         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1033         match
1034
1035         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1036         reflect clarified man page
1037         (bus_client_policy_check_can_send): ditto
1038         
1039         * bus/session.conf.in: fixup
1040
1041         * bus/system.conf.in: fixup
1042
1043 2003-08-18  Havoc Pennington  <hp@redhat.com>
1044
1045         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1046
1047         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1048         dumb bug created earlier (wrong order of args to
1049         decode_header_data())
1050         
1051         * tools/dbus-send.c: port
1052
1053         * tools/dbus-print-message.c (print_message): port
1054
1055         * test/data/*messages: port all messages over
1056         
1057         * dbus/dbus-message-builder.c: support including 
1058         message type
1059         
1060         * bus/driver.c: port over
1061         
1062         * bus/dispatch.c: port over to new stuff
1063
1064         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1065         rename disconnect signal to "Disconnected"
1066
1067 2003-08-17  Havoc Pennington  <hp@pobox.com>
1068
1069         This doesn't compile yet, but syncing up so I can hack on it from
1070         work. What are branches for if not broken code? ;-)
1071         
1072         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1073         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1074         DBUS_HEADER_FIELD_ERROR_NAME
1075         
1076         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1077         for the interface+member pairs
1078         (string_hash): change to use g_str_hash algorithm
1079         (find_direct_function, find_string_function): refactor these to
1080         share most code.
1081         
1082         * dbus/dbus-message.c: port all of this over to support 
1083         interface/member fields instead of name field
1084
1085         * dbus/dbus-object-registry.c: port over
1086         
1087         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1088         from _dbus_string_validate_name
1089
1090         * bus/dbus-daemon-1.1: change file format for the 
1091         <deny>/<allow> stuff to match new message naming scheme
1092
1093         * bus/policy.c: port over
1094
1095         * bus/config-parser.c: parse new format
1096         
1097 2003-08-16  Havoc Pennington  <hp@pobox.com>
1098
1099         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1100         broken assertion
1101
1102         * glib/dbus-gproxy.c: some hacking
1103
1104 2003-08-15  Havoc Pennington  <hp@redhat.com>
1105
1106         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1107
1108         * dbus/dbus-connection.c
1109         (dbus_connection_send_with_reply_and_block): factor out internals;
1110         change to convert any error replies to DBusError instead of 
1111         returning them as a message
1112
1113 2003-08-15  Havoc Pennington  <hp@pobox.com>
1114
1115         * dbus/dbus-connection.c, 
1116         dbus/dbus-pending-call.c: Finish the pending call stuff
1117
1118 2003-08-14  Havoc Pennington  <hp@redhat.com>
1119
1120         * dbus/dbus-pending-call.c: start on new object that will replace
1121         DBusMessageHandler and ReplyHandlerData for tracking outstanding
1122         replies
1123
1124         * dbus/dbus-gproxy.c: start on proxy object used to communicate
1125         with remote interfaces
1126
1127         * dbus/dbus-gidl.c: do the boring boilerplate in here
1128         
1129 2003-08-12  Havoc Pennington  <hp@pobox.com>
1130
1131         * bus/dispatch.c (bus_dispatch): make this return proper 
1132         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1133
1134         * dbus/dbus-errors.c (dbus_set_error): use
1135         _dbus_string_append_printf_valist
1136
1137         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1138         (_dbus_string_append_printf): new
1139
1140         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1141         UNKNOWN_METHOD
1142
1143         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1144         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1145         message is unhandled.
1146
1147 2003-08-11  Havoc Pennington  <hp@pobox.com>
1148
1149         * bus/test.c (client_disconnect_handler): change to return
1150         HANDLED (would have been REMOVE_MESSAGE)
1151
1152         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1153         HANDLED/NOT_YET_HANDLED instead of
1154         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
1155         should be used.
1156
1157 2003-08-10  Havoc Pennington  <hp@pobox.com>
1158
1159         * tools/dbus-send.c (main): add --type argument, for now
1160         supporting only method_call and signal types.
1161
1162         * tools/dbus-print-message.c: print message type
1163
1164         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1165         init connection->objects
1166
1167         * doc/dbus-specification.sgml: fix sgml
1168
1169         * bus/*.c: port over to object-instance API changes
1170
1171         * test/test-service.c: ditto
1172         
1173         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1174         name, we will have to fix up the rest of the code to also handle
1175         this
1176         (dbus_message_new): generic message-creation call
1177         (set_string_field): allow appending name field
1178
1179 2003-08-06  Havoc Pennington  <hp@pobox.com>
1180
1181         * dbus/dbus-object-registry.c: implement signal connection 
1182         and dispatch
1183
1184         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1185
1186         * dbus/dbus-internals.c (_dbus_memdup): new function
1187
1188 2003-08-02  Havoc Pennington  <hp@pobox.com>
1189
1190         * dbus/dbus-message.c (dbus_message_get_no_reply)
1191         (dbus_message_set_no_reply): add these and remove
1192         set_is_error/get_is_error
1193
1194         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
1195         remove the ERROR flag, since there's now an ERROR type
1196
1197 2003-08-01  Havoc Pennington  <hp@pobox.com>
1198
1199         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1200         implement
1201
1202         * dbus/dbus-message.c (dbus_message_get_type): new function
1203
1204         * doc/dbus-specification.sgml: add "type" byte to messages
1205
1206 2003-08-01  Havoc Pennington  <hp@pobox.com>
1207
1208         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1209         a message type enum to distinguish kinds of message
1210         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
1211         that need not be replied to
1212
1213 2003-08-01  Havoc Pennington  <hp@pobox.com>
1214
1215         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1216         (unpack_8_octets): fix no-64-bit-int bug
1217
1218         * dbus/dbus-object-registry.c (validate_id): validate the 
1219         connection ID bits, not just the instance ID.
1220
1221         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1222         the connection-global 33 bits of the object ID
1223
1224         * dbus/dbus-object-registry.c (info_from_entry): fill in 
1225         object ID in the new way
1226
1227         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
1228         define server/client/instance bits.
1229
1230 2003-07-30  Havoc Pennington  <hp@pobox.com>
1231
1232         * dbus/dbus-connection.c (dbus_connection_register_object): fix
1233         build
1234
1235 2003-07-13  Havoc Pennington  <hp@pobox.com>
1236
1237         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1238         fields to DBusObjectVTable and DBusObjectInfo
1239
1240 2003-07-12  Havoc Pennington  <hp@pobox.com>
1241
1242         * dbus/dbus-object-registry.c: implement unit test,
1243         fix bugs discovered in process
1244
1245         * dbus/dbus-connection.c: remove handler_table and
1246         register_handler(), add DBusObjectRegistry usage
1247
1248         * dbus/dbus-objectid.c (dbus_object_id_is_null)
1249         (dbus_object_id_set_null): new functions
1250
1251 2003-07-08  Havoc Pennington  <hp@pobox.com>
1252
1253         * dbus/dbus-object.c: implement some of this
1254
1255         * dbus/dbus-object-registry.c
1256         (_dbus_object_registry_add_and_unlock): fill in the object_id out
1257         param
1258         (_dbus_object_registry_new): handle OOM
1259
1260 2003-07-08  Havoc Pennington  <hp@pobox.com>
1261
1262         * dbus/dbus-object.h: sketch out an API for registering objects
1263         with a connection, that allows us to use as little as 24 bytes
1264         per object and lets application code represent an object in 
1265         any conceivable way.
1266
1267         * dbus/dbus-object-registry.c: implement the hard bits of the
1268         DBusConnection aspect of object API. Not yet wired up.
1269         
1270 2003-07-06  Havoc Pennington  <hp@pobox.com>
1271
1272         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1273         (_dbus_marshal_object_id): new
1274         (_dbus_demarshal_object_id): new
1275         (_dbus_marshal_get_arg_end_pos): support object ID type, and
1276         consolidate identical switch cases. Don't conditionalize handling
1277         of DBUS_TYPE_UINT64, need to handle the type always.
1278         (_dbus_marshal_validate_arg): consolidate identical cases, and
1279         handle DBUS_TYPE_OBJECT_ID
1280
1281         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1282
1283         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1284
1285 2003-09-28  Havoc Pennington  <hp@pobox.com>
1286
1287         * real 0.13 release
1288
1289 2003-09-28  Havoc Pennington  <hp@pobox.com>
1290
1291         * doc/Makefile.am (dbus-specification.html): testing a funky hack
1292         to work with Debian db2html
1293
1294 2003-09-28  Havoc Pennington  <hp@pobox.com>
1295
1296         * configure.in: 0.13
1297
1298         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1299         stylesheet-images for benefit of Debian
1300         
1301         Change back to using filesystem-linked sockets for the system
1302         bus, so only root can create the default system bus address.
1303         
1304         * bus/system.conf.in: change to use
1305         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1306
1307         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1308         from here.
1309
1310         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1311         here, and AC_DEFINE DBUS_SYSTEM_PATH
1312
1313 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
1314
1315         * doc/TODO:
1316         * doc/busconfig.dtd:
1317         Add busconfig DTD.
1318         
1319 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
1320
1321         * doc/dbus-specification.sgml:
1322         Add activation reply values.
1323         
1324 2003-08-05  Havoc Pennington  <hp@redhat.com>
1325
1326         * configure.in: 0.12
1327
1328 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
1329
1330         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1331         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1332         (add_watch), (remove_watch), (create_source):
1333         Refcount fds, fixes some reentrancy issues.
1334         
1335 2003-07-30  Havoc Pennington  <hp@redhat.com>
1336
1337         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1338         bus address to be abstract if we have abstract sockets
1339
1340         * NEWS: update
1341
1342 2003-07-28  Havoc Pennington  <hp@redhat.com>
1343
1344         * bus/messagebus.in: fix to avoid processname/servicename 
1345         confusion, from Michael Kearey
1346         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1347         
1348 2003-07-23  Havoc Pennington  <hp@pobox.com>
1349
1350         * dbus/dbus-message.c (dbus_message_iter_get_named): 
1351         fix from Andy Hanton to remove broken "+1"
1352
1353 2003-07-16  Havoc Pennington  <hp@pobox.com>
1354
1355         * tools/dbus-launch.c (babysit): close stdout/stderr in the
1356         babysitter process, as suggested by Thomas Leonard, so 
1357         an "eval `dbus-launch --exit-with-session`" will actually 
1358         return
1359
1360 2003-07-16  Havoc Pennington  <hp@pobox.com>
1361
1362         * configure.in: print out EXPANDED_* variables in the summary at
1363         the end; clean up the code that computes EXPANDED_ variables and
1364         get the ones using exec_prefix right. Should make things work
1365         when you build without --prefix
1366
1367 2003-06-29  Havoc Pennington  <hp@pobox.com>
1368
1369         * mono/Test.cs (class Test): fire up a main loop and run it
1370
1371         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1372         done once, the app has to do it
1373
1374 2003-06-26  Havoc Pennington  <hp@pobox.com>
1375
1376         * mono/Connection.cs: set up connection with the glib main loop
1377
1378 2003-07-01  Havoc Pennington  <hp@redhat.com>
1379
1380         * doc/dbus-specification.sgml: clarify the format of a type code,
1381         change suggested by Jim Blandy
1382
1383 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
1384
1385         * doc/Makefile.am:
1386         * tools/Makefile.am: Don't assume srcdir == builddir.
1387
1388         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1389         the allocated block.
1390         (_dbus_memory_test): New function.
1391         * dbus/dbus-test.h: Add _dbus_memory_test ().
1392         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1393
1394         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1395         of %c%c%c%c.
1396         (dbus_message_new): Remove obsolete @todo.
1397
1398         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1399         (_dbus_marshal_set_uint64): Fix comment.
1400
1401         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1402         hardcode FIELD_REPLY_SERIAL.
1403
1404         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1405         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1406
1407         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1408         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1409
1410 2003-06-24  Havoc Pennington  <hp@pobox.com>
1411
1412         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1413
1414 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
1415
1416         * configure.in:
1417         * gcj/.cvsignore:
1418         * gcj/Hello.java:
1419         * gcj/Makefile.am:
1420         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1421         * gcj/org/.cvsignore:
1422         * gcj/org/Makefile.am:
1423         * gcj/org/freedesktop/.cvsignore:
1424         * gcj/org/freedesktop/Makefile.am:
1425         * gcj/org/freedesktop/dbus/.cvsignore:
1426         * gcj/org/freedesktop/dbus/Makefile.am:
1427         * gcj/org/freedesktop/dbus/Message.java: (Message),
1428         (Message.Message):
1429         * gcj/org/freedesktop/dbus/natMessage.cc:
1430         Fix the build system.
1431
1432 2003-06-22  Havoc Pennington  <hp@pobox.com>
1433
1434         * mono/Connection.cs: add more bindings
1435
1436         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
1437         more than once.
1438
1439 2003-06-22  Havoc Pennington  <hp@pobox.com>
1440
1441         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
1442         Start wrapping more stuff.
1443
1444 2003-06-22  Havoc Pennington  <hp@pobox.com>
1445
1446         * mono/Message.cs: implement Message.Wrap() that ensures we only
1447         have a single C# wrapper per DBusMessage, assuming it works which
1448         it probably doesn't.
1449
1450         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
1451         (dbus_message_free_data_slot): new
1452         (dbus_message_set_data): new
1453         (dbus_message_get_data): new
1454
1455 2003-06-22  Havoc Pennington  <hp@pobox.com>
1456
1457         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
1458         (_dbus_data_slot_allocator_alloc): rework these to keep a
1459         reference count on each slot and automatically manage a global
1460         slot ID variable passed in by address
1461
1462         * bus/bus.c: convert to new dataslot API
1463
1464         * dbus/dbus-bus.c: convert to new dataslot API
1465
1466         * dbus/dbus-connection.c: convert to new dataslot API
1467
1468         * dbus/dbus-server.c: convert to new dataslot API
1469
1470         * glib/dbus-gmain.c: ditto
1471
1472         * bus/test.c: ditto
1473
1474         * bus/connection.c: ditto
1475
1476 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
1477
1478         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
1479         after the gcj checks so that the correct configuration tags
1480         will be added to libtool.
1481
1482         * dbus-glib-1.pc.in: No need to specify any includes since
1483         dbus-1.pc.in has those.
1484
1485 2003-06-22  Havoc Pennington  <hp@pobox.com>
1486
1487         * mono/*, gcj/*, configure.in, Makefile.am:
1488         Check in makefiles and subdirs for mono and gcj bindings.
1489         Neither binding actually exists, just trying to get through
1490         all the build and other boring bits.
1491
1492 2003-06-21  Philip Blundell  <philb@gnu.org>
1493
1494         * tools/dbus-monitor.1: Updated.
1495
1496         * tools/dbus-send.1: Likewise.
1497
1498 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
1499
1500         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1501         for hangup and error after checking read so we won't discard
1502         pending data if both hangup and read are set.
1503
1504 2003-06-19  Philip Blundell  <philb@gnu.org>
1505
1506         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1507
1508         * tools/dbus-send.c: Accept both --system and --session.
1509
1510         * tools/dbus-monitor.c: Same here.
1511
1512 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
1513
1514         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1515         from C++ (Patch by Miloslav Trmac).
1516
1517 2003-06-15  Joe Shaw  <joe@assbarn.com>
1518
1519         * configure.in: Check for socklen_t.
1520
1521         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1522
1523         * test/test-segfault.c: Add #include <sys/time.h>
1524
1525         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1526         dbus-launch needs it.
1527
1528 2003-06-09  Havoc Pennington  <hp@redhat.com>
1529
1530         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1531         SUN_LEN, it breaks abstract socket usage
1532
1533         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
1534         starts of lines.
1535
1536 2003-06-04  Havoc Pennington  <hp@pobox.com>
1537
1538         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
1539         using unix:abstract=/foo, and when listening in a tmpdir
1540         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
1541
1542         * dbus/dbus-transport.c (_dbus_transport_open): support
1543         unix:abstract=/foo
1544
1545         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1546         support abstract sockets
1547
1548         * dbus/dbus-transport-unix.c
1549         (_dbus_transport_new_for_domain_socket): support abstract sockets
1550
1551         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
1552         toggle as an argument, implement abstract namespace support
1553         (_dbus_listen_unix_socket): ditto
1554
1555         * configure.in: add --enable-abstract-sockets and implement
1556         a configure check for autodetection of the right value.
1557
1558 2003-06-01  Havoc Pennington  <hp@pobox.com>
1559
1560         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
1561         in /tmp (though on Linux this will end up being useless,
1562         when we add abstract namespace support)
1563
1564         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
1565         subst'ing it
1566
1567 2003-05-28  Colin Walters  <walters@verbum.org>
1568
1569         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
1570
1571 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
1572
1573         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
1574
1575 2003-05-17  Colin Walters  <walters@gnu.org>
1576
1577         * tools/dbus-send.c: Don't exit with an error code if --help was
1578         passed.  Default to using the session bus instead of the system
1579         one.
1580
1581         * tools/dbus-launch.c: Ditto.
1582
1583         * tools/dbus-monitor.c: Ditto.
1584
1585         * tools/dbus-send.1: Update with new arguments.
1586
1587         * tools/dbus-launch.c: Emit code to export variables.  New
1588         arguments -s and -c to specify shell syntax, and a bit of code to
1589         autodetect syntax.  Also, allow specifying a program to run.
1590
1591         * tools/dbus-launch.1: Update with new arguments.
1592
1593         * tools/dbus-send.1: Ditto.
1594
1595         * tools/dbus-monitor.1: Ditto.
1596
1597 2003-05-17  Havoc Pennington  <hp@pobox.com>
1598
1599         * bus/config-parser.c (merge_included): merge in policies from
1600         child configuration file.
1601
1602         * bus/policy.c (bus_policy_merge): function to merge two policies
1603         together
1604
1605 2003-05-16  Havoc Pennington  <hp@redhat.com>
1606
1607         * dbus/dbus-connection.c: disable verbose lock spew
1608
1609         * tools/dbus-send.c: add --print-reply command line option
1610
1611         * tools/dbus-print-message.h (print_message): new util function
1612         shared by dbus-send and dbus-monitor
1613
1614         * tools/dbus-monitor.c (handler_func): exit on disconnect
1615
1616         * dbus/dbus-transport-unix.c (do_reading): if the transport is
1617         disconnected, don't try to use the read_watch
1618
1619         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
1620         so we can find this bug more easily
1621
1622 2003-05-16  Havoc Pennington  <hp@redhat.com>
1623
1624         * bus/policy.c (free_rule_list_func): avoid a crash when passed
1625         NULL as DBusHashTable is annoyingly likely to do.
1626
1627 2003-05-16  Colin Walters  <walters@verbum.org>
1628
1629         * tools/dbus-monitor.c: Add --session argument and usage()
1630         function.
1631
1632         * tools/dbus-monitor.1: Update with new --session arg.
1633
1634         * bus/Makefile.am (install-data-hook): Create
1635         $(libdir)/dbus-1.0/services so that the session bus is happy.
1636
1637 2003-05-15  Havoc Pennington  <hp@redhat.com>
1638
1639         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
1640         on non-x86. ifdef's are evil.
1641
1642 2003-05-15  Havoc Pennington  <hp@redhat.com>
1643
1644         * configure.in: 0.11
1645
1646         * NEWS: update
1647
1648         * bus/Makefile.am (initddir): apparently we are supposed to put
1649         init scripts in /etc/rc.d/init.d not /etc/init.d
1650
1651         * bus/Makefile.am: remove the "you must --enable-tests to make
1652         check" as it broke distcheck
1653
1654         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
1655
1656 2003-05-13  James Willcox  <jwillcox@gnome.org>
1657
1658         * configure.in:
1659         * bus/activation.c: (bus_activation_service_created),
1660         (bus_activation_activate_service):
1661         * bus/driver.c: (bus_driver_send_service_deleted),
1662         (bus_driver_send_service_created), (bus_driver_send_service_lost),
1663         (bus_driver_send_service_acquired),
1664         (bus_driver_send_welcome_message),
1665         (bus_driver_handle_list_services):
1666         * bus/session.conf.in:
1667         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
1668         (dbus_bus_service_exists), (dbus_bus_activate_service):
1669         * dbus/dbus-bus.h:
1670
1671         Add some convenience API which lets you activate a service, and did a
1672         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
1673         and dbus_message_get_args()
1674
1675 2003-05-11  Havoc Pennington  <hp@pobox.com>
1676
1677         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
1678         calling _dbus_marshal_validate_arg() for every byte in a byte
1679         array, etc.
1680
1681         * dbus/dbus-message-handler.c: use atomic reference counting to
1682         reduce number of locks slightly; the global lock in here sucks
1683
1684         * dbus/dbus-connection.c
1685         (_dbus_connection_update_dispatch_status_and_unlock): variant of
1686         update_dispatch_status that can be called with lock held; then use
1687         in a couple places to reduce locking/unlocking
1688         (dbus_connection_send): hold the lock over the whole function
1689         instead of acquiring it twice.
1690
1691         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
1692
1693         * bus/connection.c (bus_connections_setup_connection): fix access
1694         to already-freed memory.
1695
1696         * dbus/dbus-connection.c: keep a little cache of linked list
1697         nodes, to avoid using the global linked list alloc lock in the
1698         normal send-message case. Instead we just use the connection lock
1699         that we already have to take.
1700
1701         * dbus/dbus-list.c (_dbus_list_find_last): new function
1702
1703         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
1704         change to use a struct for the atomic type; fix docs,
1705         they return value before increment, not after increment.
1706
1707         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
1708         (_dbus_string_append_8_aligned): new functions to try to
1709         microoptimize this operation.
1710         (reallocate_for_length): break this out of set_length(), to
1711         improve profile info, and also so we can consider inlining the
1712         set_length() part.
1713
1714         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
1715         strings with some preallocation, cuts down on our calls to realloc
1716         a fair bit. Though if we can get the "move entire string to empty
1717         string" optimization below to kick in here, it would be better.
1718
1719         * dbus/dbus-string.c (_dbus_string_move): just call
1720         _dbus_string_move_len
1721         (_dbus_string_move_len): add a special case for moving
1722         an entire string into an empty string; we can just
1723         swap the string data instead of doing any reallocs.
1724         (_dbus_string_init_preallocated): new function
1725
1726 2003-05-11  Havoc Pennington  <hp@pobox.com>
1727
1728         Write a "test-profile" that does echo client-server with threads;
1729         profile reveals lock contention, memcpy/realloc of buffers, and
1730         UTF-8 validation as hot spots. 20% of lock contention eliminated
1731         with dbus_atomic_inc/dec implementation on x86.  Much remaining
1732         contention is global mempool locks for GList and DBusList.
1733
1734         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
1735         x86 implementation
1736
1737         * dbus/dbus-connection.c (struct DBusConnection): use
1738         dbus_atomic_t for the reference count
1739
1740         * dbus/dbus-message.c (struct DBusMessage): declare
1741         dbus_atomic_t values as volatile
1742
1743         * configure.in: code to detect ability to use atomic integer
1744         operations in assembly, from GLib patch
1745
1746         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
1747         time, tired of it being wrong in threads and forked processes
1748
1749         * glib/test-profile.c: a little program to bounce messages back
1750         and forth between threads and eat CPU
1751
1752         * dbus/dbus-connection.c: add debug spew macros for debugging
1753         thread locks; include config.h at top; fix deadlock in
1754         dbus_connection_flush()
1755
1756 2003-05-08  Havoc Pennington  <hp@pobox.com>
1757
1758         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
1759         data from getting written, and there wasn't a good reason to
1760         use _exit really.
1761
1762         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
1763         dbus_verbose lines in test coverage
1764         (main): add list of functions sorted by # of untested blocks
1765         to the coverage report
1766
1767         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
1768
1769         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
1770
1771         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
1772         extend test coverage
1773
1774         * test/data/auth/cancel.auth-script: test canceling an
1775         authentication
1776
1777         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
1778         aren't used. in CVS history if we end up needing them.
1779
1780 2003-05-04  Havoc Pennington  <hp@pobox.com>
1781
1782         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
1783         unit test
1784
1785         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
1786         function, which assumed length was in # of strings, not bytes
1787
1788         * dbus/dbus-message.c (_dbus_message_test): add tests for some
1789         missing coverage
1790
1791         * dbus/dbus-connection.c
1792         (_dbus_connection_queue_received_message): disable function for
1793         now, we are only using it in test mode
1794
1795         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
1796         remove a mistaken FIXME
1797
1798 2003-05-04  Havoc Pennington  <hp@pobox.com>
1799
1800         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
1801         unlock mutex on successful return, patch from Anders Gustafsson
1802
1803 2003-05-04  Havoc Pennington  <hp@pobox.com>
1804
1805         * dbus-glib-1.pc.in (Requires): fix dependencies, from
1806         Anders Gustafsson
1807
1808 2003-05-04  Havoc Pennington  <hp@pobox.com>
1809
1810         * tools/dbus-launch.c: implement
1811
1812         * bus/main.c (main), bus/bus.c (bus_context_new):
1813         implement --print-pid and --fork
1814
1815 2003-05-03  Havoc Pennington  <hp@redhat.com>
1816
1817         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
1818         the address had no value, and add to test suite. Fix and
1819         regression test from Miloslav Trmac
1820
1821 2003-05-03  Havoc Pennington  <hp@pobox.com>
1822
1823         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
1824         watch is invalid when handled
1825
1826         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
1827         dbus-launch utility to launch the bus from a shell script.  Didn't
1828         actually implement dbus-launch yet, it's just a placeholder still.
1829
1830 2003-05-03  Havoc Pennington  <hp@pobox.com>
1831
1832         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
1833         daemon; also documents daemon config file, so replaces
1834         doc/config-file.txt. Corrected some stuff from config-file.txt in
1835         the process of moving it.
1836
1837 2003-05-03  Havoc Pennington  <hp@pobox.com>
1838
1839         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
1840         add some man pages
1841
1842 2003-05-03  Colin Walters  <walters@verbum.org>
1843
1844         * dbus/dbus-sysdeps.c (fill_user_info): Test against
1845         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
1846
1847         * Makefile.am: Update to use new .pc versioning scheme.
1848
1849 2003-05-02  Havoc Pennington  <hp@redhat.com>
1850
1851         * bus/system.conf.in: allow send/receive to/from message bus
1852         service
1853
1854 2003-04-30  Havoc Pennington  <hp@redhat.com>
1855
1856         * configure.in: print a note when building with unit tests and
1857         without assertions
1858
1859 2003-04-30  Havoc Pennington  <hp@redhat.com>
1860
1861         * Makefile.am: add a check-local that complains if you didn't
1862         configure with --enable-tests
1863
1864 2003-04-29  Havoc Pennington  <hp@redhat.com>
1865
1866         * glib/dbus-gmain.c: docs cleanups
1867
1868         * dbus/dbus-types.h: add docs on int64 types
1869
1870         * dbus/dbus-memory.c: fix docs to avoid putting private API in
1871         public API docs section
1872
1873 2003-04-29  Havoc Pennington  <hp@redhat.com>
1874
1875         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
1876         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
1877         parallel install API version, not with the D-BUS package version.
1878
1879         * HACKING: move some of README over here
1880
1881         * README: updates, and document API/ABI policy
1882
1883         * configure.in: reindentation
1884
1885 2003-04-29  Havoc Pennington  <hp@redhat.com>
1886
1887         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
1888         to use this library" to be sure people have the right
1889         expectations.
1890
1891 2003-04-28  Havoc Pennington  <hp@redhat.com>
1892
1893         * configure.in: add --enable-docs which by default is auto yes if
1894         doxygen and db2html found, no otherwise; but can be forced on/off
1895
1896         * doc/Makefile.am: conditionalize whether to build docs on
1897         --enable-docs
1898
1899 2003-04-28  Havoc Pennington  <hp@redhat.com>
1900
1901         * configure.in: 0.10
1902
1903         * NEWS: update
1904
1905         * bus/system.conf.in: add <includedir>system.d</includedir>
1906
1907         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
1908         username was provided but not uid
1909
1910         * bus/config-parser.c (struct BusConfigParser): keep track of
1911         whether the parser is toplevel or was included; change some
1912         of the error handling if it's included.
1913
1914 2003-04-27  Havoc Pennington  <hp@pobox.com>
1915
1916         Unbreak my code...
1917
1918         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
1919         report correct status if we finish processing authentication
1920         inside this function.
1921
1922         * bus/activation.c (try_send_activation_failure): use
1923         bus_transaction_send_error_reply
1924
1925         * bus/connection.c (bus_connection_get_groups): return an error
1926         explaining the problem
1927
1928         * bus/bus.c (bus_context_check_security_policy): implement
1929         restriction here that inactive connections can only send the
1930         hello message. Also, allow bus driver to send anything to
1931         any recipient.
1932
1933         * bus/connection.c (bus_connection_complete): create the
1934         BusClientPolicy here instead of on-demand.
1935         (bus_connection_get_policy): don't return an error
1936
1937         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
1938         sender field in message being replied to
1939
1940         * bus/bus.c (bus_context_check_security_policy): fix silly typo
1941         causing it to return FALSE always
1942
1943         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
1944         we checked sender rather than destination
1945
1946 2003-04-25  Havoc Pennington  <hp@redhat.com>
1947
1948         test suite is slightly hosed at the moment, will fix soon
1949
1950         * bus/connection.c (bus_connections_expire_incomplete): fix to
1951         properly disable the timeout when required
1952         (bus_connection_set_name): check whether we can remove incomplete
1953         connections timeout after we complete each connection.
1954
1955         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
1956         probably still broken.
1957
1958         * bus/services.c (bus_registry_acquire_service): implement max
1959         number of services owned, and honor allow/deny rules on which
1960         services a connection can own.
1961
1962         * bus/connection.c (bus_connection_get_policy): report errors here
1963
1964         * bus/activation.c: implement limit on number of pending
1965         activations
1966
1967 2003-04-25  Havoc Pennington  <hp@redhat.com>
1968
1969         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
1970         where we used >= 0 instead of != DBUS_UID_UNSET.
1971
1972 2003-04-25  Havoc Pennington  <hp@redhat.com>
1973
1974         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
1975         were toggled without add/remove, fix from Anders Gustafsson
1976
1977 2003-04-24  Havoc Pennington  <hp@redhat.com>
1978
1979         * test/data/valid-config-files/basic.conf: add <limit> tags to
1980         this test
1981
1982         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
1983         <limit> tag in configuration file.
1984
1985 2003-04-24  Havoc Pennington  <hp@redhat.com>
1986
1987         * bus/dispatch.c: somehow missed some name_is
1988
1989         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
1990         (_dbus_timeout_set_interval): new
1991
1992         * bus/connection.c (bus_connections_setup_connection): record time
1993         when each connection is first set up, and expire them after the
1994         auth timeout passes.
1995
1996 2003-04-24  Havoc Pennington  <hp@redhat.com>
1997
1998         * dbus/dbus-message.c (dbus_message_name_is): rename
1999         (dbus_message_service_is): rename
2000         (dbus_message_sender_is): rename
2001         (dbus_message_get_service): rename
2002
2003 2003-04-24  Havoc Pennington  <hp@redhat.com>
2004
2005         * configure.in: add --enable-checks
2006
2007         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2008
2009         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2010         to use thread locks.
2011         (_dbus_connection_handler_destroyed_locked): move some private
2012         functions into proper docs group
2013
2014         * dbus/dbus-internals.h: add _dbus_return_if_fail,
2015         _dbus_return_val_if_fail
2016
2017         Throughout: use dbus_return_if_fail
2018
2019 2003-04-23  James Willcox  <jwillcox@gnome.org>
2020
2021         * glib/dbus-glib.h:
2022         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2023         (dbus_connection_setup_with_g_main),
2024         (dbus_server_setup_with_g_main):
2025         * glib/test-dbus-glib.c: (main):
2026         * glib/test-thread-client.c: (main):
2027         * glib/test-thread-server.c: (new_connection_callback), (main):
2028         * tools/dbus-monitor.c: (main):
2029
2030         Added a GMainContext argument to dbus_connection_setup_with_g_main()
2031         and dbus_server_setup_with_g_main().
2032
2033 2003-04-20  Havoc Pennington  <hp@pobox.com>
2034
2035         * doc/dbus-specification.sgml: document the restrictions on
2036         message and service names
2037
2038 2003-04-22  Havoc Pennington  <hp@redhat.com>
2039
2040         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2041         support, and do some code cleanups to share more code and
2042         speed up array marshal/demarshal.
2043
2044         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2045
2046         * configure.in: generate dbus-arch-deps.h
2047
2048         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2049         64-bit typecodes
2050
2051 2003-04-22  Havoc Pennington  <hp@redhat.com>
2052
2053         * test/data/valid-messages/opposite-endian.message: fix test
2054         to use proper type for rply field
2055
2056         * test/data/invalid-messages: add tests for below validation
2057
2058         * dbus/dbus-message.c (decode_header_data): validate field types,
2059         and validate that named fields are valid names
2060         (decode_name_field): consider messages in the
2061         org.freedesktop.Local. namespace to be invalid.
2062
2063         * dbus/dbus-string.c (_dbus_string_validate_name): new
2064
2065 2003-04-19  Havoc Pennington  <hp@pobox.com>
2066
2067         * bus/driver.c (bus_driver_handle_hello): check limits and
2068         return an error if they are exceeded.
2069
2070         * bus/connection.c: maintain separate lists of active and inactive
2071         connections, and a count of each. Maintain count of completed
2072         connections per user. Implement code to check connection limits.
2073
2074         * dbus/dbus-list.c (_dbus_list_unlink): export
2075
2076         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2077         number of bytes in the message queue for a connection
2078
2079 2003-04-18  Havoc Pennington  <hp@pobox.com>
2080
2081         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2082
2083         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2084         memleaks
2085
2086         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2087         on realloc be sure to update the pointer in the keyring
2088
2089         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2090         offset to avoid writing to unallocated memory
2091
2092         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2093         try the next mechanism, so we properly handle OOM
2094
2095         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2096         on OOM.
2097         (_dbus_keyring_new): fix OOM bug
2098         (_dbus_keyring_new_homedir): always set error; impose a maximum
2099         number of keys we'll load from the file, mostly to speed up the
2100         test suite and make its OOM checks more useful, but also for
2101         general sanity.
2102
2103         * dbus/dbus-auth.c (process_error_server): reject authentication
2104         if we get an error from the client
2105         (process_cancel): on cancel, send REJECTED, per the spec
2106         (process_error_client): send CANCEL if we get an error from the
2107         server.
2108
2109 2003-04-18  Havoc Pennington  <hp@pobox.com>
2110
2111         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2112         debug spew
2113
2114         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2115         handling problem
2116
2117         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2118         about DBUS_TEST_HOMEDIR once
2119
2120         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2121         the environment
2122
2123         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2124         config file so we test the right thing
2125
2126         Throughout: assorted docs improvements
2127
2128 2003-04-18  Havoc Pennington  <hp@pobox.com>
2129
2130         * glib/dbus-gmain.c: adapt to watch changes
2131
2132         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2133
2134         * dbus/dbus-server.h: remove dbus_server_handle_watch
2135
2136         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2137
2138         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2139         like DBusTimeout, so we don't need dbus_connection_handle_watch
2140         etc.
2141
2142 2003-04-17  Havoc Pennington  <hp@redhat.com>
2143
2144         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2145         database usage so it all goes via the DBusUserDatabase cache.
2146
2147 2003-04-17  Havoc Pennington  <hp@redhat.com>
2148
2149         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2150         there was an OOM watch we skipped, we always return TRUE so we
2151         iterate again to have a look at it again. Fixes test suite hang.
2152         Code rearrangement also lets us lose some memset and only iterate
2153         over callbacks once.
2154
2155         * bus/driver.c (bus_driver_handle_message): sense of test for
2156         reply was backward
2157
2158 2003-04-16  Havoc Pennington  <hp@pobox.com>
2159
2160         * doc/dbus-specification.sgml: make spec say serials are unsigned
2161
2162         * dbus/dbus-message.h: change message serials to unsigned
2163
2164         * dbus/dbus-connection.c: adapt to message serials being unsigned
2165
2166 2003-04-15  Havoc Pennington  <hp@pobox.com>
2167
2168         * bus/bus.c: create and keep around a shared DBusUserDatabase
2169         object.
2170
2171         * bus/connection.c (bus_connection_get_groups): don't cache
2172         groups for user in the connection object, since user database
2173         object now does that.
2174
2175 2003-04-16  Havoc Pennington  <hp@redhat.com>
2176
2177         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2178         list of size counters
2179         (_dbus_message_loader_putback_message_link): put back a popped link
2180
2181         * dbus/dbus-connection.c
2182         (dbus_connection_set_max_live_messages_size): rename
2183         max_received_size
2184         (dbus_connection_get_outgoing_size): get size of outgoing
2185         queue
2186         (_dbus_connection_set_connection_counter): remove this cruft
2187
2188 2003-04-14  Havoc Pennington  <hp@redhat.com>
2189
2190         * dbus/dbus-userdb.c: user database abstraction, mostly to get
2191         caching, but at some point we might want to be able to use a
2192         different database.
2193
2194         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2195         SHA1 conf file to test the sha1 auth mechanism, since the regular
2196         test always uses EXTERNAL when available.
2197
2198         * configure.in,
2199         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2200         add conf file that requires use of sha1 auth
2201
2202 2003-04-13  Havoc Pennington  <hp@pobox.com>
2203
2204         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2205         from Philip Blundell to send messages and monitor them.
2206
2207 2003-04-13  Havoc Pennington  <hp@pobox.com>
2208
2209         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2210         callbacks
2211
2212         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2213         users
2214
2215         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2216         fix to only recover unused bytes if we're already authenticated
2217         (_dbus_transport_get_is_authenticated): fix to still mark us
2218         authenticated if there are unused bytes.
2219
2220         * bus/dispatch.c: implement security policy checking
2221
2222         * bus/connection.c (bus_transaction_send_from_driver): new
2223
2224         * bus/bus.c (bus_context_check_security_policy): new
2225
2226         * bus/dispatch.c (send_service_nonexistent_error): delete this,
2227         now we just set the DBusError and it gets converted to an error
2228         reply.
2229
2230         * bus/connection.c (allow_user_function): enable code using actual
2231         data from the config file
2232
2233         * bus/policy.c (list_allows_user): handle wildcard rules for
2234         user/group connection perms
2235
2236 2003-04-13  Havoc Pennington  <hp@pobox.com>
2237
2238         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2239
2240         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2241
2242         * bus/policy.c (bus_policy_append_mandatory_rule)
2243         (bus_policy_append_default_rule, bus_policy_append_user_rule)
2244         (bus_policy_append_group_rule): new functions
2245
2246 2003-04-12  Havoc Pennington  <hp@pobox.com>
2247
2248         * bus/config-parser.c (bus_config_parser_new): fix a memleak
2249
2250         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2251         the pid/gid/uid, just for paranoia.
2252
2253         * test/break-loader.c (randomly_do_n_things): find a byte
2254         containing a type code, and randomly change it to a different
2255         type code.
2256
2257 2003-04-12  Havoc Pennington  <hp@pobox.com>
2258
2259         * bus/policy.h: change BusPolicy to be the thing from the config
2260         file, and rename old BusPolicy to BusClientPolicy
2261
2262         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2263         match change in how policy works
2264
2265         * dbus/dbus-internals.h: mark assert_not_reached as
2266         __attribute((noreturn))__
2267
2268 2003-04-11  Havoc Pennington  <hp@redhat.com>
2269
2270         * doc/dbus-specification.sgml: fix a spot with the wrong name for
2271         the broadcast service. Use boolean return for ServiceExists.
2272
2273 2003-04-11  Havoc Pennington  <hp@redhat.com>
2274
2275         * configure.in: add another directory to look for qt in.
2276
2277 2003-04-11  Havoc Pennington  <hp@redhat.com>
2278
2279         * AUTHORS: add Colin Walters
2280
2281 2003-04-11  Havoc Pennington  <hp@redhat.com>
2282
2283         * NEWS: update
2284
2285         * configure.in: 0.9
2286
2287 2003-04-11  Havoc Pennington  <hp@redhat.com>
2288
2289         * bus/messagebus.in: remove pid file when stopping the
2290         message bus, since the bus won't have privileges to remove it
2291         itself.
2292
2293 2003-04-11  Havoc Pennington  <hp@redhat.com>
2294
2295         * bus/bus.c (bus_context_new): move credentials change after
2296         creating pidfile
2297
2298 2003-04-11  Havoc Pennington  <hp@pobox.com>
2299
2300         * test/decode-gcov.c: add "below average functions" to the
2301         coverage report, and change how some of the code works.
2302
2303         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2304         not in the coverage stats.
2305
2306         * test/test-service.c (main): use _dbus_verbose not fprintf in a
2307         couple places so running the test suite doesn't result in megaspam.
2308
2309 2003-04-11  Havoc Pennington  <hp@pobox.com>
2310
2311         * bus/dispatch.c (check_existent_service_activation): accept a no
2312         memory error in a place we didn't before
2313
2314         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2315         in case the first one failed," since the test suite is less
2316         broken now.
2317
2318 2003-04-10  Havoc Pennington  <hp@pobox.com>
2319
2320         * bus/dispatch.c (check_segfault_service_activation): add test
2321         for launching an executable that just crashes.
2322
2323         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2324         don't leave a million cores. We'll see how portable this is.
2325
2326 2003-04-10  Havoc Pennington  <hp@pobox.com>
2327
2328         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2329         the possible parent failures before we fork, so that we don't
2330         fail to create a babysitter after creating the child.
2331
2332         * bus/activation.c (bus_activation_activate_service): kill child
2333         if we don't successfully complete the activation.
2334
2335 2003-04-10  Havoc Pennington  <hp@redhat.com>
2336
2337         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2338         the connection if it's disconnected
2339
2340         * bus/activation.c (bus_activation_service_created): use new
2341         transaction features to roll back removal of pending activation if
2342         we don't successfully create the service after all. Don't remove
2343         pending activation if the function fails.
2344
2345         * dbus/dbus-list.c (_dbus_list_insert_before_link)
2346         (_dbus_list_insert_after_link): new code to facilitate
2347         services.c fixes
2348
2349         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2350         new functionality, so we can preallocate the ability to insert
2351         into a hash table.
2352
2353         * bus/connection.c (bus_transaction_add_cancel_hook): new function
2354         allowing us to put custom hooks in a transaction to be used for
2355         cancelling said transaction
2356
2357         * doc/dbus-specification.sgml: add some discussion of secondary
2358         service owners, and disallow zero-length service names
2359
2360         * bus/services.c (bus_registry_acquire_service): new function,
2361         splits out part of bus_driver_handle_acquire_service() and fixes
2362         a bug where we didn't remove the service doing the acquiring
2363         from the secondary queue if we failed to remove the current owner
2364         from the front of the queue.
2365
2366 2003-04-10  Alexander Larsson  <alexl@redhat.com>
2367
2368         * doc/dbus-specification.sgml:
2369         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2370
2371 2003-04-10  Alexander Larsson  <alexl@redhat.com>
2372
2373         * bus/.cvsignore:
2374         * glib/.cvsignore:
2375         * test/.cvsignore:
2376         Added files to cvsignore
2377
2378         * dbus/dbus-message.h:
2379         * dbus/dbus-message.c: (dbus_message_iter_get_named):
2380         Make get_named() take two out argument and return a boolean.
2381         (dbus_message_iter_get_args_valist):
2382         Update usage of get_named().
2383         (dbus_message_iter_append_byte):
2384         Fix typo
2385         (dbus_message_iter_append_named)
2386         Fix typo
2387         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2388         More tests.
2389
2390 2003-04-10  Alexander Larsson  <alexl@redhat.com>
2391
2392         * dbus/dbus-marshal.[ch]:
2393         Add array_type_pos argument to _dbus_marshal_validate_arg.
2394         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2395
2396         * dbus/dbus-message.[ch]:
2397         Multi-dimensional arrays have full type specification in the
2398         outermost array. Iter code re-arranged to handle this.
2399         Added some more iter tests.
2400
2401         * doc/dbus-specification.sgml:
2402         Add me to authors.
2403         Remove old FIXME.
2404         Update new array encoding description.
2405         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2406
2407         * test/data/invalid-messages/array-with-mixed-types.message:
2408         * test/data/valid-messages/array-of-array-of-uint32.message:
2409         Change to the new array format.
2410
2411         * test/data/invalid-messages/too-short-dict.message:
2412         Fix bug in test.
2413
2414         * test/data/valid-messages/recursive-types.message:
2415         Fix up and extend test.
2416
2417 2003-04-10  Havoc Pennington  <hp@pobox.com>
2418
2419         * bus/dispatch.c: lots of fixes
2420
2421         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2422         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2423         that was crack, broke the test service.
2424
2425         * dbus/dbus-transport.c (_dbus_transport_open): fix error
2426         handling to avoid piling up errors if we get a failure on the
2427         first address.
2428
2429         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2430         pid in assertion failures.
2431
2432         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2433         to some fixed size of file descriptor array. Don't return TRUE
2434         anytime a timeout exists, that led to lots of busy loop silliness
2435         in the tests.
2436
2437 2003-04-09  Havoc Pennington  <hp@redhat.com>
2438
2439         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
2440         I'd checked this in earlier but hadn't.
2441
2442 2003-04-09  Havoc Pennington  <hp@redhat.com>
2443
2444         * bus/dispatch.c (bus_dispatch_test): get a bit further through
2445         the activation test (man this is getting old!)
2446
2447 2003-04-09  Havoc Pennington  <hp@redhat.com>
2448
2449         * test/test-utils.c: use dispatch status function to fix this up
2450
2451         * bus/connection.c (connection_watch_callback): don't dispatch
2452         from here
2453         (connection_timeout_callback): don't dispatch from here
2454         (bus_connections_setup_connection): set the dispatch status function
2455         (bus_connection_disconnected): unset it
2456
2457         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
2458         used to add a connection to be dispatched
2459         (_dbus_loop_iterate): do the dispatching at the end of each
2460         iteration
2461
2462         * dbus/dbus-connection.c
2463         (dbus_connection_set_dispatch_status_function): new function
2464         allowing us to fix up main loop usage
2465         (_dbus_connection_last_unref): free all the various function
2466         user data
2467         (dbus_connection_dispatch): call the DispatchStatusFunction
2468         whenever this function returns
2469         (dbus_connection_handle_watch): call DispatchStatusFunction
2470         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
2471         (reply_handler_timeout): call DispatchStatusFunction
2472         (dbus_connection_flush): call DispatchStatusFunction
2473
2474 2003-04-09  Havoc Pennington  <hp@redhat.com>
2475
2476         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
2477         a memory leak
2478
2479         * bus/dispatch.c (check_service_activated): fix bug in test
2480
2481         * dbus/dbus-mainloop.c (check_timeout): fix this up
2482
2483         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
2484         verbose output so we can sort out output from different processes,
2485         e.g. in the activation case.
2486
2487 2003-04-08  Colin Walters  <walters@gnu.org>
2488
2489         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
2490         the pid file.
2491         (bus_context_new): Set it.
2492         (bus_context_unref): Use it to delete the pid file.
2493
2494 2003-04-08  Havoc Pennington  <hp@redhat.com>
2495
2496         * test/data/invalid-messages/array-with-mixed-types.message:
2497         regression test that fails for the moment
2498
2499         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
2500         tests for convenience
2501
2502         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2503         array of nil, it broke things.
2504
2505         * test/data/invalid-messages/array-of-nil.message: regression test
2506
2507         * test/data/valid-messages/array-of-array-of-uint32.message:
2508         happened to write this so added it to suite
2509
2510 2003-04-08  Havoc Pennington  <hp@redhat.com>
2511
2512         * bus/driver.c (bus_driver_handle_acquire_service): init
2513         retval/reply before checking name
2514
2515         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2516         recursion depth argument
2517
2518         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2519         in the public struct for future extension
2520
2521         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2522         typo
2523
2524         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2525         message
2526
2527         * doc/dbus-specification.sgml: fix typo
2528
2529 2003-04-08  Alexander Larsson  <alexl@redhat.com>
2530
2531         Implemented recursive types, named types and new-style iters
2532
2533         * bus/driver.c:
2534         * glib/test-thread-client.c: (thread_func):
2535         * glib/test-thread-server.c: (handle_test_message):
2536         * test/test-service.c: (handle_echo):
2537         Update to new api
2538
2539         * dbus/Makefile.am:
2540         * dbus/dbus-dict.c:
2541         * dbus/dbus-dict.h:
2542         * dbus/dbus.h
2543         Remove DBusDict
2544
2545         * dbus/dbus-internals.c: (_dbus_type_to_string):
2546         Update for new types.
2547
2548         * dbus/dbus-marshal.[ch]:
2549         Implement recursive types and the new marshalling format.
2550         Remove hardcoded dict marshalling.
2551         Marshal named types.
2552
2553         * dbus/dbus-message-builder.c:
2554         Add BYTE_ARRAY.
2555         Remove references to old types
2556
2557         * dbus/dbus-message.[ch]:
2558         New non-refcounted iter API that supports recursive iters.
2559         Use iters for appending, including support for recursive
2560         iters.
2561         Add byte and named type support.
2562         Update everything to new marshalling formats.
2563         Add tests for new API.
2564
2565         * dbus/dbus-protocol.h:
2566         Remove old array types.
2567         Add types: BYTE, ARRAY, DICT, NAMED
2568
2569         * dbus/dbus-string.c:
2570         * dbus/dbus-sysdeps.c:
2571         Make parse_double locale safe.
2572
2573         * dbus/dbus-test-main.c:
2574         Call setlocale.
2575
2576         * dbus/dbus-test.c:
2577         Kill dict test
2578
2579         * doc/dbus-specification.sgml:
2580         Update spec
2581
2582         * test/data/incomplete-messages/missing-body.message:
2583         * test/data/invalid-messages/bad-boolean.message:
2584         * test/data/invalid-messages/bad-boolean-array.message:
2585         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
2586         * test/data/invalid-messages/boolean-has-no-value.message-raw:
2587         * test/data/invalid-messages/too-short-dict.message:
2588         * test/data/valid-messages/dict-simple.message:
2589         * test/data/valid-messages/dict.message:
2590         * test/data/valid-messages/emptiness.message:
2591         * test/data/valid-messages/lots-of-arguments.message:
2592         * test/data/valid-messages/no-padding.message:
2593         * test/data/valid-messages/recursive-types.message:
2594         Add missing NAME fields
2595         Fix up dicts & arrays
2596
2597         * test/data/invalid-messages/dict-with-nil-value.message:
2598         Removed, this is not invalid anymore.
2599
2600         * test/data/valid-messages/recursive-types.message:
2601         Add new test for deeply recursive types.
2602
2603 2003-04-07  Havoc Pennington  <hp@pobox.com>
2604
2605         * bus/driver.c (bus_driver_handle_acquire_service): return an
2606         error if you try to acquire a service that starts with ':'
2607
2608 2003-04-07  Havoc Pennington  <hp@redhat.com>
2609
2610         * doc/dbus-specification.sgml: require that base service names
2611         start with ':' and that the base service is created/deleted
2612         as first and last things a connection does on the bus
2613
2614         * bus/dispatch.c (check_existent_service_activation): lots more
2615         work on the activation test; it doesn't fully pass yet...
2616
2617         * test/test-service.c (main): fix so we don't memleak the
2618         connection to the message bus
2619         (filter_func): accept a message asking us to exit
2620
2621 2003-04-06  Havoc Pennington  <hp@pobox.com>
2622
2623         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
2624         from Colin Walters
2625
2626         * configure.in: fixes to Qt detection from Colin Walters
2627
2628         * doc/Makefile.am: Only remove generated docbook dirs if they
2629         exist, from Colin Walters
2630
2631         * dbus/dbus-bus.c: change how we set well-known connections to
2632         NULL, so that it works if a single connection is stored in
2633         two well-known array slots.
2634
2635         * test/Makefile.am: remove a lot of stuff that isn't immediately
2636         useful, it's in CVS history if we want it.
2637
2638         * test/test-service.c: use dbus-mainloop instead of that
2639         watch.[hc] crack
2640
2641 2003-04-06  Havoc Pennington  <hp@pobox.com>
2642
2643         * dbus/Makefile.am: split lists of sources into stuff that goes in
2644         the library, util functions that go in the lib and are also used
2645         elsewhere, and util functions that are used in tests/daemon but
2646         don't go in the lib.
2647
2648         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
2649         here so it can be used in test binaries also
2650
2651 2003-04-06  Havoc Pennington  <hp@pobox.com>
2652
2653         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
2654         here in the parent process, so we can return an error if it
2655         fails. Also, move some of the code into the child so the parent
2656         is less hosed if we fail midway through.
2657
2658         * bus/bus.c (bus_context_new): move pidfile detection further up
2659         in the function, before we start overwriting sockets and such.
2660
2661         * bus/messagebus.in: adjust this a bit, not sure if it will work.
2662
2663         * configure.in: add --with-system-pid-file and --with-system-socket
2664
2665 2003-04-06  Colin Walters  <walters@verbum.org>
2666
2667         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
2668
2669         * bus/system.conf.in: Declare a pidfile.
2670
2671         * bus/bus.c (bus_context_new): Test for an existing pid file, and
2672         create one (if appropriate).
2673
2674         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
2675         (struct BusConfigParser) [pidfile]: New.
2676         (element_type_to_name, merge_included, start_busconfig_child)
2677         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
2678         (bus_config_parser_unref): Free it.
2679         (bus_config_parser_get_pidfile): New function.
2680
2681         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
2682
2683         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
2684
2685         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
2686
2687         * dbus/dbus-sysdeps.h: Prototype it.
2688
2689 2003-04-06  Havoc Pennington  <hp@pobox.com>
2690
2691         * bus/bus.c (bus_context_new): print the address in here, rather
2692         than in main(), because we need to do it before forking the daemon
2693
2694         * bus/dispatch.c (send_service_nonexistent_error): set the sender
2695         on the service nonexistent error
2696
2697         * bus/driver.c (bus_driver_handle_acquire_service): set the
2698         sender on the AcquireService reply
2699
2700         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
2701         server also listen on a UNIX socket so services can connect to it.
2702
2703 2003-04-06  Havoc Pennington  <hp@pobox.com>
2704
2705         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
2706         so it detects deadlocks and also we actually init threads when
2707         debugging.
2708
2709 2003-04-06  Havoc Pennington  <hp@pobox.com>
2710
2711         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
2712         save the domain socket name, and unlink it when we disconnect the
2713         server. Means that at least when we exit normally, we won't leave
2714         a bunch of junk in /tmp
2715
2716         * dbus/dbus-transport-unix.c
2717         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
2718         memory management). (I was making a real change here but then
2719         didn't)
2720
2721 2003-04-06  Havoc Pennington  <hp@pobox.com>
2722
2723         * bus/bus.c (bus_context_new): fix wrong handling of
2724         server_data_slot_unref() in the error case.
2725
2726         * dbus/dbus-internals.h (_dbus_assert): change so it passes
2727         "(condition) != 0" to _dbus_real_assert so that
2728         "_dbus_assert (pointer)" doesn't cause a warning
2729
2730         * bus/main.c (main): accept --print-address option to print out
2731         the message bus address
2732
2733         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
2734
2735         * dbus/dbus-transport.c (_dbus_transport_open): special error for
2736         "tmpdir" option to unix: address on client side
2737
2738         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
2739         to unix: address
2740
2741         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
2742         we can use to create sockets in the test suite.
2743
2744         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
2745         cleanly. To be used for testing.
2746
2747         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
2748
2749         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
2750
2751         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
2752         handle trying to call this when there's no servers active
2753
2754 2003-04-05  Havoc Pennington  <hp@pobox.com>
2755
2756         * NEWS: update
2757
2758         * configure.in: 0.8
2759
2760 2003-04-05  Havoc Pennington  <hp@pobox.com>
2761
2762         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
2763         crash on startup. Need to get "try starting the daemon"
2764         in the test suite I guess. ;-)
2765
2766         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
2767         tracked the number of open connections; it's better done in
2768         application-specific code as you want it to span all servers etc.
2769
2770 2003-04-05  Havoc Pennington  <hp@pobox.com>
2771
2772         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
2773         patch from Colin Walters
2774
2775 2003-04-05  Havoc Pennington  <hp@pobox.com>
2776
2777         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
2778         reality; in fact multiple mechanisms are allowed.
2779
2780         * dbus/dbus-internals.c (_dbus_real_assert)
2781         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
2782         _dbus_assert_not_reached() into functions, so that they don't show
2783         up in basic block counts for test coverage, and don't use up as
2784         much disk space. Does mean slower execution speed though, so
2785         assumes --disable-asserts is the normal production case.
2786
2787 2003-04-05  Havoc Pennington  <hp@pobox.com>
2788
2789         * test/Makefile.am (dist-hook): also dist *.in files
2790
2791         * NEWS: update
2792
2793         * configure.in: 0.7
2794
2795 2003-04-05  Havoc Pennington  <hp@pobox.com>
2796
2797         * dbus/dbus-string.c: docs warning
2798
2799         * dbus/dbus-spawn.c: missing docs
2800
2801         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
2802
2803 2003-04-05  Havoc Pennington  <hp@pobox.com>
2804
2805         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
2806         magic from GLib
2807
2808         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
2809         to -1 once we've reaped the babysitter
2810         (_dbus_babysitter_handle_watch): do as much work as we can, not
2811         just one go of it
2812
2813         * bus/activation.c: add code using DBusBabysitter so that we
2814         handle it when a service fails to start up properly.
2815         (bus_activation_service_created): don't remove the activation
2816         entries as we go, just let them get removed when we free the pending
2817         activation. Unref reply messages after sending them.
2818
2819 2003-04-05  Havoc Pennington  <hp@pobox.com>
2820
2821         * test/decode-gcov.c (main): print per-directory stats in the report
2822
2823         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
2824
2825 2003-04-05  Havoc Pennington  <hp@pobox.com>
2826
2827         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
2828
2829         * test/decode-gcov.c: hack up a little program to suck data
2830         out of gcov files. Yes this is sort of silly.
2831
2832         * configure.in: define something in config.h and do an
2833         AM_CONDITIONAL when gcov is enabled
2834
2835 2003-04-04  Havoc Pennington  <hp@redhat.com>
2836
2837         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
2838         return a "babysitter" object that is used to monitor the status of
2839         the spawned process and reap it when required.
2840
2841         * test/test-segfault.c, test/test-exit.c,
2842         test/test-sleep-forever.c: binaries that do various lame things,
2843         used in the test suite.
2844
2845         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
2846
2847 2003-04-03  Havoc Pennington  <hp@pobox.com>
2848
2849         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
2850         in preparation for modifying it, dbus-sysdeps is getting
2851         a bit unmanageable.
2852
2853 2003-04-03  Havoc Pennington  <hp@redhat.com>
2854
2855         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
2856         have multiple ones
2857
2858         * bus/*.[hc]: adapt to mainloop change
2859
2860 2003-04-03  Havoc Pennington  <hp@redhat.com>
2861
2862         * bus/activation.c (load_directory): fix up memleaks
2863         (bus_activation_entry_free): free the entry
2864
2865         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
2866         we get one from the message bus; fix memleaks.
2867
2868         * dbus/dbus-message.c (dbus_set_error_from_message): new function
2869
2870 2003-04-03  Havoc Pennington  <hp@pobox.com>
2871
2872         * bus/config-parser.c (bus_config_parser_unref): free
2873         list of mechanisms, bug discovered by test suite enhancements
2874         (putting system.conf and session.conf into suite)
2875
2876         * test/Makefile.am, test/test-service.c: add placeholder for a
2877         test service that we'll activate as part of test suite. Doesn't
2878         do anything yet.
2879
2880         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
2881         setting NULL value, and use system malloc not dbus_malloc()
2882         when we have unavoidable memleakage.
2883
2884         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
2885         didn't work, and support DBUS_BUS_ACTIVATION.
2886
2887         * bus/activation.c (child_setup): pass our well-known bus type to
2888         the child
2889
2890         * bus/config-parser.c: support <type> to specify well-known type
2891
2892         * doc/dbus-specification.sgml: document the env variables to
2893         locate well-known buses and find service activator
2894
2895 2003-04-02  Havoc Pennington  <hp@redhat.com>
2896
2897         * test/Makefile.am (all-local): add a rule to copy tests to
2898         builddir, so we can have generated tests. Use this to remove the
2899         silly hack for testing system.conf and session.conf. Will use this
2900         shortly to generate .service files pointing to test binaries.
2901
2902 2003-04-02  Havoc Pennington  <hp@redhat.com>
2903
2904         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
2905         current alloc and needed new length, not max of the doubled
2906         allocation and needed new length. Also, when building tests,
2907         don't do the double-allocation stuff, just realloc every time.
2908
2909 2003-04-02  Havoc Pennington  <hp@redhat.com>
2910
2911         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
2912         in error messages
2913         (_dbus_string_get_dirname): new
2914         (_dbus_sysdeps_test): new
2915         (_dbus_directory_open): include dirnames in error messages
2916
2917         * bus/config-parser.c: interpret <include> and <includedir> and
2918         <servicedir> relative to config file location if the given
2919         filename is not absolute.
2920
2921         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
2922
2923 2003-04-02  Havoc Pennington  <hp@redhat.com>
2924
2925         * bus/connection.c (bus_transaction_send_error_reply): set sender
2926         service for the error, and unref the reply on success
2927
2928         * bus/activation.c: convert to use BusTransaction so OOM can be
2929         handled correctly
2930         (bus_activation_service_created): set sender of the message
2931
2932 2003-04-01  Havoc Pennington  <hp@redhat.com>
2933
2934         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
2935         <includedir> (at least mostly)
2936
2937         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
2938         first, then the user ID
2939
2940 2003-04-01  Havoc Pennington  <hp@pobox.com>
2941
2942         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
2943         function
2944
2945         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
2946
2947         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
2948
2949         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
2950         socket 0777, and unlink any existing socket.
2951
2952         * bus/bus.c (bus_context_new): change our UID/GID and fork if
2953         the configuration file so specifies; set up auth mechanism
2954         restrictions
2955
2956         * bus/config-parser.c (bus_config_parser_content): add support
2957         for <fork> option and fill in code for <auth>
2958
2959         * bus/system.conf.in: add <fork/> to default configuration,
2960         and limit auth mechanisms to EXTERNAL
2961
2962         * doc/config-file.txt (Elements): add <fork>
2963
2964         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
2965         (_dbus_change_identity): new function
2966
2967 2003-03-31  Havoc Pennington  <hp@redhat.com>
2968
2969         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
2970         (_dbus_listen_unix_socket): fix off-by-one error in null
2971         termination spotted by Nalin
2972
2973 2003-03-31  Havoc Pennington  <hp@redhat.com>
2974
2975         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
2976         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
2977         having a real home directory available.
2978
2979 2003-03-31  Havoc Pennington  <hp@redhat.com>
2980
2981         * bus/Makefile.am (install-data-hook): create /var/run/dbus
2982
2983         * bus/messagebus.in: add init script for Red Hat /etc/init.d
2984
2985         * configure.in: add support for specifying a style of init script
2986         to install
2987
2988 2003-03-31  Havoc Pennington  <hp@redhat.com>
2989
2990         Fix some annoying DBusString API and fix all affected code.
2991
2992         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
2993         max_length argument
2994         (_dbus_string_get_data): change to return string instead of using
2995         an out param
2996         (_dbus_string_get_const_data): ditto
2997         (_dbus_string_get_data_len): ditto
2998         (_dbus_string_get_const_data_len): ditto
2999
3000 2003-03-31  Havoc Pennington  <hp@redhat.com>
3001
3002         * bus/main.c (main): fix up the command line arguments to be nicer
3003
3004 2003-03-31  Havoc Pennington  <hp@redhat.com>
3005
3006         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3007         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3008         final location that lands in the config file
3009
3010         * bus/config-loader-expat.c (bus_config_load): fix type of
3011         XML_Parser variable
3012
3013         * doc/TODO: remove TODO item for dbus_bus_get()
3014
3015         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3016
3017 2003-03-31  Havoc Pennington  <hp@pobox.com>
3018
3019         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3020         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3021         argument since they are always client side
3022
3023         * dbus/dbus-server.c (dbus_server_get_address): new function
3024
3025         * bus/main.c (main): take the configuration file as an argument.
3026
3027         * test/data/valid-config-files/debug-allow-all.conf: new file to
3028         use with dispatch.c tests for example
3029
3030         * bus/test-main.c (main): require test data dir
3031
3032         * bus/bus.c (bus_context_new): change this to take a
3033         configuration file name as argument
3034
3035         * doc/config-file.txt (Elements): add <servicedir>
3036
3037         * bus/system.conf, bus/session.conf: new files
3038
3039         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3040         well-known socket if none set
3041
3042         * configure.in: create system.conf and session.conf
3043
3044 2003-03-30  Havoc Pennington  <hp@pobox.com>
3045
3046         * bus/config-parser.c: hacking
3047
3048         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3049         to shut down, since it could cause weirdness with the DBusList
3050         lock
3051
3052         * dbus/dbus-list.c (_dbus_list_test): add tests for the
3053         link-oriented stack routines
3054         (alloc_link): free the mempool if the first alloc from it fails
3055
3056         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3057
3058         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3059         from GLib
3060         (_dbus_string_skip_white): new
3061
3062         * doc/config-file.txt (Elements): add <includedir>
3063
3064 2003-03-28  Havoc Pennington  <hp@pobox.com>
3065
3066         * dbus/dbus-string.c (_dbus_string_copy_data_len)
3067         (_dbus_string_copy_data): new functions
3068
3069 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
3070
3071         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3072         * dbus/dbus-bus.h:
3073         Add dbus_bus_get.
3074
3075         * dbus/dbus-memory.c:
3076         Fix a doc comment.
3077
3078 2003-03-28  Havoc Pennington  <hp@pobox.com>
3079
3080         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3081         I think it may have just been superstition. Not sure.
3082
3083         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3084         failures that were not being handled.
3085
3086         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3087
3088         * dbus/dbus-memory.c: add ability to set number of mallocs in a
3089         row that will fail on out-of-memory.
3090
3091         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3092         function for testing out-of-memory handling.
3093
3094         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3095         allocation functions, they do map exactly to the expat ones.
3096
3097 2003-03-27  Havoc Pennington  <hp@redhat.com>
3098
3099         * bus/config-loader-libxml.c (bus_config_load): add another error
3100         check
3101
3102 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
3103
3104         * doc/TODO:
3105         Add note about automatic service activation.
3106
3107         * doc/dbus-specification.sgml:
3108         Rename the specification and clarify a few things.
3109
3110 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
3111
3112         * Doxyfile.in:
3113         * dbus/dbus-address.c:
3114         * dbus/dbus-dict.c:
3115         * dbus/dbus-marshal.c:
3116         * dbus/dbus-server-debug-pipe.c:
3117         * dbus/dbus-transport-unix.c:
3118         Fix documentation warnings.
3119
3120 2003-03-26  Havoc Pennington  <hp@pobox.com>
3121
3122         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3123         after every test so it's quick and easy to see which leaked, and
3124         so we test multiple dbus_shutdown() calls
3125
3126         * configure.in: change configure.in XML stuff to also support
3127         expat
3128
3129         * config-loader-libxml.c: some hacking
3130
3131         * config-loader-expat.c: some hacking
3132
3133         * config-parser.c: some hacking, plus tests
3134
3135 2003-03-25  Havoc Pennington  <hp@redhat.com>
3136
3137         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3138
3139         * configure.in: add --with-xml option to specify XML library,
3140         right now only libxml is supported.
3141
3142         * bus/config-loader-libxml.c, config-parser.c: sync some minor
3143         nonworking code between home and work, still just stubs
3144
3145 2003-03-24  Havoc Pennington  <hp@redhat.com>
3146
3147         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3148         file
3149
3150         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3151         NULL argument for "message" if the error is a well-known one,
3152         fill in a generic message in this case.
3153
3154         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3155         favor of DBusError
3156
3157         * bus/test.c (bus_test_flush_bus): add
3158
3159         * bus/policy.c (bus_policy_test): test code stub
3160
3161 2003-03-24  Havoc Pennington  <hp@pobox.com>
3162
3163         * bus/connection.c (bus_connections_setup_connection): set up
3164         the "can this user connect" function, but it always returns
3165         TRUE until we have a config file parser so we can have a config
3166         file that allows connections.
3167
3168 2003-03-23  Havoc Pennington  <hp@pobox.com>
3169
3170         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3171         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3172         the mutex, so we can check for proper memory management
3173         and OOM handling.
3174
3175         * dbus/dbus-dataslot.c: remove the mutex from
3176         DBusDataSlotAllocator and lock it manually when using it,
3177         to simplify fitting it into the global slots framework.
3178
3179         * dbus/dbus-threads.c (init_static_locks): rework how we're
3180         handling global locks so they are easily shut down.
3181
3182         * bus/policy.c (bus_policy_append_rule): fix
3183
3184         * bus/test-main.c (main): check for memleaks
3185
3186         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3187         test suite check for memleaks
3188
3189         * dbus/dbus-memory.c: add support in test mode for tracking
3190         number of outstanding blocks
3191
3192 2003-03-23  Havoc Pennington  <hp@pobox.com>
3193
3194         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3195         policies code
3196
3197         * dbus/dbus-hash.h: add ULONG hash keys
3198
3199         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3200         (_dbus_get_group_id): new function
3201
3202 2003-03-20  Havoc Pennington  <hp@redhat.com>
3203
3204         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3205         new function
3206         (dbus_connection_get_unix_user): new function
3207
3208 2003-03-20  Havoc Pennington  <hp@pobox.com>
3209
3210         * bus/connection.c (bus_connection_send_oom_error): assert that
3211         message has a sender
3212         (connection_execute_transaction): ditto
3213         (bus_connection_preallocate_oom_error): fix to set the sender, and
3214         set recipient to the destination service, not the bus driver
3215
3216         * bus/policy.c: hacking
3217
3218         * dbus/dbus-message.c (dbus_message_service_is): new function
3219         (dbus_message_sender_is): new
3220
3221 2003-03-19  Havoc Pennington  <hp@redhat.com>
3222
3223         * bus/policy.c: start sketching code for policy restrictions on
3224         what connections can do.
3225
3226 2003-03-18  Havoc Pennington  <hp@redhat.com>
3227
3228         * doc/TODO: some notes on high-level todo items. Little nitpick
3229         stuff is all in @todo, so no need to add it here.
3230
3231         * doc/config-file.txt: some notes on how config file might look
3232
3233 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
3234
3235         * configure.in: 0.6
3236
3237         * NEWS: Update.
3238
3239 2003-03-17  Havoc Pennington  <hp@redhat.com>
3240
3241         * dbus/dbus-internals.h: add gcc attributes so that
3242         our printf-style functions warn on bad arguments to
3243         format
3244
3245         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3246         format bug
3247
3248         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3249         printf format bug
3250
3251 2003-03-17  Havoc Pennington  <hp@redhat.com>
3252
3253         * bus/test-main.c (main): make it print something as it runs
3254         so make check doesn't look stuck
3255
3256         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3257         from CVS, now obsolete
3258
3259 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
3260
3261         * bus/dispatch.c: (bus_dispatch):
3262         Refetch the service name since it may have been reallocated
3263         when dbus_message_set_sender was called.
3264
3265         * dbus/dbus-sysdeps.c: (_dbus_accept):
3266         Add address and address length variables and use them to stop
3267         valgrind from complaining.
3268
3269 2003-03-17  Havoc Pennington  <hp@pobox.com>
3270
3271         All tests pass, no memleaks, no valgrind complaints.
3272
3273         * bus/test.c: refcount handler_slot
3274
3275         * bus/connection.c (bus_connections_new): refcount
3276         connection_data_slot
3277
3278         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3279         bytes so that auth scripts pass.
3280
3281         * bus/dispatch.c: init message_handler_slot so it gets allocated
3282         properly
3283
3284         * bus/dispatch.c (message_handler_slot_ref): fix memleak
3285
3286         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3287         dealloc server_pipe_hash when no longer used for benefit of
3288         leak checking
3289
3290         * dbus/dbus-auth.c (process_command): memleak fix
3291
3292         * bus/dispatch.c (check_hello_message): memleak fix
3293
3294 2003-03-16  Havoc Pennington  <hp@pobox.com>
3295
3296         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3297
3298 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
3299
3300         * bus/activation.c (bus_activation_activate_service): Append
3301         the pending activation entry to the list of pending activations.
3302
3303 2003-03-16  Havoc Pennington  <hp@pobox.com>
3304
3305         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3306         connections
3307
3308         * dbus/dbus-address.c (create_entry): fix OOM handling when
3309         failing to alloc entry->method
3310
3311 2003-03-16  Havoc Pennington  <hp@pobox.com>
3312
3313         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3314         the watch
3315
3316         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3317         add some missing dbus_set_result
3318
3319         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3320         alloc the DBusMessageHandler
3321
3322         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3323         the transport here, since we call this from the finalizer; it
3324         resulted in a double-finalize.
3325
3326         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3327         where we tried to use transport->connection that was NULL,
3328         happened when transport was disconnected early on due to OOM
3329
3330         * bus/*.c: adapt to handle OOM for watches/timeouts
3331
3332         * dbus/dbus-transport-unix.c: port to handle OOM during
3333         watch handling
3334
3335         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3336         reference to unused bytes instead of a copy
3337
3338         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3339         out of memory
3340
3341         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3342         FALSE on OOM
3343
3344         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3345         of memory
3346
3347 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
3348
3349         * doc/dbus-specification.sgml:
3350         Document reply message for ActivateService.
3351
3352 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
3353
3354         * bus/activation.c: (bus_pending_activation_entry_free),
3355         (bus_pending_activation_free), (bus_activation_new),
3356         (bus_activation_unref), (bus_activation_service_created),
3357         (bus_activation_activate_service):
3358         * bus/activation.h:
3359         * bus/bus.c: (bus_context_new):
3360         * bus/desktop-file.c: (new_section):
3361         * bus/driver.c: (bus_driver_send_service_deleted),
3362         (bus_driver_handle_activate_service):
3363         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3364         * bus/services.h:
3365         * dbus/dbus-connection.c:
3366         (dbus_connection_send_with_reply_and_block):
3367         * dbus/dbus-message.c: (dbus_message_append_args_valist):
3368         * dbus/dbus-protocol.h:
3369         Make activation work better. Now pending activations will be queued
3370         and the daemon won't try to activate services that are already registered.
3371
3372 2003-03-16  Havoc Pennington  <hp@pobox.com>
3373
3374         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3375         connection data
3376
3377         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3378         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3379
3380 2003-03-16  Havoc Pennington  <hp@pobox.com>
3381
3382         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3383         this. always run the test suite before commit...
3384
3385         * bus/*: adapt to DBusConnection API changes
3386
3387         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3388         requires renaming stuff to avoid dbus_connection_dispatch name
3389         conflict.
3390
3391         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3392         function
3393
3394         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3395         separate from _dbus_message_loader_return_buffer()
3396
3397         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3398         this, because it's now always broken to use; the number of
3399         messages in queue vs. the number still buffered by the message
3400         loader is undefined/meaningless. Should use
3401         dbus_connection_get_dispatch_state().
3402         (dbus_connection_dispatch): rename from
3403         dbus_connection_dispatch_message
3404
3405 2003-03-16  Havoc Pennington  <hp@pobox.com>
3406
3407         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3408         implementation
3409
3410 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
3411
3412         * dbus/dbus-connection.c:
3413         (dbus_connection_send_with_reply_and_block):
3414         Decrease connection->n_incoming when removing an entry
3415         from the list.
3416         * dbus/dbus-dict.c: (dbus_dict_entry_free),
3417         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3418         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3419         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3420         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3421         (dbus_dict_get_byte_array):
3422         Handle NULL arrays and strings. Also add support for byte arrays.
3423
3424         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3425         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3426         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3427         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3428         (_dbus_demarshal_dict), (demarshal_and_validate_len),
3429         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3430         * dbus/dbus-marshal.h:
3431         Add support for marshalling and demarshalling empty arrays and strings.
3432
3433         * dbus/dbus-message.c: (dbus_message_append_args_valist),
3434         (dbus_message_append_string_array),
3435         (dbus_message_iter_get_boolean),
3436         (dbus_message_iter_get_boolean_array),
3437         (dbus_message_iter_get_int32_array),
3438         (dbus_message_iter_get_uint32_array),
3439         (dbus_message_iter_get_double_array),
3440         (dbus_message_iter_get_byte_array),
3441         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
3442         (check_message_handling):
3443         Add support for getting empty arrays and dicts.
3444
3445         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
3446         Don't do any validation at all for now, that's better than just checking
3447         for ASCII.
3448
3449         * test/data/valid-messages/emptiness.message:
3450         New test message with lots of empty arrays.
3451
3452 2003-03-16  Havoc Pennington  <hp@pobox.com>
3453
3454         * dbus/dbus-connection.c
3455         (_dbus_connection_queue_received_message_link): new function that
3456         can't fail due to OOM
3457
3458         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
3459         new function pops a message together with a list link
3460         containing it.
3461
3462         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
3463         message queuing functions to avoid needing to alloc memory
3464
3465 2003-03-16  Havoc Pennington  <hp@pobox.com>
3466
3467         Oops - test code was only testing failure of around 30 of the
3468         mallocs in the test path, but it turns out there are 500+
3469         mallocs. I believe this was due to misguided linking setup such
3470         that there was one copy of dbus_malloc etc. in the daemon and one
3471         in the shared lib, and only daemon mallocs were tested. In any
3472         case, the test case now tests all 500+ mallocs, and doesn't pass
3473         yet, though there are lots of fixes in this patch.
3474
3475         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3476         this so that it doesn't need to allocate memory, since it
3477         has no way of indicating failure due to OOM (and would be
3478         annoying if it did).
3479
3480         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
3481
3482         * bus/Makefile.am: rearrange to create two self-contained
3483         libraries, to avoid having libraries with overlapping symbols.
3484         that was resulting in weirdness, e.g. I'm pretty sure there
3485         were two copies of global static variables.
3486
3487         * dbus/dbus-internals.c: move the malloc debug stuff to
3488         dbus-memory.c
3489
3490         * dbus/dbus-list.c (free_link): free list mempool if it becomes
3491         empty.
3492
3493         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
3494
3495         * dbus/dbus-address.c (dbus_parse_address): free list nodes
3496         on failure.
3497
3498         * bus/dispatch.c (bus_dispatch_add_connection): free
3499         message_handler_slot when no longer using it, so
3500         memory leak checkers are happy for the test suite.
3501
3502         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3503
3504         * bus/bus.c (new_connection_callback): disconnect in here if
3505         bus_connections_setup_connection fails.
3506
3507         * bus/connection.c (bus_connections_unref): fix to free the
3508         connections
3509         (bus_connections_setup_connection): if this fails, don't
3510         disconnect the connection, just be sure there are no side
3511         effects.
3512
3513         * dbus/dbus-string.c (undo_alignment): unbreak this
3514
3515         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3516         leaking
3517         (_dbus_auth_new): fix the order in which we free strings
3518         on OOM failure
3519
3520         * bus/connection.c (bus_connection_disconnected): fix to
3521         not send ServiceDeleted multiple times in case of memory
3522         allocation failure
3523
3524         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3525         get the base service name
3526         (dbus_bus_register_client): don't return base service name,
3527         instead store it on the DBusConnection and have an accessor
3528         function for it.
3529         (dbus_bus_register_client): rename dbus_bus_register()
3530
3531         * bus/dispatch.c (check_hello_message): verify that other
3532         connections on the bus also got the correct results, not
3533         just the one sending hello
3534
3535 2003-03-15  Havoc Pennington  <hp@pobox.com>
3536
3537         Make it pass the Hello handling test including all OOM codepaths.
3538         Now to do other messages...
3539
3540         * bus/services.c (bus_service_remove_owner): fix crash when
3541         removing owner from an empty list of owners
3542         (bus_registry_ensure): don't leave service in the list of
3543         a connection's owned services if we fail to put the service
3544         in the hash table.
3545
3546         * bus/connection.c (bus_connection_preallocate_oom_error): set
3547         error flag on the OOM error.
3548
3549         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3550         handle _dbus_transport_set_connection failure
3551
3552         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
3553         to create watches up front and simply enable/disable them as
3554         needed.
3555         (unix_connection_set): this can now fail on OOM
3556
3557         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
3558         of enabling/disabling a watch or timeout.
3559
3560         * bus/loop.c (bus_loop_iterate): don't touch disabled
3561         watches/timeouts
3562
3563         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
3564
3565 2003-03-15  Havoc Pennington  <hp@pobox.com>
3566
3567         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
3568         write useful test code, after all that futzing around ;-)
3569
3570         Test does not yet pass because we can't handle OOM in
3571         _dbus_transport_messages_pending (basically,
3572         dbus_connection_preallocate_send() does not prealloc the write
3573         watch). To fix this, I think we need to add new stuff to
3574         set_watch_functions, namely a SetEnabled function so we can alloc
3575         the watch earlier, then enable it later.
3576
3577         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
3578         dbus-memory.c to the convenience lib
3579
3580         * bus/test.c: rename some static functions to keep them clearly
3581         distinct from stuff in connection.c. Handle client disconnection.
3582
3583 2003-03-14  Havoc Pennington  <hp@pobox.com>
3584
3585         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
3586         transport, tests more of the real codepath. Set up clients
3587         with bus_setup_debug_client.
3588
3589         * bus/test.c (bus_setup_debug_client): function to set up debug
3590         "clients" on the main loop
3591
3592         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
3593         support
3594
3595         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
3596         server type
3597
3598         * dbus/dbus-server-debug.c: support a debug server based on pipes
3599
3600         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
3601         (_dbus_close): new function
3602
3603         * configure.in: check for socketpair
3604
3605 2003-03-14  Havoc Pennington  <hp@redhat.com>
3606
3607         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
3608         cheesy hack
3609
3610         * dbus/dbus-transport-debug.c: rework this a good bit to be
3611         less complicated. hopefully still works.
3612
3613         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
3614         manually
3615
3616         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
3617         after running it
3618
3619         * dbus/dbus-message.c (dbus_message_copy): rename from
3620         dbus_message_new_from_message, fix it up to copy
3621         all the message fields, add test case
3622
3623         * bus/dispatch.c (bus_dispatch_test): add some more test code,
3624         not quite passing yet
3625
3626 2003-03-14  Havoc Pennington  <hp@pobox.com>
3627
3628         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
3629         until no work remains" in test code. (the large diff here
3630         is just code movement, no actual changes)
3631
3632         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
3633         1, no point waiting around for test code.
3634         (_dbus_server_debug_accept_transport): unref the timeout
3635         after adding it (right?)
3636
3637         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
3638
3639 2003-03-13  Havoc Pennington  <hp@redhat.com>
3640
3641         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
3642         out of memory
3643
3644         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
3645         of memory
3646
3647         * dbus/dbus-connection.h: Make AddWatchFunction and
3648         AddTimeoutFunction return a bool so they can fail on out-of-memory
3649
3650         * bus/bus.c (bus_context_new): set up timeout handlers
3651
3652         * bus/connection.c (bus_connections_setup_connection): set up
3653         timeout handlers
3654
3655         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
3656         can fail
3657
3658         * bus/bus.c (bus_context_new): adapt to changes
3659
3660         * bus/connection.c: adapt to changes
3661
3662         * test/watch.c: adapt to DBusWatch changes
3663
3664         * bus/dispatch.c (bus_dispatch_test): started adding this but
3665         didn't finish
3666
3667 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
3668
3669         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
3670
3671 2003-03-13  Havoc Pennington  <hp@pobox.com>
3672
3673         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
3674         set up a test framework as for the library
3675
3676 2003-03-12  Havoc Pennington  <hp@pobox.com>
3677
3678         Throughout: purge global variables, introduce BusActivation,
3679         BusConnections, BusRegistry, etc. objects instead.
3680
3681         * bus/bus.h, bus/bus.c: introduce BusContext as a global
3682         message bus object
3683
3684         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
3685         going to redo this a bit differently I think
3686
3687 2003-03-12  Havoc Pennington  <hp@redhat.com>
3688
3689         Mega-patch that gets the message bus daemon initially handling
3690         out-of-memory. Work still needed. Also lots of random
3691         moving stuff to DBusError instead of ResultCode.
3692
3693         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
3694
3695         * dbus/dbus-connection.c
3696         (dbus_connection_send_with_reply_and_block): use DBusError
3697
3698         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
3699         DBusResultCode
3700
3701         * dbus/dbus-connection.c (dbus_connection_send): drop the result
3702         code here, as the only failure possible is OOM.
3703
3704         * bus/connection.c (bus_connection_disconnect):
3705         rename bus_connection_disconnected as it's a notification only
3706
3707         * bus/driver.c (bus_driver_handle_acquire_service): don't free
3708         "name" on get_args failure, should be done by get_args;
3709         don't disconnect client for bad args, just return an error.
3710         (bus_driver_handle_service_exists): ditto
3711
3712         * bus/services.c (bus_services_list): NULL-terminate returned array
3713
3714         * bus/driver.c (bus_driver_send_service_lost)
3715         (bus_driver_send_service_acquired): send messages from driver to a
3716         specific client to the client's unique name, not to the broadcast
3717         service.
3718
3719         * dbus/dbus-message.c (decode_header_data): reject messages that
3720         contain no name field
3721         (_dbus_message_get_client_serial): rename to
3722         dbus_message_get_serial and make public
3723         (_dbus_message_set_serial): rename from set_client_serial
3724         (_dbus_message_set_reply_serial): make public
3725         (_dbus_message_get_reply_serial): make public
3726
3727         * bus/connection.c (bus_connection_foreach): allow stopping
3728         iteration by returning FALSE from foreach function.
3729
3730         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
3731         (dbus_connection_free_preallocated_send)
3732         (dbus_connection_preallocate_send): new API for sending a message
3733         without possibility of malloc failure.
3734         (dbus_connection_send_message): rename to just
3735         dbus_connection_send (and same for whole function family)
3736
3737         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
3738
3739         * dbus/dbus-sysdeps.c (_dbus_exit): new function
3740
3741         * bus/activation.c: handle/return errors
3742
3743         * dbus/dbus-errors.h: add more DBUS_ERROR #define
3744
3745         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
3746         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
3747         (_dbus_result_from_errno): move to this file
3748
3749 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
3750
3751         * dbus/dbus-marshal.c:
3752         (_dbus_marshal_set_string):
3753         Take a length argument so we can marshal the correct string
3754         length.
3755
3756         (_dbus_marshal_dict), (_dbus_demarshal_dict),
3757         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
3758         (_dbus_marshal_test):
3759         * dbus/dbus-marshal.h:
3760         Add support for marshalling and demarshalling dicts.
3761
3762         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
3763         Add support for TYPE DICT.
3764
3765         * dbus/dbus-message.c: (set_string_field):
3766         Adjust header padding.
3767
3768         (dbus_message_append_args_valist), (dbus_message_append_dict),
3769         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
3770         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
3771         (check_message_handling), (check_have_valid_message):
3772         * dbus/dbus-message.h:
3773         Add functions for setting and getting dicts.
3774
3775         * dbus/dbus-protocol.h:
3776         Add DBUS_TYPE_DICT.
3777
3778         * dbus/dbus.h:
3779         Add dbus-dict.h
3780
3781         * doc/dbus-specification.sgml:
3782         Add information about how dicts are marshalled.
3783
3784         * test/data/invalid-messages/dict-with-nil-value.message:
3785         * test/data/invalid-messages/too-short-dict.message:
3786         * test/data/valid-messages/dict-simple.message:
3787         * test/data/valid-messages/dict.message:
3788         Add sample messages containing dicts.
3789
3790 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
3791
3792         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
3793
3794 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
3795
3796         * dbus/Makefile.am:
3797         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3798         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
3799         (dbus_dict_set_int32), (dbus_dict_set_uint32),
3800         (dbus_dict_set_double), (dbus_dict_set_string),
3801         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3802         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3803         (dbus_dict_set_string_array), (_dbus_dict_test):
3804         * dbus/dbus-dict.h:
3805         Fix according to comments from Havoc.
3806
3807 2003-03-06  Michael Meeks  <michael@server.home>
3808
3809         * configure.in: if we don't have kde-config, disable have_qt.
3810
3811 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
3812
3813         * dbus/Makefile.am:
3814         Add dbus-dict.[ch]
3815
3816         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
3817         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
3818         (dbus_dict_remove), (dbus_dict_get_value_type),
3819         (dbus_dict_get_keys), (dbus_dict_put_boolean),
3820         (dbus_dict_put_int32), (dbus_dict_put_uint32),
3821         (dbus_dict_put_double), (dbus_dict_put_string),
3822         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
3823         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
3824         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
3825         (dbus_dict_get_int32), (dbus_dict_get_uint32),
3826         (dbus_dict_get_double), (dbus_dict_get_string),
3827         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
3828         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
3829         (dbus_dict_get_string_array), (_dbus_dict_test):
3830         * dbus/dbus-dict.h:
3831         Add DBusDict implementation
3832
3833         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
3834         * dbus/dbus-test.h:
3835         Add _dbus_dict_test
3836
3837 2003-03-04  Havoc Pennington  <hp@pobox.com>
3838
3839         * test/data/auth/*: adapt to changes
3840
3841         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
3842         USERID_BASE64 and change USERNAME_BASE64 to put in username not
3843         userid
3844
3845         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
3846         more stuff from being in a context name, to make the protocol
3847         simpler to deal with
3848
3849         * dbus/dbus-errors.c (dbus_error_has_name): new function
3850         (dbus_error_is_set): new function
3851
3852         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
3853         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
3854
3855         * dbus/dbus-connection.c (dbus_connection_flush): also read
3856         messages during a flush operation
3857
3858         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
3859
3860 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
3861
3862         * configure.in: Check for gethostbyname on Solaris.
3863
3864         * dbus/dbus-transport.c: (_dbus_transport_open):
3865         Remove duplicate "tcp" entry.
3866
3867         * doc/dbus-specification.sgml:
3868         Clarify some things.
3869
3870 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
3871
3872         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
3873         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
3874         (_dbus_keyring_test):
3875         * dbus/dbus-md5.c: (_dbus_md5_compute):
3876         * dbus/dbus-sha.c: (_dbus_sha_compute):
3877         Plug memory leaks.
3878
3879 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
3880
3881         * README: Add some things.
3882
3883 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
3884
3885         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
3886         after case DBUS_TYPE_BOOELAN.
3887
3888 2003-03-02  Havoc Pennington  <hp@pobox.com>
3889
3890         * test/break-loader.c (randomly_set_extreme_ints): add test that
3891         sets really huge and small integers
3892
3893         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
3894         that length of boolean array fits in the string, and that
3895         string has room for boolean value in single-bool case.
3896
3897         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
3898         optional value to "ALIGN" command which is what to fill the
3899         alignment with.
3900
3901         * test/data/valid-messages/no-padding.message: add regression
3902         test for the message padding problem
3903
3904 2003-03-02  Havoc Pennington  <hp@pobox.com>
3905
3906         * dbus/dbus-message.c (decode_header_data): fix to always init
3907         message_padding, from Benjamin Dauvergne
3908
3909 2003-03-02  Havoc Pennington  <hp@pobox.com>
3910
3911         * configure.in: 0.5
3912
3913         * NEWS: Update.
3914
3915 2003-03-01  Joe Shaw  <joe@assbarn.com>
3916
3917         * configure.in: Check for "struct cmsgcred" and try to access its
3918         members for BSD-like unices.
3919
3920         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
3921         _dbus_read_credentials_unix_socket().
3922         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
3923         read() for reading the credential byte off the unix socket.  Use
3924         struct cmsgcred on systems that support it.
3925
3926 2003-02-27  Alexander Larsson  <alexl@redhat.com>
3927
3928         * glib/Makefile.am:
3929         * configure.in:
3930         Make gthreads-2.0 dependency optional. Don't build thread test if
3931         its not found.
3932
3933 2003-02-27  Havoc Pennington  <hp@pobox.com>
3934
3935         * dbus/dbus-connection.c
3936         (dbus_connection_send_message_with_reply_and_block): fix doh!
3937         doh! doh! bug that resulted in never removing a reply from the
3938         queue, no wonder we called get_reply_serial so much ;-)
3939
3940         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
3941         and client serial instead of demarshaling them every time
3942
3943 2003-02-27  Havoc Pennington  <hp@pobox.com>
3944
3945         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
3946         more inlined, using dbus-string-private.h, speeds things up
3947         substantially
3948
3949         * dbus/dbus-string.c (_dbus_string_free): apply align offset
3950         when freeing the string
3951         (_dbus_string_steal_data): fix for align offset
3952         (undo_alignment): new function
3953
3954 2003-02-26  Havoc Pennington  <hp@redhat.com>
3955
3956         All kinds of audit fixes from Owen, plus initial attempt to
3957         handle unaligned memory returned from malloc.
3958
3959         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
3960         leave room for align_offset and nul byte
3961         (fixup_alignment): function to track an align_offset and
3962         ensure real->str is aligned
3963         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
3964         to allow a nul byte plus align offset
3965         (_dbus_string_lock): fix overflow issue
3966         (_dbus_string_init_const_len): add assertions on sanity of len,
3967         assign allocated to be ALLOCATION_PADDING larger than len
3968         (set_length): fixup the overflow handling
3969         (_dbus_string_get_data_len): fix overflow in assertion
3970         (open_gap): detect overflow in size of gap to be opened
3971         (_dbus_string_lengthen): add overflow check
3972         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
3973         (_dbus_string_append): add overflow check
3974         (_dbus_string_append_unichar): overflow
3975         (_dbus_string_delete): fix overflow in assertion
3976         (_dbus_string_copy_len): overflow in assertion
3977         (_dbus_string_replace_len): overflows in assertions
3978         (_dbus_string_find): change to implement in terms of
3979         _dbus_string_find_to
3980         (_dbus_string_find_to): assorted fixage
3981         (_dbus_string_equal_c_str): assert c_str != NULL,
3982         fix logic so the function works
3983         (_dbus_string_ends_with_c_str): fix overflow thingy
3984         (_dbus_string_base64_encode): overflow fix
3985         (_dbus_string_validate_ascii): overflow
3986         (_dbus_string_validate_nul): overflow
3987
3988 2003-02-26  Havoc Pennington  <hp@redhat.com>
3989
3990         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
3991
3992 2003-02-26  Alexander Larsson  <alexl@redhat.com>
3993
3994         * configure.in:
3995         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
3996
3997         * dbus/dbus-connection.c:
3998         * dbus/dbus-connection.h:
3999         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4000         Add dbus_connection_set_wakeup_main_function and use it when queueing
4001         incoming and outgoing messages.
4002
4003
4004         * dbus/dbus-dataslot.c:
4005         Threadsafe usage of DBusDataSlotAllocator
4006
4007         * dbus/dbus-message.c: (dbus_message_get_args_iter):
4008         dbus_new can fail.
4009
4010         * dbus/dbus-server-unix.c:
4011         Add todo comment
4012
4013         * glib/dbus-gmain.c:
4014         Implement the new wakeup functions for glib.
4015
4016         * glib/Makefile.am:
4017         * glib/test-thread-client.c:
4018         * glib/test-thread-server.c:
4019         * glib/test-thread.h:
4020         Initial cut at some thread test code. Not really done yet.
4021
4022 2003-02-26  Havoc Pennington  <hp@pobox.com>
4023
4024         * dbus/dbus-connection.c
4025         (dbus_connection_send_message_with_reply_and_block): fix crash
4026         where we ref'd the outgoing message instead of the returned reply
4027
4028         * dbus/dbus-transport-unix.c (do_authentication): check read watch
4029         at the end of this function, so if we didn't need to read for
4030         authentication, we reinstall it for receiving messages
4031
4032         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4033         a NULL sender for peer-to-peer case
4034
4035         * dbus/dbus-transport-unix.c (check_read_watch): handle
4036         !authenticated case correctly
4037
4038         * glib/dbus-gmain.c: add support for DBusServer
4039
4040         * dbus/dbus-server.c: add data slot support
4041
4042         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4043         return values and handle errors
4044
4045         * dbus/dbus-dataslot.c: factor out the data slot stuff from
4046         DBusConnection
4047
4048         * Doxyfile.in (INPUT): add glib subdir
4049
4050         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4051         setup_with_g_main instead of hookup_with_g_main; write docs
4052
4053 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
4054
4055         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4056         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4057         * dbus/dbus-message.c: (dbus_message_append_boolean),
4058         (dbus_message_append_boolean_array),
4059         (dbus_message_get_args_valist), (_dbus_message_test):
4060         * dbus/dbus-message.h:
4061         * doc/dbus-specification.sgml:
4062         Various fixes as pointed out by Havoc.
4063
4064         * test/data/invalid-messages/bad-boolean-array.message:
4065         * test/data/invalid-messages/bad-boolean.message:
4066         Add invalid boolean value test cases.
4067
4068 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
4069
4070         * dbus/dbus-internals.c: (_dbus_type_to_string):
4071         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4072         (_dbus_marshal_validate_arg):
4073         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4074         * dbus/dbus-message.c: (dbus_message_append_args_valist),
4075         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4076         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4077         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4078         (dbus_message_iter_get_double),
4079         (dbus_message_iter_get_boolean_array), (message_iter_test):
4080         * dbus/dbus-message.h:
4081         * dbus/dbus-protocol.h:
4082         * doc/dbus-specification.sgml:
4083         * test/data/valid-messages/lots-of-arguments.message:
4084         Add support for boolean and boolean array types.
4085
4086 2003-02-23  Havoc Pennington  <hp@pobox.com>
4087
4088         * dbus/dbus-keyring.c: finish most of this implementation and
4089         simple unit test
4090
4091         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4092         these barf if the error isn't cleared to NULL
4093
4094         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4095         (_dbus_create_directory): new function
4096
4097         * dbus/dbus-errors.c (dbus_set_error): fix warning
4098
4099         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4100         (_dbus_string_hex_decode): new function
4101         (test_hex_roundtrip): test code
4102
4103         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4104
4105         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4106
4107         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4108         the save-to-temp/rename trick to atomically write the new file
4109         (_dbus_string_parse_uint): new function
4110
4111 2003-02-22  Havoc Pennington  <hp@pobox.com>
4112
4113         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4114
4115 2003-02-22  Havoc Pennington  <hp@pobox.com>
4116
4117         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4118         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4119
4120         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4121
4122         * dbus/test/data/sha-1: add US government test suite for SHA-1
4123
4124 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4125
4126         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4127         Make string arrays NULL-terminated.
4128
4129         * dbus/dbus-memory.c: (dbus_free_string_array):
4130         * dbus/dbus-memory.h:
4131         New function for freeing NULL-terminated string arrays.
4132
4133         * dbus/dbus-message-builder.c: (append_quoted_string),
4134         (_dbus_message_data_load):
4135         Add support for array types.
4136
4137         * dbus/dbus-message.c: (check_message_handling):
4138         Add more types as test cases.
4139
4140         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4141         (_dbus_string_parse_double):
4142         Add the start offset to the end offset.
4143
4144         * test/data/valid-messages/lots-of-arguments.message:
4145         New test message with lots of arguments.
4146
4147 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4148
4149         * dbus/dbus-message.c: (dbus_message_append_nil),
4150         (dbus_message_append_int32), (dbus_message_append_uint32),
4151         (dbus_message_append_double), (dbus_message_append_string),
4152         (dbus_message_append_int32_array),
4153         (dbus_message_append_uint32_array),
4154         (dbus_message_append_double_array),
4155         (dbus_message_append_byte_array),
4156         (dbus_message_append_string_array):
4157         Fix all out-of-memory handling in these functions.
4158
4159 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4160
4161         * dbus/dbus-message.c: (dbus_message_append_nil):
4162         Fix a silly.
4163
4164 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4165
4166         * dbus/dbus-message.c: (dbus_message_append_args_valist),
4167         (dbus_message_append_nil), (dbus_message_append_int32_array),
4168         (dbus_message_append_uint32_array),
4169         (dbus_message_append_double_array),
4170         (dbus_message_append_byte_array),
4171         (dbus_message_append_string_array), (dbus_message_get_args_valist),
4172         (dbus_message_iter_get_int32_array),
4173         (dbus_message_iter_get_uint32_array),
4174         (dbus_message_iter_get_double_array),
4175         (dbus_message_iter_get_byte_array),
4176         (dbus_message_iter_get_string_array):
4177
4178         * dbus/dbus-message.h:
4179         Add functions for appending and getting arrays.
4180
4181 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4182
4183         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4184         element size at least 8 bytes, fixes mempool tests on
4185         64-bit machines.
4186
4187 2003-02-20  Alexander Larsson  <alexl@redhat.com>
4188
4189         * dbus/dbus-transport-unix.c (unix_do_iteration):
4190         Unlock the connection mutex during a blocking select call.
4191         Add todo about how we need a way to wake up the select.
4192
4193         * dbus/dbus-connection-internal.h:
4194         * dbus/dbus-connection.c:
4195         Add _dbus_connection_lock and _dbus_connection_unlock.
4196
4197 2003-02-19  Havoc Pennington  <hp@pobox.com>
4198
4199         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4200         Doxyfile.in, not Doxyfile
4201
4202         * dbus/dbus-keyring.c: do some hacking on this
4203
4204         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4205
4206         * dbus/dbus-errors.c (dbus_set_error_const): do not call
4207         dbus_error_init
4208         (dbus_set_error): remove dbus_error_init, check for message ==
4209         NULL *before* we sprintf into it, and add @todo about including
4210         system headers in this file
4211
4212         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4213
4214         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4215
4216         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4217         get various bits of user information based on either username
4218         or user ID
4219         (_dbus_homedir_from_username): new function
4220
4221 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
4222
4223         * configure.in:
4224         Add check for nonposix getpwnam_r
4225
4226         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4227         Align the pool element size to a sizeof (void *) boundary.
4228
4229         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4230         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4231         General Solaris fixes.
4232
4233         * test/data/valid-messages/simplest-manual.message:
4234         Explicitly state that we want little-endian packing.
4235
4236 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
4237
4238         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4239
4240         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4241         Added to create a transport connecting using a tcp/ip socket.
4242
4243         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4244         to a tcp socket at given host and port.
4245         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4246         hostname and port.
4247
4248         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4249
4250         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4251         Added to create a server listening on a TCP/IP socket.
4252
4253 2003-02-19  Havoc Pennington  <hp@pobox.com>
4254
4255         Throughout: mop up all the Doxygen warnings and undocumented
4256         stuff.
4257
4258         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4259         to search any paths.
4260
4261         * dbus/dbus-threads.c: move global mutex initializers to
4262         dbus-internals.h, multiple prototypes was confusing doxygen
4263         besides being kind of ugly
4264
4265         * Doxyfile (PREDEFINED): have Doxygen define
4266         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4267         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4268         (do not abuse the feature! it's for stuff like the autogenerated
4269         macros in dbus-md5.c, not just for things you don't feel like
4270         documenting...)
4271
4272 2003-02-18  Havoc Pennington  <hp@pobox.com>
4273
4274         * dbus/dbus-string.c (_dbus_string_zero): new function
4275
4276         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4277         wrap it in some dbus-friendly API
4278
4279         * dbus/dbus-types.h: add 16-bit types
4280
4281 2003-02-18  Joe Shaw  <joe@assbarn.com>
4282
4283         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4284         credentials from our currently running process.
4285         (get_word): Fix a buglet where we were copying the entire length
4286         instead of relative to our position.
4287
4288         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4289         keys on the stack... it's 640k of data.
4290
4291         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4292         read the credentials byte off the socket, even if we don't have
4293         SO_PEERCRED.
4294         (_dbus_poll): Implement poll() using select() for systems which
4295         don't have it.
4296
4297         * glib/test-dbus-glib.c (main): Print out an error if no
4298         parameters are given.
4299
4300         * test/data/auth/fallback.auth-script: Added.  Tests that a client
4301         can fallback to a secondary auth mechanism if the first fails.
4302
4303 2003-02-18  Havoc Pennington  <hp@pobox.com>
4304
4305         * AUTHORS: add Alex
4306
4307 2003-02-17  Havoc Pennington  <hp@pobox.com>
4308
4309         * doc/dbus-specification.sgml: lots of cosmetic
4310         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4311         env variable to DBUS_BUS_ADDRESS, s/client/application/,
4312         s/server/bus/ (except in authentication section). Add a section
4313         "Message Bus Message Routing"
4314
4315 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
4316
4317         Release 0.4
4318
4319         * NEWS: Update
4320
4321 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4322
4323         * doc/dbus-specification.sgml:
4324         Specification updates.
4325
4326 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4327
4328         * bus/activation.c: (bus_activation_init), (child_setup),
4329         (bus_activation_activate_service):
4330         * bus/activation.h:
4331         * bus/main.c: (main):
4332         Set DBUS_ADDRESS environment variable.
4333
4334         * dbus/dbus-errors.c: (dbus_set_error):
4335         Don't use va_copy since that's a C99 feature.
4336
4337         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4338         (_dbus_spawn_async):
4339         * dbus/dbus-sysdeps.h:
4340         Add child_setup_func to _dbus_spawn_async.
4341
4342         * doc/dbus-specification.sgml:
4343         Update specification.
4344
4345         * test/spawn-test.c: (setup_func), (main):
4346         Fix test.
4347
4348 2003-02-17  Alexander Larsson  <alexl@redhat.com>
4349
4350         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4351         Added todo.
4352
4353 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4354
4355         * doc/.cvsignore:
4356         * doc/Makefile.am:
4357         * doc/dbus-test-plan.sgml:
4358         Add test plan document.
4359
4360         * test/Makefile.am:
4361         Fix distcheck.
4362
4363 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4364
4365         * dbus/dbus-message.c: (decode_header_data),
4366         (_dbus_message_loader_return_buffer):
4367         Set the header padding amount when loading a message.
4368
4369 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4370
4371         * bus/dispatch.c: (send_one_message):
4372         Only send broadcast messages to registered connections.
4373
4374         * dbus/dbus-message.c: (dbus_message_name_is):
4375         * dbus/dbus-message.h:
4376         New convenience function.
4377
4378         * dbus/dbus-transport-debug.c: (do_reading):
4379         Only dispatch one message per run.
4380
4381         * test/Makefile.am:
4382         * test/bus-test.c: (new_connection_callback), (die),
4383         (test_hello_client1_handler), (test_hello_client2_handler),
4384         (test_hello_replies), (main):
4385
4386         * test/bus-test-loop.[ch]:
4387         Add these.
4388
4389 2003-02-16  Havoc Pennington  <hp@pobox.com>
4390
4391         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4392         backward conditional
4393
4394 2003-02-16  Alexander Larsson  <alexl@redhat.com>
4395
4396         * dbus/dbus-connection.c:
4397         Implement sent_message_with_reply. (with_reply_and block is still
4398         busted).
4399         Made dispatch_message not lose message if OOM.
4400
4401         * dbus/dbus-errors.h:
4402         Add NoReply error (for reply timeouts).
4403
4404 2003-02-16  Alexander Larsson  <alexl@redhat.com>
4405
4406         * dbus/dbus-hash.c (_dbus_hash_table_unref):
4407         Actually free keys and values when destroying hashtable.
4408
4409 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4410
4411         * dbus/dbus-auth.c: (client_try_next_mechanism):
4412         Plug a leak.
4413
4414         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4415         Return TRUE if there's no thread implementation around.
4416
4417         * glib/dbus-gmain.c: (free_source),
4418         (dbus_connection_hookup_with_g_main):
4419         Make sure to remove the GSource when the connection is finalized.
4420
4421 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4422
4423         * bus/dispatch.c: (bus_dispatch_message_handler):
4424         * dbus/dbus-errors.h:
4425         Return an error if someone tries to send a message to a service
4426         that doesn't exist.
4427
4428 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4429
4430         * bus/activation.c: (load_directory), (bus_activation_init),
4431         (bus_activation_activate_service):
4432         * bus/activation.h:
4433         * bus/driver.c:
4434         (bus_driver_handle_activate_service), (bus_driver_handle_message):
4435         More work on the activation handling.
4436
4437         * dbus/dbus-errors.h:
4438         Add some error messages
4439
4440         * dbus/dbus-message.c: (dbus_message_new_error_reply):
4441         * dbus/dbus-message.h:
4442         New function that creates an error message.
4443
4444         * dbus/dbus-protocol.h:
4445         Add ACTIVATE_SERVER message.
4446
4447         * dbus/dbus-server-unix.c: (unix_handle_watch),
4448         (_dbus_server_new_for_domain_socket):
4449         Call _dbus_fd_set_close_on_exec.
4450
4451         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
4452         (_dbus_spawn_async), (_dbus_disable_sigpipe),
4453         (_dbus_fd_set_close_on_exec):
4454         * dbus/dbus-sysdeps.h:
4455         Add _dbus_fd_set_close_on exec function. Also add function that checks
4456         that all open fds are set to close-on-exec and warns otherwise.
4457
4458         * dbus/dbus-transport-unix.c:
4459         (_dbus_transport_new_for_domain_socket):
4460         Call _dbus_fd_set_close_on_exec.
4461
4462 2003-02-16  Havoc Pennington  <hp@pobox.com>
4463
4464         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
4465         allow people to avoid setting SIGPIPE to SIG_IGN
4466         (_dbus_connection_new_for_transport): disable SIGPIPE unless
4467         we've been asked not to
4468
4469 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4470
4471         * dbus/dbus-list.c: (_dbus_list_append_link),
4472         (_dbus_list_prepend_link):
4473         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
4474         (dbus_realloc):
4475         Warning fixes.
4476
4477 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4478
4479         * bus/Makefile.am:
4480         * bus/activation.c: (bus_activation_entry_free),
4481         (add_desktop_file_entry), (load_directory), (bus_activation_init):
4482         * bus/activation.h:
4483         * bus/main.c: (main):
4484         Add simple activation support, doesn't work yet though.
4485
4486 2003-02-15   Zack Rusin  <zack@kde.org>
4487
4488         * qt/dbus-qthread.cpp:  small casting fix
4489
4490 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4491
4492         * dbus/dbus-errors.c: (dbus_set_error):
4493         * dbus/dbus-errors.h:
4494         Add a few errors and make dbus_set_error void.
4495
4496         * dbus/dbus-sysdeps.c:
4497         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
4498         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
4499         * dbus/dbus-sysdeps.h:
4500         Add _dbus_spawn_async.
4501
4502         * test/spawn-test.c: (main):
4503         Test for _dbus_spawn_async.
4504
4505 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4506
4507         * dbus/dbus-internals.h:
4508         Fix build without tests.
4509
4510         * dbus/dbus-list.c: (alloc_link):
4511         Fix a segfault when a malloc fails.
4512
4513         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4514         (dbus_malloc0), (dbus_realloc):
4515         Add support for malloc debugging.
4516
4517 2003-02-15  Alexander Larsson  <alexl@redhat.com>
4518
4519         * dbus/dbus-threads.c:
4520         * dbus/dbus-threads.h:
4521         Add condvars. Remove static mutext from API.
4522         Implement static mutexes by initializing them from threads_init.
4523
4524         * glib/dbus-gthread.c:
4525         * qt/dbus-qthread.cpp:
4526         Update with the thread api changes.
4527
4528
4529         * dbus/dbus-list.c:
4530         * dbus/dbus-list.h:
4531         Turn StaticMutex into normal mutex + init function.
4532         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4533         _dbus_list_append_link, _dbus_list_prepend_link
4534
4535
4536         * dbus/dbus-sysdeps.c:
4537         * dbus/dbus-sysdeps.h:
4538         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
4539         _dbus_atomic_dec. Only slow fallback implementation at the moment.
4540
4541         * dbus/dbus-protocol.h:
4542         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
4543
4544         * dbus/dbus-message.c:
4545         Make ref/unref atomic.
4546         Fix some docs.
4547
4548         * dbus/dbus-connection-internal.h:
4549         * dbus/dbus-connection.c:
4550         * dbus/dbus-connection.h:
4551         Make threadsafe.
4552         Change _peek to _borrow,_return & _steal_borrowed.
4553         Change disconnect callback to event.
4554         Make dbus_connection_dispatch_messages reentrant.
4555
4556         * dbus/dbus-transport.c:
4557         Don't ref the connection on calls to the transport
4558         implementation.
4559
4560         * dbus/dbus-message-handler.c:
4561         Make threadsafe.
4562
4563         * glib/dbus-gmain.c:
4564         Don't use peek_message anymore
4565
4566         * test/Makefile.am:
4567         * test/debug-thread.c:
4568         * test/debug-thread.h:
4569         Simple thread implementation that asserts() on deadlocks in
4570         single-threaded code.
4571
4572         * test/bus-test.c:
4573         (main) Call debug_threads_init.
4574
4575         * test/watch.c:
4576         Use disconnect message instead of disconnect callback.
4577
4578         * bus/connection.c:
4579         * bus/connection.h:
4580         Don't call dbus_connection_set_disconnect_function. Instead export
4581         bus_connection_disconnect.
4582
4583         * bus/dispatch.c:
4584         Call bus_connection_disconnect when we get a disconnected message.
4585
4586 2003-02-15  Havoc Pennington  <hp@pobox.com>
4587
4588         * dbus/dbus-message.c (dbus_message_new): fool around with the
4589         docs
4590
4591 2003-02-14  Havoc Pennington  <hp@pobox.com>
4592
4593         * dbus/dbus-mempool.c: fail if the debug functions so indicate
4594
4595         * dbus/dbus-memory.c: fail if the debug functions indicate we
4596         should
4597
4598         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
4599         (_dbus_decrement_fail_alloc_counter): debug functions to
4600         simulate memory allocation failures
4601
4602 2003-02-14  Havoc Pennington  <hp@pobox.com>
4603
4604         * dbus/dbus-errors.h (struct DBusError): add a word of padding
4605         to DBusError
4606
4607 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4608
4609         * bus/driver.c: (bus_driver_handle_hello):
4610         * bus/driver.h:
4611         * bus/services.c: (bus_service_lookup):
4612         Reorder message sending so we get a more sane order.
4613
4614         * test/bus-test.c: (message_handler):
4615         Fix tyop.
4616
4617 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4618
4619         * bus/driver.c: (bus_driver_send_service_deleted),
4620         (bus_driver_send_service_created), (bus_driver_send_service_lost),
4621         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4622         (bus_driver_send_welcome_message),
4623         (bus_driver_handle_list_services),
4624         (bus_driver_handle_acquire_service),
4625         (bus_driver_handle_service_exists):
4626         * dbus/dbus-bus.c: (dbus_bus_register_client),
4627         (dbus_bus_acquire_service), (dbus_bus_service_exists):
4628         * dbus/dbus-errors.c: (dbus_result_to_string):
4629         * dbus/dbus-errors.h:
4630         * dbus/dbus-message.c: (dbus_message_append_args),
4631         (dbus_message_append_args_valist), (dbus_message_get_args),
4632         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
4633         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
4634         (dbus_message_iter_get_byte_array),
4635         (dbus_message_iter_get_string_array), (message_iter_test),
4636         (check_message_handling), (_dbus_message_test):
4637         * dbus/dbus-message.h:
4638         * test/bus-test.c: (main):
4639         Change fields to arguments in messages, so that they won't be
4640         confused with header fields.
4641
4642         * glib/test-dbus-glib.c: (main):
4643         Remove append_fields from hello message.
4644
4645 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4646
4647         * dbus/dbus-errors.c:
4648         * dbus/dbus-message.c:
4649         * dbus/dbus-string.c:
4650         Documentation fixes.
4651
4652 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4653
4654         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
4655         (remove_timeout):
4656         Implement support for timeouts in dbus-glib.
4657
4658 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4659
4660         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4661         * dbus/dbus-message.c: (process_test_subdir):
4662         * test/break-loader.c: (find_breaks_based_on):
4663         Plug some memory leaks.
4664
4665 2003-02-13  Richard Hult  <rhult@codefactory.se>
4666
4667         * bus/main.c: Fix build.
4668
4669         * dbus/dbus-errors.h:
4670         * dbus/dbus-errors.c: Fix copyright for Anders.
4671
4672 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4673
4674         * bus/Makefile.am:
4675         Add utils.[ch]
4676
4677         * bus/connection.c: (bus_connection_foreach):
4678         Fix a warning.
4679
4680         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
4681         (unescape_string), (new_section), (parse_section_start),
4682         (parse_key_value), (report_error), (bus_desktop_file_load),
4683         (bus_desktop_file_get_string):
4684         * bus/desktop-file.h:
4685         Use DBusError for error reporting.
4686
4687         * bus/dispatch.c: (send_one_message),
4688         (bus_dispatch_message_handler):
4689         * bus/driver.c: (bus_driver_send_service_deleted),
4690         (bus_driver_send_service_created), (bus_driver_send_service_lost),
4691         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
4692         (bus_driver_send_welcome_message),
4693         (bus_driver_handle_list_services),
4694         (bus_driver_handle_acquire_service),
4695         (bus_driver_handle_service_exists):
4696         * bus/loop.c: (bus_loop_run):
4697         * bus/main.c:
4698         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
4699
4700         * bus/utils.c: (bus_wait_for_memory):
4701         * bus/utils.h:
4702         New files with general utility functions.
4703
4704         * dbus/dbus-internals.h:
4705         Remove _DBUS_HANDLE_OOM.
4706
4707 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4708
4709         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
4710         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
4711         * dbus/dbus-errors.h:
4712         Add DBusError structure.
4713
4714 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4715
4716         * test/data/valid-messages/standard-acquire-service.message:
4717         * test/data/valid-messages/standard-hello.message:
4718         * test/data/valid-messages/standard-list-services.message:
4719         * test/data/valid-messages/standard-service-exists.message:
4720         Add some standard messages.
4721
4722 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4723
4724         * bus/driver.c: (bus_driver_send_welcome_message),
4725         (bus_driver_handle_list_services),
4726         (bus_driver_handle_acquire_service),
4727         (bus_driver_handle_service_exists), (bus_driver_handle_message):
4728         Update for API changes in libdbus.
4729
4730         * dbus/dbus-message.c: (dbus_message_new_reply):
4731         * dbus/dbus-message.h:
4732         Remove the name argument. The spec states that replies shouldn't
4733         have a name.
4734
4735 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4736
4737         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
4738         (report_error), (bus_desktop_file_load), (lookup_section),
4739         (lookup_line), (bus_desktop_file_get_raw),
4740         (bus_desktop_file_get_string):
4741         * bus/desktop-file.h:
4742         Some fixes, and new functions for getting a key value from a section.
4743
4744 2003-02-13  Havoc Pennington  <hp@pobox.com>
4745
4746         * test/data/auth/fail-after-n-attempts.auth-script: new test
4747
4748         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
4749         reject the client.
4750
4751 2003-02-13  Havoc Pennington  <hp@pobox.com>
4752
4753         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
4754         dbus_credentials_match were backward
4755
4756         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
4757         NO_CREDENTIALS and ROOT_CREDENTIALS
4758
4759         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
4760         into here. Never process more commands after we've reached an
4761         end state; store further data as unused bytes.
4762
4763         * test/data/auth/*: add more auth tests
4764
4765         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
4766         command to match exact string and EXPECT_UNUSED to match unused
4767         bytes
4768
4769         * test/Makefile.am (dist-hook): fix to dist all the test stuff
4770
4771 2003-02-12  Havoc Pennington  <hp@pobox.com>
4772
4773         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
4774         \r off of popped lines
4775
4776         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
4777         scripts
4778
4779         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
4780         SEND, append \r\n
4781
4782 2003-02-12  Havoc Pennington  <hp@pobox.com>
4783
4784         * dbus/Makefile.am: remove break-loader from the build, since it
4785         moved.
4786
4787         * configure.in: add --enable-gcov to turn on coverage profiling
4788         flags and disable optimization
4789
4790 2003-02-10  Havoc Pennington  <hp@pobox.com>
4791
4792         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
4793         initial cut at test framework for DBusAuth from laptop.
4794         Doesn't quite work yet but it compiles and I need to get
4795         it off the 266mhz laptop. ;-)
4796
4797         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
4798         fix a memleak in error case
4799
4800 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
4801
4802         * bus/Makefile.am:
4803         * bus/desktop-file.c:
4804         * bus/desktop-file.h:
4805         Add a desktop file parser.
4806
4807 2003-02-11  Zack Rusin  <zack@kde.org>
4808
4809         * qt/message.[h|cpp]: sample implementation
4810         of the KDE wrapper for DBusMessage
4811
4812 2003-02-09  Zack Rusin  <zack@kde.org>
4813
4814         * test/bus-test.c: make_it_compile
4815         * doc/dbus-specification.sgml: minimal semantic fix
4816
4817 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
4818
4819         Release 0.3
4820
4821         * NEWS: Update
4822
4823 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
4824
4825         * dbus/Makefile.am:
4826         * dbus/dbus-break-loader.c:
4827         * test/Makefile.am:
4828         * test/break-loader.c:
4829         Move dbus-break-loader to test/ and rename it to break-loader.
4830
4831 2003-02-02  Havoc Pennington  <hp@pobox.com>
4832
4833         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
4834         for code to manage cookies in your home directory
4835
4836         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
4837
4838         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
4839         to authenticate, then disconnect the client.
4840
4841 2003-02-03  Alexander Larsson  <alexl@redhat.com>
4842
4843         * dbus/dbus-message.c (dbus_message_append_fields):
4844         Correct docs.
4845
4846 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4847
4848         * doc/dbus-specification.sgml:
4849         Update address format section.
4850
4851 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4852
4853         * test/Makefile.am:
4854         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
4855         (message_handler), (new_connection_callback), (loop_quit),
4856         (loop_run), (main):
4857         Add bus test.
4858
4859 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4860
4861         * bus/driver.c: (bus_driver_handle_service_exists):
4862         Simplify the code a bit.
4863
4864         * dbus/dbus-bus.c: (dbus_bus_service_exists):
4865         Fix a silly.
4866
4867 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4868
4869         * bus/Makefile.am:
4870         Add libdbus-daemon.la and link to it.
4871
4872 2003-02-01  James Willcox  <jwillcox@gnome.org>
4873
4874         * bus/driver.c: (bus_driver_handle_own_service):
4875         Actually include the service reply code in the message.
4876
4877 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4878
4879         * bus/driver.c: (bus_driver_handle_service_exists):
4880         Don't unref the incoming message.
4881
4882 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4883
4884         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
4885
4886 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
4887
4888         * dbus/dbus-server.c: (dbus_server_listen):
4889         * dbus/dbus-transport.c: (_dbus_transport_open):
4890         ifdef out the calls to the debug transport and server.
4891
4892 2003-02-02  Alexander Larsson  <alexl@redhat.com>
4893
4894         * dbus/dbus-watch.c (dbus_watch_get_flags):
4895         Add note in the docs that ERROR or HANGUP won't be returned
4896         and are assumed always on.
4897
4898         * glib/dbus-gmain.c (add_watch):
4899         Always add IO_ERR | IO_HUP
4900
4901         * dbus/dbus-message.h:
4902         Add semicolon after dbus_message_iter_get_string_array().
4903         Makes qt code build again
4904
4905 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
4906
4907         * bus/driver.c: (create_unique_client_name),
4908         (bus_driver_handle_hello):
4909         Don't take a name, just use a numeric id to identify
4910         each client.
4911
4912         * dbus/Makefile.am:
4913         * dbus/dbus-bus.c: (dbus_bus_register_client),
4914         (dbus_bus_acquire_service), (dbus_bus_service_exists):
4915         * dbus/dbus-bus.h:
4916         Add new convenience functions for communicating with the bus.
4917
4918         * dbus/dbus-message.h:
4919
4920         * dbus/dbus-protocol.h:
4921         Fix a typo.
4922
4923 2003-02-01  Alexander Larsson  <alexl@redhat.com>
4924
4925         * dbus/dbus-message.c (dbus_message_append_fields):
4926         Add some more doc comments.
4927
4928 2003-02-01  Havoc Pennington  <hp@pobox.com>
4929
4930         * dbus/dbus-break-loader.c (randomly_modify_length): change
4931         a 4-byte value in the message as if it were a length
4932
4933         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
4934         execute bit on saved files
4935
4936 2003-02-01  Havoc Pennington  <hp@pobox.com>
4937
4938         * dbus/dbus-break-loader.c (main): new program to find messages
4939         that break the loader.
4940
4941         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
4942         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
4943
4944         * dbus/dbus-string.c (_dbus_string_set_byte): new
4945
4946 2003-01-31  Havoc Pennington  <hp@pobox.com>
4947
4948         * dbus/dbus-message.c: refactor the test code to be more general,
4949         in preparation for writing a "randomly permute test cases to
4950         try to break the loader" program.
4951
4952 2003-01-31  Havoc Pennington  <hp@pobox.com>
4953
4954         * doc/dbus-specification.sgml: work on the specification
4955
4956         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
4957         the protocol version of the message.
4958
4959         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
4960         no longer specifies that.
4961         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
4962         1/2/3/4)
4963
4964         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
4965         "break" for DBUS_TYPE_NIL, remove @todo
4966
4967 2003-01-31  Havoc Pennington  <hp@pobox.com>
4968
4969         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
4970         just set_is_error/get_is_error as this is a commonly-used
4971         function, and write docs.
4972
4973 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
4974
4975         * dbus/dbus-address.c: (dbus_address_entry_free):
4976         Free key and value lists.
4977
4978         * dbus/dbus-internals.c: (_dbus_type_to_string):
4979         Add the types we didn't have.
4980
4981         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4982         (_dbus_marshal_validate_arg):
4983         Add NIL types.
4984
4985         * dbus/dbus-message.c: (dbus_message_set_sender):
4986         Remove todo about being able to set sender to NULL.
4987
4988         (dbus_message_set_is_error_reply),
4989         (dbus_message_get_is_error_reply):
4990         * dbus/dbus-message.h:
4991         New functions.
4992
4993         * dbus/dbus-protocol.h:
4994         Add error reply flag.
4995
4996         * test/data/valid-messages/opposite-endian.message:
4997         Add NIL type to test.
4998
4999 2003-01-31  Havoc Pennington  <hp@pobox.com>
5000
5001         * doc/dbus-specification.sgml: fully specify the header.  Add
5002         flags and major protocol version, and change header/body len to
5003         unsigned.
5004
5005         * dbus/dbus-message-builder.c (append_saved_length): append length
5006         as uint32
5007
5008         * dbus/dbus-message.c (dbus_message_create_header): change header
5009         length and body length to unsigned. Add the new fields from the
5010         spec
5011         (_dbus_message_loader_return_buffer): unsigned header/body len
5012
5013 2003-01-30  Havoc Pennington  <hp@pobox.com>
5014
5015         * dbus/dbus-auth.c: rework to use only REJECTED, no
5016         MECHANISMS
5017
5018         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5019         use REJECTED, suggested by Mark McLoughlin
5020
5021 2003-01-30  Havoc Pennington  <hp@pobox.com>
5022
5023         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5024         a better way to report errors here. e.g.  "unix address lacks
5025         path" or something. also "no such file" when the path doesn't
5026         exist, etc.
5027
5028         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5029         leaking list nodes
5030         (dbus_parse_address): add @todo about documenting address format,
5031         and allowing , and ; to be escaped
5032
5033 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
5034
5035         * dbus/Makefile.am:
5036         Add dbus-address.[ch]
5037
5038         * dbus/dbus-address.c: (dbus_address_entry_free),
5039         (dbus_address_entries_free), (create_entry),
5040         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5041         (dbus_parse_address), (_dbus_address_test):
5042         * dbus/dbus-address.h:
5043         New files for dealing with address parsing.
5044
5045         * dbus/dbus-connection.c:
5046         Document timeout functions.
5047
5048         * dbus/dbus-message.c:
5049         Document dbus_message_new_from_message.
5050
5051         * dbus/dbus-server-debug.c:
5052         Document.
5053
5054         * dbus/dbus-server.c: (dbus_server_listen):
5055         Parse address and use correct server implementation.
5056
5057         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5058         * dbus/dbus-string.h:
5059         New function with test.
5060
5061         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5062         * dbus/dbus-test.h:
5063         Add address tests.
5064
5065         * dbus/dbus-transport-debug.c:
5066         Document.
5067
5068         * dbus/dbus-transport.c: (_dbus_transport_open):
5069         Parse address and use correct transport implementation.
5070
5071 2003-01-30  Havoc Pennington  <hp@pobox.com>
5072
5073         * dbus/dbus-message.c: use message->byte_order instead of
5074         DBUS_COMPILER_BYTE_ORDER throughout.
5075         (dbus_message_create_header): pad header to align the
5076         start of the body of the message to 8-byte boundary
5077
5078         * dbus/dbus-marshal.h: make all the demarshalers take const
5079         DBusString arguments.
5080
5081         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5082         validate message args here, so we don't have to do slow validation
5083         later, and so we catch bad messages as they are incoming. Also add
5084         better checks on header_len and body_len. Also fill in
5085         message->byte_order
5086
5087         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5088         implemented properly)
5089         (_dbus_string_validate_nul): new function to check all-nul
5090
5091         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5092         get_arg_end_pos and remove all validation
5093         (_dbus_marshal_validate_arg): actually do validation here.
5094
5095 2003-01-29  Havoc Pennington  <hp@pobox.com>
5096
5097         * dbus/dbus-message.c (check_message_handling): fix assertion
5098         failure on set_client_serial
5099
5100 2003-01-28  Havoc Pennington  <hp@pobox.com>
5101
5102         * dbus/dbus-server-debug.c: Add doc section comments
5103
5104         * dbus/dbus-transport-debug.c: add doc section comments
5105
5106 2003-01-28  Havoc Pennington  <hp@redhat.com>
5107
5108         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5109         the reverse order from how I had it
5110         (_dbus_string_base64_encode): reverse encoding order. I was
5111         basically byteswapping everything during encoding.
5112
5113 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
5114
5115         * dbus/dbus-connection-internal.h:
5116         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5117         (_dbus_connection_remove_timeout):
5118         Add functions for adding and removing timeouts.
5119
5120         * dbus/dbus-message.c: (dbus_message_new_from_message):
5121         Add new function that takes a message and creates an exact
5122         copy of it, but with the refcount set to 1.
5123         (check_message_handling):
5124         Fix build error.
5125
5126         * dbus/dbus-server-protected.h:
5127         * dbus/dbus-server.c: (_dbus_server_init_base),
5128         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5129         (dbus_server_set_timeout_functions):
5130         (_dbus_server_remove_timeout):
5131         New functions so that a server can add and remove timeouts.
5132
5133         (dbus_server_listen):
5134         Add commented out call to dbus_server_debug_new.
5135
5136         * dbus/dbus-timeout.c: (_dbus_timeout_new):
5137         Actually set the handler, doh.
5138
5139         * dbus/dbus-transport.c: (_dbus_transport_open):
5140         Add commented out call to dbus_transport_debug_client_new.
5141
5142         * dbus/Makefile.am:
5143         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5144
5145 2003-01-28  Havoc Pennington  <hp@pobox.com>
5146
5147         * dbus/dbus-message.c (check_message_handling): function to check
5148         on the loaded message, iterates over it etc.
5149
5150 2003-01-28  Havoc Pennington  <hp@pobox.com>
5151
5152         * test/Makefile.am (dist-hook): fix make distdir
5153
5154         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5155
5156 2003-01-27  Havoc Pennington  <hp@pobox.com>
5157
5158         * dbus/dbus-mempool.c (time_for_size): replace printf with
5159         _dbus_verbose
5160
5161         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5162         empty lines; fix the SAVE_LENGTH stuff to be
5163         START_LENGTH/END_LENGTH so it actually works; couple other
5164         bugfixes
5165
5166         * test/Makefile.am (dist-hook): add dist-hook for .message files
5167
5168         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5169         can be constant or locked.
5170         (_dbus_string_free): allow freeing a const string as
5171         documented/intended
5172
5173         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5174
5175         * dbus/dbus-test-main.c (main): take an argument which is the
5176         directory containing test data
5177
5178         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5179         argument to this and load all the messages in test/data/
5180         checking that they can be loaded or not loaded as appropriate.
5181
5182 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
5183
5184         * bus/dispatch.c: (bus_dispatch_message_handler):
5185         Dispatch messages sent to services.
5186
5187         * bus/driver.c: (bus_driver_send_service_deleted),
5188         (bus_driver_send_service_created), (bus_driver_send_service_lost),
5189         (bus_driver_send_service_acquired):
5190         Add helper functions for sending service related messages.
5191
5192         (bus_driver_send_welcome_message):
5193         Send HELLO_REPLY instead of WELCOME.
5194
5195         (bus_driver_handle_list_services):
5196         Send LIST_SERVICES_REPLY instead of SERVICES.
5197
5198         (bus_driver_handle_own_service),
5199         (bus_driver_handle_service_exists):
5200         New message handlers.
5201
5202         (bus_driver_handle_message):
5203         Invoke new message handlers.
5204
5205         (bus_driver_remove_connection):
5206         Don't remove any services here since that's done automatically
5207         by bus_service_remove_owner now.
5208
5209         * bus/driver.h:
5210         New function signatures.
5211
5212         * bus/services.c: (bus_service_add_owner):
5213         Send ServiceAcquired message if we're the only primary owner.
5214
5215         (bus_service_remove_owner):
5216         Send ServiceAcquired/ServiceLost messages.
5217
5218         (bus_service_set_prohibit_replacement),
5219         (bus_service_get_prohibit_replacement):
5220         Functions for setting prohibit replacement.
5221
5222         (bus_service_has_owner):
5223         New function that checks if a connection is in the owner queue of
5224         a certain service.
5225
5226         * bus/services.h:
5227         Add new function signatures.
5228
5229         * dbus/dbus-list.c: (_dbus_list_test):
5230         Add tests for _dbus_list_remove_last and traversing the list backwards.
5231
5232         * dbus/dbus-list.h:
5233         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5234         go any further, so return NULL then.
5235
5236         * dbus/dbus-protocol.h:
5237         Add new messages, service flags and service replies.
5238
5239 2003-01-26  Havoc Pennington  <hp@pobox.com>
5240
5241         * dbus/dbus-message-builder.c: implement, completely untested.
5242
5243         * test/data/*: add data to be used in testing.
5244         ".message" files are our simple loadable text format.
5245         ".message-raw" will be binary dumps of messages.
5246
5247         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5248
5249 2003-01-26  Havoc Pennington  <hp@pobox.com>
5250
5251         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5252
5253         * dbus/dbus-errors.c (dbus_result_to_string): add
5254         file errors
5255
5256         * dbus/dbus-message-builder.c: new file, will contain code to load
5257         up messages from files. Not implemented yet.
5258
5259 2003-01-26  Havoc Pennington  <hp@pobox.com>
5260
5261         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5262         the sender by setting to NULL
5263
5264 2003-01-26  Havoc Pennington  <hp@pobox.com>
5265
5266         The unit tests pass, but otherwise untested.  If it breaks, the
5267         tests should have been better. ;-)
5268
5269         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5270         the connection.
5271
5272         * dbus/dbus-message.c: redo everything so we maintain
5273         message->header as the only copy of the various fields.
5274         This avoids the possibility of out-of-memory in some cases,
5275         for example dbus_message_lock() can't run out of memory anymore,
5276         and avoids extra copying. Figured I may as well go ahead and do
5277         this since it was busted for dbus_message_lock to not return
5278         failure on OOM, and dbus_message_write_header was totally
5279         unchecked for OOM. Also fixed some random other bugs.
5280
5281         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5282         that strings are nul-terminated. Also, end_pos can be equal
5283         to string length just not greater than, I think.
5284         (_dbus_marshal_set_int32): new function
5285         (_dbus_marshal_set_uint32): new function
5286         (_dbus_marshal_set_string): new function
5287
5288         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5289         a warning, init timeout_list to NULL
5290         (dbus_connection_send_message): don't use uninitialized variable
5291         "serial"
5292
5293         * dbus/dbus-string.c (_dbus_string_replace_len): new function
5294
5295 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
5296
5297         * bus/driver.c: (bus_driver_handle_hello),
5298         (bus_driver_send_welcome_message):
5299         Plug leaks
5300
5301 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
5302
5303         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5304         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5305         (dbus_connection_unref):
5306         * dbus/dbus-marshal.c: (_dbus_marshal_test):
5307         * dbus/dbus-message.c: (dbus_message_unref),
5308         Plug memory leaks.
5309
5310         (dbus_message_get_fields):
5311         Remove debugging printout.
5312
5313         (_dbus_message_loader_return_buffer):
5314         Don't store the header string.
5315
5316         (_dbus_message_test):
5317         Plug leaks.
5318
5319 2003-01-26  Richard Hult  <rhult@codefactory.se>
5320
5321         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5322         the file descriptor list, since it can change under us.
5323
5324 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5325
5326         * glib/dbus-gmain.c: (dbus_connection_prepare),
5327         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5328         (remove_watch), (dbus_connection_hookup_with_g_main):
5329         Rewrite the glib handling to use its own GSource instead of a
5330         GIOChannel so we can catch messages put in the queue while waiting
5331         for a reply.
5332
5333 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5334
5335         * bus/Makefile.am:
5336         * bus/connection.c: (connection_disconnect_handler),
5337         (connection_watch_callback), (bus_connection_setup):
5338         * bus/dispatch.c: (send_one_message),
5339         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5340         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5341         * bus/dispatch.h:
5342         * bus/driver.c: (bus_driver_send_service_deleted),
5343         (bus_driver_send_service_created), (bus_driver_handle_hello),
5344         (bus_driver_send_welcome_message),
5345         (bus_driver_handle_list_services), (bus_driver_remove_connection),
5346         (bus_driver_handle_message):
5347         * bus/driver.h:
5348         Refactor code, put the message dispatching in its own file. Use
5349         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5350         is disconnected.
5351
5352 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5353
5354         * dbus/dbus-internals.h:
5355         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5356
5357         * dbus/dbus-message.c: (dbus_message_get_sender):
5358         * dbus/dbus-message.h:
5359         Implement dbus_message_get_sender.
5360
5361         * dbus/dbus-protocol.h:
5362         Add message and service defines.
5363
5364 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5365
5366         * dbus/dbus-connection.c: (dbus_connection_send_message):
5367         * dbus/dbus-message-internal.h:
5368         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5369         (dbus_message_write_header):
5370         Remove _dbus_messag_unlock and don't set the client serial on a
5371         message if one already exists.
5372
5373 2003-01-24  Havoc Pennington  <hp@pobox.com>
5374
5375         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5376         list_pool
5377
5378         * bus/driver.c (bus_driver_handle_list_services): fix a leak
5379         on OOM
5380
5381 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5382
5383         * dbus/dbus-list.c: (alloc_link), (free_link):
5384         Use a memory pool for the links.
5385
5386 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5387
5388         * bus/connection.c: (bus_connection_foreach):
5389         * bus/connection.h:
5390         Add new bus_connection_foreach function.
5391
5392         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5393         Add function that broadcasts a message to all clients.
5394
5395         (bus_driver_send_service_created), (bus_driver_handle_hello),
5396         (bus_driver_send_welcome_message),
5397         (bus_driver_handle_list_services), (bus_driver_message_handler):
5398         Implement functions that take care of listing services, and notifying
5399         clients when new services are created.
5400
5401         * bus/services.c: (bus_services_list):
5402         * bus/services.h:
5403         Add new function that returns an array of strings with the currently
5404         registered services.
5405
5406         * glib/dbus-glib.h:
5407         * glib/dbus-gmain.c:
5408         Update copyright year.
5409
5410 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5411
5412         * dbus/dbus-connection.c: (dbus_connection_send_message):
5413         Unlock the message in case it was sent earlier.
5414
5415         (dbus_connection_send_message_with_reply_and_block):
5416         Remove the reply message from the list.
5417
5418         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5419         Set array_len and new_pos correctly.
5420
5421         (_dbus_marshal_test):
5422         Remove debug output.
5423
5424         * dbus/dbus-message-internal.h:
5425         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5426         New function that returns the reply serial.
5427
5428         (_dbus_message_unlock):
5429         New function that unlocks a message and resets its header.
5430
5431         (dbus_message_append_string_array),
5432         (dbus_message_get_fields_valist),
5433         (dbus_message_iter_get_field_type),
5434         (dbus_message_iter_get_string_array),
5435         (dbus_message_get_fields),
5436         (dbus_message_append_fields_valist):
5437         Handle string arrays.
5438
5439         (dbus_message_set_sender):
5440         Make this function public since the bus daemon needs it.
5441
5442         (decode_header_data):
5443         Set the reply serial to -1 initially.
5444
5445         * dbus/dbus-message.h:
5446         Add dbus_message_set_sender.
5447
5448 2003-01-24  Havoc Pennington  <hp@pobox.com>
5449
5450         * doc/dbus-specification.sgml: add some stuff
5451
5452 2003-01-22  Havoc Pennington  <hp@pobox.com>
5453
5454         * doc/dbus-specification.sgml: Start to document the protocol.
5455
5456 2003-01-22  Havoc Pennington  <hp@pobox.com>
5457
5458         * dbus/dbus-connection.c
5459         (dbus_connection_send_message_with_reply_and_block): add some @todo
5460
5461         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
5462
5463 2003-01-21  Havoc Pennington  <hp@pobox.com>
5464
5465         (patch untested because can't compile)
5466
5467         * bus/driver.c (create_unique_client_name): make this function
5468         never recycle client names. Also, caller should initialize
5469         the DBusString.
5470
5471         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
5472
5473 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
5474
5475         * dbus/dbus-marshal.c: (_dbus_marshal_double),
5476         (_dbus_marshal_int32), (_dbus_marshal_uint32),
5477         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
5478         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
5479         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5480         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5481         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
5482         * dbus/dbus-marshal.h:
5483         * dbus/dbus-protocol.h:
5484         Add support for marshalling and demarshalling integer, double
5485         and string arrays.
5486
5487 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
5488
5489         * bus/Makefile.am:
5490         Add driver.[ch]
5491
5492         * bus/connection.c: (connection_disconnect_handler):
5493         Remove the connection from the bus driver's list.
5494
5495         (connection_watch_callback): Dispatch messages.
5496
5497         (free_connection_data): Free connection name.
5498
5499         (bus_connection_setup): Add connection to the bus driver's list.
5500         (bus_connection_remove_owned_service):
5501         (bus_connection_set_name), (bus_connection_get_name):
5502         Add functions for setting and getting the connection's name.
5503
5504         * bus/connection.h:
5505         Add function headers.
5506
5507         * bus/driver.c: (create_unique_client_name),
5508         (bus_driver_handle_hello_message),
5509         (bus_driver_send_welcome_message), (bus_driver_message_handler),
5510         (bus_driver_add_connection), (bus_driver_remove_connection):
5511         * bus/driver.h:
5512         * bus/main.c:
5513         * bus/services.c: (bus_service_free):
5514         * bus/services.h:
5515         New file that handles communication and registreation with the bus
5516         itself.
5517
5518 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
5519
5520         * dbus/dbus-connection.c: (dbus_connection_send_message):
5521         Add a new client_serial parameter.
5522
5523         (dbus_connection_send_message_with_reply):
5524         Remove a @todo since we've implemented the blocking function.
5525
5526         (dbus_connection_send_message_with_reply_and_block):
5527         New function that sends a message and waits for a reply and
5528         then returns the reply.
5529
5530         * dbus/dbus-connection.h:
5531         Add new functions.
5532
5533         * dbus/dbus-errors.c: (dbus_result_to_string):
5534         * dbus/dbus-errors.h:
5535         Add new DBUS_RESULT.
5536
5537         * dbus/dbus-message-internal.h:
5538         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
5539         (_dbus_message_set_sender), (dbus_message_write_header),
5540         (dbus_message_new_reply), (decode_header_data),
5541         (_dbus_message_loader_return_buffer), (_dbus_message_test):
5542         * dbus/dbus-message.h:
5543         Add new functions that set the reply serial and sender.
5544         Also marshal and demarshal them correctly and add test.
5545
5546         * dbus/dbus-protocol.h:
5547         Add new DBUS_MESSAGE_TYPE_SENDER.
5548
5549         * glib/dbus-glib.h:
5550         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
5551         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
5552         (dbus_connection_hookup_with_g_main):
5553         * glib/test-dbus-glib.c: (main):
5554         Rewrite to use GIOChannel and remove the GSource crack.
5555
5556         * test/echo-client.c: (main):
5557         * test/watch.c: (check_messages):
5558         Update for changed APIs
5559
5560 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
5561
5562         * dbus/Makefile.am: Add dbus-timeout.[cħ]
5563
5564         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
5565         Create a DBusTimeoutList.
5566         (dbus_connection_set_timeout_functions): Add new function to
5567         set timeout callbacks
5568
5569         * dbus/dbus-connection.h: Add public DBusTimeout API.
5570
5571         * dbus/dbus-message.c: (dbus_message_get_service):
5572         * dbus/dbus-message.h:  New function.
5573
5574         * dbus/dbus-server.c: Fix small doc typo.
5575
5576         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
5577
5578 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
5579
5580         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
5581         of the string, just as long as specified.
5582
5583 2003-01-19  Havoc Pennington  <hp@pobox.com>
5584
5585         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
5586         new function
5587
5588         * dbus/dbus-server.c (dbus_server_set_max_connections)
5589         (dbus_server_get_max_connections, dbus_server_get_n_connections):
5590         keep track of current number of connections, and add API for
5591         setting a max (but haven't implemented enforcing the max yet)
5592
5593 2003-01-18  Havoc Pennington  <hp@pobox.com>
5594
5595         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
5596         reading/writing if read_watch != NULL or write_watch != NULL.
5597
5598         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
5599         the message loader code to actually load message->header and
5600         message->body into the newly-created message.
5601
5602         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
5603         in OOM case
5604
5605         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
5606         (dbus_connection_get_max_message_size)
5607         (dbus_connection_set_max_live_messages_size)
5608         (dbus_connection_get_max_live_messages_size): implement some
5609         resource limitation functions
5610
5611         * dbus/dbus-resources.c: new file implementing some of the
5612         resource limits stuff
5613
5614         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
5615         missing docs, add @todo to handle OOM etc.
5616
5617         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
5618         docs
5619
5620 2003-01-18  Havoc Pennington  <hp@pobox.com>
5621
5622         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
5623         connection if it hasn't been already.
5624
5625         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
5626         replace with DisconnectFunction.
5627
5628 2003-01-18  Havoc Pennington  <hp@pobox.com>
5629
5630         Building --disable-verbose-mode --disable-asserts --disable-tests
5631         cuts the library from 112K to 45K or so
5632
5633         * configure.in: check for varargs macro support,
5634         add --enable-verbose-mode, --enable-asserts.
5635
5636         * dbus/dbus-internals.h (_dbus_assert): support
5637         DBUS_DISABLE_ASSERT
5638         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
5639
5640 2003-01-18  Havoc Pennington  <hp@pobox.com>
5641
5642         * dbus/dbus-test.c: include config.h so that tests actually run
5643
5644         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
5645         so the failure mode when that assumption fails will be plenty
5646         obvious.
5647
5648 2003-01-18  Havoc Pennington  <hp@pobox.com>
5649
5650         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
5651
5652         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
5653         the distribution
5654
5655         * test/Makefile.am: don't use special variable "TESTS" for echo-*
5656         since we don't want to use those in make check
5657
5658 2003-01-15  Havoc Pennington  <hp@redhat.com>
5659
5660         Release 0.2
5661
5662         * NEWS: update
5663
5664 2003-01-15  Havoc Pennington  <hp@redhat.com>
5665
5666         * test/Makefile.am: fix so that test source code ends up in the
5667         distribution on make distcheck
5668
5669 2003-01-15  Havoc Pennington  <hp@redhat.com>
5670
5671         Release 0.1.
5672
5673         * NEWS: update
5674
5675 2003-01-15  Havoc Pennington  <hp@redhat.com>
5676
5677         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
5678         fix build when --disable-tests
5679
5680         * Makefile.am (EXTRA_DIST): put HACKING in here
5681
5682         * HACKING: document procedure for making a tarball release.
5683
5684 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
5685
5686         * bus/connection.c: (connection_error_handler),
5687         (bus_connection_setup):
5688         * bus/main.c: (main):
5689         Make sure that the DBusConnectionData struct is NULLed
5690         out to prevent a segfault.
5691
5692         * dbus/dbus-errors.c: (dbus_result_to_string):
5693         * dbus/dbus-errors.h:
5694         * dbus/dbus-message.c: (dbus_message_get_fields),
5695         (dbus_message_get_fields_valist), (_dbus_message_test):
5696         * dbus/dbus-message.h:
5697         Make dbus_message_get_fields return a result code so we can
5698         track invalid fields as well as oom.
5699
5700 2003-01-11  Havoc Pennington  <hp@pobox.com>
5701
5702         * configure.in: change --enable-test/--enable-ansi action-if-given
5703         to enable_foo=$enableval instead of enable_foo=yes
5704
5705 2003-01-08  Havoc Pennington  <hp@pobox.com>
5706
5707         * dbus/dbus-string.c (_dbus_string_align_length): new function
5708
5709         * dbus/dbus-test-main.c: move main() for test app here
5710         * dbus/dbus-test.c
5711         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
5712         symbol to run tests, because dbus-test isn't in the main
5713         library
5714
5715         Code review nitpicks.
5716
5717         * dbus/dbus-message.c (dbus_message_write_header): add newlines
5718         for people with narrow emacs ;-). Assert client_serial was filled
5719         in. Assert message->name != NULL.
5720         (dbus_message_append_fields): have "first_field_type" arg separate
5721         from va list, needed for C++ binding that also uses varargs IIRC
5722         and helps with type safety
5723         (dbus_message_new): add @todo about using DBusString to store
5724         service/name internally
5725         (dbus_message_new): don't leak ->service and ->name on OOM later
5726         in the function
5727         (dbus_message_unref): free the service name
5728         (dbus_message_get_fields): same change to varargs
5729         i.e. first_field_type
5730         (_dbus_message_loader_return_buffer): assert that the message data
5731         is aligned (if not it's a bug in our code). Put in verbose griping
5732         about why we set corrupted = TRUE.
5733         (decode_header_data): add FIXME that char* is evil.  Was going to
5734         add FIXME about evil locale-specific string.h strncmp, but just
5735         switched to wacky string-as-uint32 optimization. Move check for
5736         "no room for field name" above get_const_data_len() to avoid
5737         assertion failure in get_const_data_len if we have trailing 2
5738         bytes or the like. Check for service and name fields being
5739         provided twice. Don't leak service/name on error. Require field
5740         names to be aligned to 4 bytes.
5741
5742         * dbus/dbus-marshal.c: move byte swap stuff to header
5743         (_dbus_pack_int32): uscore-prefix
5744         (_dbus_unpack_int32): uscore-prefix
5745         (_dbus_unpack_uint32): export
5746         (_dbus_demarshal_string): add @todo complaining about use of
5747         memcpy()
5748         (_dbus_marshal_get_field_end_pos): add @todo about bad error
5749         handling allowing corrupt data to go unchecked
5750
5751 2003-01-08  Havoc Pennington  <hp@redhat.com>
5752
5753         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
5754         to the select() as needed for authentication. (should be using
5755         _dbus_poll() not select, but for another day)
5756
5757         * dbus/dbus.h: include dbus/dbus-protocol.h
5758
5759 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
5760
5761         * dbus/Makefile.am (dbusinclude_HEADERS): Install
5762         dbus-connection.h
5763
5764 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
5765
5766         * dbus/dbus-internals.c: (_dbus_type_to_string):
5767         New function that returns a string describing a type.
5768
5769         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
5770         * dbus/dbus-marshal.h:
5771         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
5772         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
5773         (dbus_message_iter_get_byte_array):
5774         * dbus/dbus-message.h:
5775         Add new convenience functions for appending and getting message fields.
5776         Also add demarshalling routines for byte arrays.
5777
5778 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
5779
5780         * dbus/dbus-connection-internal.h:
5781         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5782         (_dbus_connection_get_next_client_serial),
5783         (dbus_connection_send_message):
5784         * dbus/dbus-internals.h:
5785         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
5786         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
5787         (_dbus_marshal_uint32), (_dbus_demarshal_double),
5788         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
5789         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
5790         (_dbus_verbose_bytes), (_dbus_marshal_test):
5791         * dbus/dbus-marshal.h:
5792         * dbus/dbus-message-internal.h:
5793         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
5794         (dbus_message_write_header), (_dbus_message_lock),
5795         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
5796         (dbus_message_get_name), (dbus_message_append_int32),
5797         (dbus_message_append_uint32), (dbus_message_append_double),
5798         (dbus_message_append_string), (dbus_message_append_byte_array),
5799         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
5800         (dbus_message_iter_unref), (dbus_message_iter_has_next),
5801         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
5802         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
5803         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
5804         (decode_header_data), (_dbus_message_loader_return_buffer),
5805         (message_iter_test), (_dbus_message_test):
5806         * dbus/dbus-message.h:
5807         * dbus/dbus-protocol.h:
5808         * dbus/dbus-test.c: (main):
5809         * dbus/dbus-test.h:
5810         * glib/test-dbus-glib.c: (message_handler), (main):
5811         * test/echo-client.c: (main):
5812         * test/watch.c: (check_messages):
5813         Make messages sendable and receivable for real.
5814
5815 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
5816
5817         * dbus/dbus-marshal.c: (_dbus_marshal_double),
5818         (_dbus_marshal_string), (_dbus_marshal_byte_array):
5819         * dbus/dbus-message.c: (dbus_message_append_int32),
5820         (dbus_message_append_uint32), (dbus_message_append_double),
5821         (dbus_message_append_string), (dbus_message_append_byte_array):
5822         Handle OOM restoration.
5823
5824 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
5825
5826         * dbus/dbus-marshal.c: (_dbus_marshal_string),
5827         (_dbus_demarshal_string), (_dbus_marshal_test):
5828         * dbus/dbus-marshal.h:
5829         * dbus/dbus-message.c: (dbus_message_get_name),
5830         Document these functions.
5831
5832         (dbus_message_append_int32), (dbus_message_append_uint32),
5833         (dbus_message_append_double), (dbus_message_append_string),
5834         (dbus_message_append_byte_array):
5835         * dbus/dbus-message.h:
5836         Add functions for adding message fields of different types.
5837
5838         * dbus/dbus-protocol.h:
5839         Add the different types.
5840
5841 2003-01-05  Havoc Pennington  <hp@pobox.com>
5842
5843         * bus/connection.c: implement routines for handling connections,
5844         first thing is keeping a list of owned services on each connection
5845         and setting up watches etc.
5846
5847         * bus/services.c: implement a mapping from service names to lists
5848         of connections
5849
5850         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
5851
5852         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
5853         to use static mutexes for global data
5854
5855         * dbus/dbus-connection.c (dbus_connection_set_data): add new
5856         collection of functions to set/get application-specific data
5857         on the DBusConnection.
5858
5859 2003-01-04  Havoc Pennington  <hp@pobox.com>
5860
5861         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
5862         (_dbus_poll): new function
5863
5864         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
5865         copied from GLib
5866
5867         * bus/loop.c: initial code for the daemon main loop
5868
5869 2003-01-04  Havoc Pennington  <hp@pobox.com>
5870
5871         * test/watch.c (error_handler): make it safe if the error handler
5872         is called multiple times (if we s/error handler/disconnect
5873         handler/ we should just guarantee it's called only once)
5874
5875         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
5876         error handler on disconnect (it's quite possible we should
5877         just change the error handler to a "disconnect handler," I'm
5878         not sure we have any other meaningful errors)
5879
5880         * configure.in: check for getpwnam_r
5881
5882         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5883         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
5884         mechanism as in SASL spec, using socket credentials
5885
5886         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
5887         (_dbus_send_credentials_unix_socket): new function
5888
5889         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
5890         dbus_accept()
5891         (_dbus_write): only check errno if <0 returned
5892         (_dbus_write_two): ditto
5893
5894 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
5895
5896         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
5897         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
5898         (_dbus_marshal_test):
5899         * dbus/dbus-marshal.h:
5900         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
5901         to _dbus_marshal_utf8_string. Also fix some tests.
5902
5903 2002-12-28  Harri Porten  <porten@kde.org>
5904
5905         * configure.in: added check for C++ compiler and a very cheesy
5906         check for the Qt integration
5907
5908         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
5909
5910         * qt/Makefile.am: added
5911
5912         * qt/.cvsignore: added
5913
5914         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
5915         latter, added #ifdef QT_THREAD_SUPPORT guard.
5916
5917         * dbus/Makefile.am: added missing headers for make dist
5918
5919 2002-12-28  Kristian Rietveld  <kris@gtk.org>
5920
5921         * dbus/Makefile.am: fixup export-symbols-regex.
5922
5923 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
5924
5925         * acinclude.m4: Add this file and put the
5926         PKG_CHECK_MODULE macro in it.
5927
5928 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
5929
5930         * dbus/dbus-marshal.c: (_dbus_marshal_string),
5931         (_dbus_demarshal_double), (_dbus_demarshal_int32),
5932         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
5933         (_dbus_marshal_test):
5934         Make the demarshalling routines align the pos argument.
5935         Add string marshalling tests and fix the obvious bugs
5936         discovered.
5937
5938 2002-12-26  Havoc Pennington  <hp@pobox.com>
5939
5940         * dbus/dbus-auth.c: fixes fixes fixes
5941
5942         * dbus/dbus-transport-unix.c: wire up support for
5943         encoding/decoding data on the wire
5944
5945         * dbus/dbus-auth.c (_dbus_auth_encode_data)
5946         (_dbus_auth_decode_data): append to target string
5947         instead of nuking it.
5948
5949 2002-12-26  Havoc Pennington  <hp@pobox.com>
5950
5951         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
5952         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
5953         doh
5954
5955         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
5956         avoid swap_bytes() overhead (ignoring possible assembly stuff for
5957         now). Main point is because I wanted unpack_uint32 to implement
5958         _dbus_verbose_bytes
5959         (_dbus_verbose_bytes): new function
5960
5961         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
5962
5963         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
5964         mechanism to handle a corrupt message stream
5965         (_dbus_message_loader_new): fix preallocation to only prealloc,
5966         not prelengthen
5967
5968         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
5969         (_dbus_string_test): enhance tests for copy/move and fix the
5970         functions
5971
5972         * dbus/dbus-transport-unix.c: Hold references in more places to
5973         avoid reentrancy problems
5974
5975         * dbus/dbus-transport.c: ditto
5976
5977         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
5978         leak reference count in no-message case
5979
5980         * test/watch.c (do_mainloop): handle adding/removing watches
5981         during iteration over the watches. Also, ref the connection/server
5982         stored on a watch, so we don't try to mangle a destroyed one.
5983
5984         * dbus/dbus-transport-unix.c (do_authentication): perform
5985         authentication
5986
5987         * dbus/dbus-auth.c (get_state): add a state
5988         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
5989         (_dbus_auth_get_unused_bytes): append the unused bytes
5990         to the passed in string, rather than prepend
5991
5992         * dbus/dbus-transport.c (_dbus_transport_init_base): create
5993         the auth conversation DBusAuth
5994
5995         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
5996         (_dbus_transport_new_for_domain_socket): when creating a
5997         transport, pass in whether it's a client-side or server-side
5998         transport so we know which DBusAuth to create
5999
6000 2002-12-03  Havoc Pennington  <hp@pobox.com>
6001
6002         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6003         _after_ finalizing the derived members
6004         (unix_connection_set): unref watch if we fail to add it
6005
6006         * dbus/dbus-connection.c (dbus_connection_unref): delete the
6007         transport first, so that the connection owned by the
6008         transport will be valid as the transport finalizes.
6009
6010         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6011         if necessary, and remove watches from the connection.
6012
6013         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6014
6015 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
6016
6017         * dbus/dbus-marshal.c: (_dbus_marshal_string),
6018         (_dbus_demarshal_double), (_dbus_demarshal_int32),
6019         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6020         (_dbus_marshal_test):
6021         * dbus/dbus-marshal.h:
6022         Add string marshal functions and have the demarshal functions
6023         return the new position.
6024
6025 2002-12-25  Havoc Pennington  <hp@pobox.com>
6026
6027         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6028         it is a simple protocol that just maps directly to SASL.
6029
6030         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6031         initial implementation, not actually used yet.
6032
6033         * dbus/dbus-string.c (_dbus_string_find): new function
6034         (_dbus_string_equal): new function
6035         (_dbus_string_base64_encode): new function
6036         (_dbus_string_base64_decode): new function
6037
6038 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
6039
6040         * dbus/Makefile.am:
6041         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6042         (_dbus_marshal_int32), (_dbus_marshal_uint32),
6043         (_dbus_demarshal_double), (_dbus_demarshal_int32),
6044         (_dbus_demarshal_uint32), (_dbus_marshal_test):
6045         * dbus/dbus-marshal.h:
6046         * dbus/dbus-protocol.h:
6047         * dbus/dbus-test.c: (main):
6048         * dbus/dbus-test.h:
6049         Add un-optimized marshalling/demarshalling routines.
6050
6051 2002-12-25  Harri Porten  <porten@kde.org>
6052
6053         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6054
6055 2002-12-24  Zack Rusin  <zack@kde.org>
6056
6057         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6058         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6059         main loop stuff
6060
6061 2002-12-24  Havoc Pennington  <hp@pobox.com>
6062
6063         * glib/dbus-gthread.c: fix include
6064
6065         * glib/dbus-glib.h: rename DBusMessageHandler for now.
6066         I think glib API needs to change, though, as you don't
6067         want to use DBusMessageFunction, you want to use the
6068         DBusMessageHandler object. Probably
6069         dbus_connection_open_with_g_main_loop()
6070         and dbus_connection_setup_g_main_loop() or something like that
6071         (but think of better names...) that just create a connection
6072         that has watch/timeout functions etc. already set up.
6073
6074         * dbus/dbus-connection.c
6075         (dbus_connection_send_message_with_reply): new function just to
6076         show how the message handler helps us deal with replies.
6077
6078         * dbus/dbus-list.c (_dbus_list_remove_last): new function
6079
6080         * dbus/dbus-string.c (_dbus_string_test): free a string that
6081         wasn't
6082
6083         * dbus/dbus-hash.c: use memory pools for the hash entries
6084         (rebuild_table): be more paranoid about overflow, and
6085         shrink table when we can
6086         (_dbus_hash_test): reduce number of sprintfs and write
6087         valid C89. Add tests for case where we grow and then
6088         shrink the hash table.
6089
6090         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6091
6092         * dbus/dbus-connection.c (dbus_connection_register_handler)
6093         (dbus_connection_unregister_handler): new functions
6094
6095         * dbus/dbus-message.c (dbus_message_get_name): new
6096
6097         * dbus/dbus-list.c: fix docs typo
6098
6099         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6100         an object representing a handler for messages.
6101
6102 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
6103
6104         * glib/dbus-glib.h:
6105         * glib/dbus-gthread.c: (dbus_gthread_init):
6106         Don't use the gdbus prefix for public functions.
6107
6108 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
6109
6110         * Makefile.am:
6111         * configure.in:
6112         Add GLib checks and fixup .pc files
6113
6114         * glib/Makefile.am:
6115         * glib/dbus-glib.h:
6116         * glib/dbus-gmain.c: (gdbus_connection_prepare),
6117         (gdbus_connection_check), (gdbus_connection_dispatch),
6118         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6119         (dbus_connection_gsource_new):
6120         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6121         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6122         * glib/test-dbus-glib.c: (message_handler), (main):
6123         Add GLib support.
6124
6125 2002-12-15  Harri Porten  <porten@kde.org>
6126
6127         * autogen.sh: check for libtoolize before attempting to use it
6128
6129         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6130         struct.
6131
6132         * .cvsignore: ignore more stamp files
6133
6134         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6135
6136         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6137         without make install.
6138
6139 2002-12-15  Havoc Pennington  <hp@pobox.com>
6140
6141         * dbus/dbus-threads.c: add thread stubs that a higher library
6142         layer can fill in. e.g. the GLib wrapper might fill them in with
6143         GThread stuff. We still need to use this thread API to
6144         thread-safe-ize the library.
6145
6146 2002-12-12  Havoc Pennington  <hp@pobox.com>
6147
6148         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6149         below new interfaces and include fewer system headers.
6150
6151         * dbus/dbus-sysdeps.c (_dbus_read): new function
6152         (_dbus_write): new function
6153         (_dbus_write_two): new function
6154         (_dbus_connect_unix_socket): new function
6155         (_dbus_listen_unix_socket): new function
6156
6157         * dbus/dbus-message-internal.h: change interfaces to use
6158         DBusString
6159
6160 2002-12-11  Havoc Pennington  <hp@pobox.com>
6161
6162         * dbus/dbus-types.h: add dbus_unichar
6163
6164         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6165
6166         * dbus/dbus-connection.c (dbus_connection_send_message): return
6167         TRUE on success
6168
6169         * dbus/dbus-transport.c: include dbus-watch.h
6170
6171         * dbus/dbus-connection.c: include dbus-message-internal.h
6172
6173         * HACKING: add file with coding guidelines stuff.
6174
6175         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6176         handling here, for security purposes (as in vsftpd). Not actually
6177         using this class yet.
6178
6179         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6180         system/libc usage here, as in vsftpd, for ease of auditing (and
6181         should also simplify portability). Haven't actually moved all the
6182         system/libc usage into here yet.
6183
6184 2002-11-25  Havoc Pennington  <hp@pobox.com>
6185
6186         * dbus/dbus-internals.c (_dbus_verbose): fix to not
6187         always print the first verbose message.
6188
6189 2002-11-24  Havoc Pennington  <hp@pobox.com>
6190
6191         * test/echo-client.c, test/echo-server.c: cheesy test
6192         clients.
6193
6194         * configure.in (AC_CHECK_FUNCS): check for writev
6195
6196         * dbus/dbus-message.c (_dbus_message_get_network_data): new
6197         function
6198
6199         * dbus/dbus-list.c (_dbus_list_foreach): new function
6200
6201         * dbus/dbus-internals.c (_dbus_verbose): new function
6202
6203         * dbus/dbus-server.c, dbus/dbus-server.h: public object
6204         representing a server that listens for connections.
6205
6206         * dbus/.cvsignore: create
6207
6208         * dbus/dbus-errors.h, dbus/dbus-errors.c:
6209         public API for reporting errors
6210
6211         * dbus/dbus-connection.h, dbus/dbus-connection.c:
6212         public object representing a connection that
6213         sends/receives messages. (Same object used for
6214         both client and server.)
6215
6216         * dbus/dbus-transport.h, dbus/dbus-transport.c:
6217         Basic abstraction for different kinds of stream
6218         that we might read/write messages from.
6219
6220 2002-11-23  Havoc Pennington  <hp@pobox.com>
6221
6222         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6223         _DBUS_INT_MAX
6224
6225         * dbus/dbus-test.c (main): add list test, and include
6226         dbus-test.h as intended
6227
6228         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6229         (_dbus_hash_table_remove_int): return value indicates
6230         whether the entry existed to remove
6231
6232         * dbus/dbus-list.c: add linked list utility class,
6233         with docs and tests
6234
6235         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6236         array sometimes.
6237
6238 2002-11-23  Havoc Pennington  <hp@pobox.com>
6239
6240         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6241         DBUS_END_DECLS to nothing, that should fix this once and for all
6242
6243         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6244
6245         * dbus/dbus-message.c, dbus/dbus-hash.c:
6246         add some missing @brief
6247
6248 2002-11-23  Havoc Pennington  <hp@pobox.com>
6249
6250         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6251         to avoid confusing Doxygen
6252
6253         * dbus/dbus-hash.c: @} not }@
6254
6255         * dbus/dbus-message.c (struct DBusMessage): split out
6256         internals docs
6257
6258 2002-11-23  Havoc Pennington  <hp@pobox.com>
6259
6260         * configure.in: pile on more warning flags if using gcc
6261
6262         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6263         to document static functions
6264
6265         * configure.in: add summary to end of configure so it
6266         looks nice and attractive
6267
6268         * dbus/dbus-hash.c: finish implementation and write unit
6269         tests and docs
6270
6271         * configure.in: add --enable-tests to enable unit tests
6272
6273         * dbus/dbus-test.c: test program to run unit tests
6274         for all files in dbus/*, initially runs a test for
6275         dbus-hash.c
6276
6277         * dbus/dbus-internals.h: file to hold some internal utility stuff
6278
6279 2002-11-22  Havoc Pennington  <hp@redhat.com>
6280
6281         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6282         "ported" away from Tcl
6283
6284         * dbus/dbus-types.h: header for types such as dbus_bool_t
6285
6286 2002-11-22  Havoc Pennington  <hp@redhat.com>
6287
6288         * dbus/dbus.h: fixups for doc warnings
6289
6290         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6291         macros
6292         (QUIET): make it quiet so we can see warnings
6293
6294         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6295
6296 2002-11-22  Havoc Pennington  <hp@redhat.com>
6297
6298         * Makefile.am: include "Doxyfile" target in all-local
6299
6300         * configure.in: generate the Doxyfile
6301
6302         * Doxyfile.in: move Doxyfile here, so we can use
6303         configure to generate a Doxyfile with the right
6304         version number etc.
6305
6306 2002-11-22  Havoc Pennington  <hp@redhat.com>
6307
6308         * dbus/dbus-message.c: move inline docs into .c file
6309
6310         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6311         so all docs are under doc/
6312         (MAN_EXTENSION): generate man pages. Use extension
6313         ".3dbus" which matches ".3qt" on my system,
6314         I guess this is OK, I don't know really.
6315         (FILE_PATTERNS): look for .c files not .h, makes sense
6316         for plain C I think
6317
6318 2002-11-22  Havoc Pennington  <hp@pobox.com>
6319
6320         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6321         because any app can be a server, and any app can be a client,
6322         the bus is a special kind of server.
6323
6324 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
6325
6326         * Doxyfile : adding. Still needs Makefile rules to be generated
6327         automatically (just run "doxygen" in the toplevel dir for now to
6328         generate docs)
6329
6330         * dbus/dbus-message.h : Adding sample docs (javadoc since
6331         resembles gtk-doc a little more)
6332
6333         * dbus/dbus.h : Adding sample docs
6334
6335 2002-11-21  Havoc Pennington  <hp@redhat.com>
6336
6337         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6338         so we can allow ourselves to include files directly,
6339         instead of having to use dbus.h
6340
6341         * dbus/dbus.h: fill in
6342
6343         * dbus/dbus-message.h: sketch out a sample header file.
6344         Include griping if you include it directly instead of
6345         via dbus.h
6346
6347         * dbus/dbus-macros.h: new file with macros for extern "C",
6348         TRUE/FALSE, NULL, etc.
6349
6350         * doc/file-boilerplate.c: put include guards in here
6351
6352 2002-11-21  Havoc Pennington  <hp@redhat.com>
6353
6354         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6355
6356         * COPYING: include the GPL as well, and license code
6357         under both AFL and GPL.
6358
6359 2002-11-21  Havoc Pennington  <hp@redhat.com>
6360
6361         * acconfig.h: get rid of this
6362
6363         * autogen.sh (run_configure): add --no-configure option
6364
6365         * configure.in: remove AC_ARG_PROGRAM to make
6366         autoconf complain less. add AC_PREREQ.
6367         add AC_DEFINE third arg.
6368
6369 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
6370
6371         * doc/Makefile.am:
6372         Fix references so we can distcheck.
6373
6374 2002-11-21  Havoc Pennington  <hp@redhat.com>
6375
6376         * Initial module creation
6377