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