1. 29 Dec, 2020 2 commits
  2. 28 Dec, 2020 5 commits
    • Julian Graham's avatar
      task #14373: Application specific logging · eee3823d
      Julian Graham authored
      * gzochi-server/doc/gzochid.texi (Transactional logging): Describe new
        `logging' element in descriptor.
      * gzochi-server/src/Makefile.am (noinst_HEADERS): Add `filelog.h'.
        (libgzochid_la_SOURCES): Add `filelog.c'.
      * gzochi-server/src/app.c, app.h
        (gzochid_application_context_get_log_domain): New function.
      * gzochi-server/src/app.c (GzochidApplicationContext): New struct field
        `log_domain'.
        (initialize_logging): New function.
        (gzochid_application_context_constructed): Initialize logging.
        (gzochid_application_context_finalize): Free the log domain string.
      * gzochi-server/src/descriptor.c (descriptor_start_element): Parse the new
        `logging' element.
        (application_descriptor_finalize): Free the log filename.
        (gzochid_application_descriptor_init): Set a default log level.
      * gzochi-server/src/descriptor.h (GzochidApplicationDescriptor): New struct
        fields `log_level' and `log_filename'.
      * gzochi-server/src/dtd/game.dtd: New `logging' element.
      * gzochi-server/src/filelog.c, filelog.h: New files.
      * gzochi-server/src/txlog.c (commit_message): Use the application log
        domain.
        (log_commit): Pass the application contex to `commit_message'.
        (gzochid_tx_vlog): Use per-application priority threshold.
      * gzochi-server/tests/Makefile.am (test_programs): Add `test-filelog'.
        (test_filelog_CFLAGS, test_filelog_SOURCES, test_filelog_LDADD): New
        declarations.
      * gzochi-server/tests/mock-app.c
        (gzochid_application_context_get_log_domain): New function.
      * gzochi-server/tests/test-filelog.c: New file.
      * gzochi-server/tests/test-taskclient.c
        (gzochid_mock_application_install_properties): Install `descriptor'
        property.
        (taskclient_fixture): New struct field `descriptor'.
        (taskclient_fixture_setup): Create a dummy descriptor.
        (taskclient_fixture_teardown): Clean up the dummy descriptor.
      eee3823d
    • Julian Graham's avatar
      task #13789: Document relationship between channels and sessions · 7b2c5f08
      Julian Graham authored
      * gzochi-server/doc/gzochid.texi (Channel management): Add paragraph
        describing ordering concerns across channels and sessions.
      7b2c5f08
    • Julian Graham's avatar
      bug #50642: application nodes who submit uncommitable transactions should be disconnected · df717960
      Julian Graham authored
      * gzochi-server/src/dataserver-protocol.c (dispatch_end_changeset): Call
        `gzochid_client_socket_close' when the dataserver sets the `GError' obj.
      * gzochi-server/src/socket.c, socket.h (gzochid_client_socket_close): New
        function.
      * gzochi-server/tests/test-dataserver-protocol.c (GzochidMetadDataServer):
        New struct field `set_error'.
        (gzochi_metad_dataserver_error_quark, ignore_warnings,
        test_client_dispatch_one_end_changeset_failure): New functions.
      df717960
    • Julian Graham's avatar
      bug #53814: Memory corruption in meta server on disconnect · 1a259716
      Julian Graham authored
      The socket's send buffer could be appended to during shutdown, outside the
      protection of the socket's mutex. This patch ensures that the mutex
      protects the send buffer.
      
      * gzochi-server/src/socket.c (gzochid_client_soket_unref): Protect
        `send_buffer' with the socket's mutex.
      1a259716
    • Julian Graham's avatar
      bug #49420: dataclient storage engine should release all locks on disconnect · 0c06d520
      Julian Graham authored
      This patch adds an explicit handler for disconnects / errors within the
      dataclient, which: Invokes the "failure" callbacks for all outstanding
      value and next-key requests, and invokes the lock release timeout callbacks
      for all locally-held locks.
      
      Outstanding oid block requests currently can't
      fail, but they can be removed silently; the originating transaction will
      time out, and a subsequent transaction can resubmit the request (which will
      succeed after the container reconnects to the meta server.)
      
      * gzochi-server/src/dataclient-protocol.c (client_error): Invoke
        `gzochid_dataclient_disconnected'.
      * gzochi-server/src/dataclient.c, dataclient.h
        (gzochid_dataclient_disconnected): New function.
      * gzochi-server/src/dataclient.c (dataclient_callback_registration): New
        struct object ref `client'.
        (GzochidDataClient): New object properties `lock_release_callbacks' and
        `lock_release_mutex'.
        (create_callback, gzochid_dataclient_request_value,
        gzochid_dataclient_request_next_key): Take a reference to the dataclient.
        (free_callback, invoke_failure_callback_premature,
        invoke_release_callback_premature, clear_callback_queue): New function.
        (gzochid_data_client_finalize): Free the lock release callbacks and the
        lock release list mutex.
        (free_callback_queue, processed_queued_callback): Free callbacks with
        `free_callback'.
        (gzochid_data_client_init): Initialize the lock release list mutex.
        (invoke_release_callback): Hold the lock release list mutex. Remove the
        registration from the lock release list.
      * gzochi-server/tests/test-dataclient-protocol.c
        (gzochid_dataclient_disconnect, test_client_error_simple): New functions.
      * gzochi-server/tests/test-dataclient.c (dataclient_data_callback_data):
        New struct fields `failure' and `success'.
        (success_callback): Set the success flag.
        (failure_callback): Set the failure flag.
        (test_request_value_simple, test_request_next_key_simple): Flush the
        callback queue to release the ref on the dataclient.
        (test_disconnected_simple): New function.
      0c06d520
  3. 27 Dec, 2020 4 commits
    • Julian Graham's avatar
      bug #48769: (gzochi client) does not quite work on OS X · 046208e2
      Julian Graham authored
      This was tracked as a MacOS issue because it was initially only
      reproducible in that environment. The root cause, however, was a general
      problem with `getaddrinfo' returning multiple addresses for "localhost" and
      the naive implementation of the benchmark client choosing the wrong one.
      
      * gzochi-server/benchmarks/echo-chamber/client.scm (connect): Supply
        `HINT_FAMILY' and `HINT_SOCKTYPE' arguments to `getaddrinfo'.
      046208e2
    • Julian Graham's avatar
      Networking test fixes for socket operations on BSD/Mach · a4294a18
      Julian Graham authored
      Many of the `gzochi-server' unit tests that exercise the networking
      subsystem were using pipes as a substitute for network sockets. On Linux,
      this appeared to be a reasonable substitution, but in Darwin, the behavior
      of Mach kernel buffering and the behavior of I/O primitive operations on
      pipe file descriptors vs. sockets is different enough to make the tests
      fail in both deterministic and non-deterministic ways. This changeset
      replaces the use of pipes with local socket pairs.
      
      * gzochi-server/tests/test-channel.c (create_pipe_client): Rename to
        `create_socket_client', use `socketpair' instead of `pipe'.
      * gzochi-server/tests/test-channelserver-protocol.c
        (channelserver_protocol_fixture_set_up): Use `socketpair' instead of
        `pipe'.
      * gzochi-server/tests/test-dataserver-protocol.c
        (dataserver_protocol_fixture_set_up): Use `socketpair' instead of `pipe'.
      * gzochi-server/tests/test-metaserver-protocol.c
        (metaserver_protocol_fixture_set_up, pump_login,
        test_client_dispatch_one_login, test_client_dispatch_one_login_base_url):
        Loop over `g_main_context_iteration' and `g_io_channel_read_chars' to
        fully consume events and content.
      * gzochi-server/tests/test-sessionserver-protocol.c
        (sessionserver_protocol_fixture_set_up): Use `socketpair' instead of
        `pipe'.
      * gzochi-server/tests/test-socket.c (test_socket_fixture_set_up,
        test_socket_client_dispatch): Loop over `g_main_context_iteration' to
        fully consume events and content.
        (test_socket_client_listen): Use `socketpair' instead of `pipe'.
      * gzochi-server/tests/test-taskserver-protocol.c
        (taskserver_protocol_fixture_set_up): Use `socketpair' instead of `pipe'.
      a4294a18
    • Julian Graham's avatar
      Misc. casts and signature fixes for compiling gzochid tests with Clang · 0351aeb1
      Julian Graham authored
      Clang appears to be a bit stricter than GCC when it comes to signed /
      unsigned character conversions and comparisons. The majority of these
      changes relate to syncing up the signage between local variables and the
      arguments and return types of functions - within gzochid and within GLib.
      
      Too many changes to list.
      0351aeb1
    • Julian Graham's avatar
      Change type of storage value to `unsigned char *' to better reflect its use · 50757c37
      Julian Graham authored
      This changes the return type of `transaction_get' and
      `transaction_get_for_update', and the value argument to `transaction_put'.
      
      Too many changes to list.
      50757c37
  4. 22 Oct, 2020 1 commit
  5. 19 Oct, 2020 2 commits
    • Julian Graham's avatar
      Stub declarations for various client protocol globals to fix test builds · 021bdd2d
      Julian Graham authored
      After adding `extern' to the declarations in the corresponding header files
      all clients must either link to the real declarations or provide their own
      stub declarations.
      
      * gzochi-server/tests/test-metaclient-protocol.c, test-metaclient.c
        (gzochid_channelclient_client_protocol,
        gzochid_dataclient_client_protocol,
        gzochid_sessionclient_client_protocol,
        gzochid_taskclient_client_protocol): New client protocol declarations.
      021bdd2d
    • Julian Graham's avatar
      Additional Guile 3.x constructor protocol compatibility fixes · 4b3c4d9d
      Julian Graham authored
      Guile 3.x invokes the constructors in a parent-child record inheritance
      chain in a different order (?) than Guile 2.x, and this means that we can't
      map the field binder onto the deserialized data during the invocation of
      the contructor protocol. Instead, deserialize all of the record data at the
      beginning and then parcel it out to the constructors during protocol
      invocation.
      4b3c4d9d
  6. 04 Oct, 2020 5 commits
    • Julian Graham's avatar
      Properly mark gzochi-server protocol symbols as `extern' in header files · 0bac5fca
      Julian Graham authored
      * gzochi-server/src/channelclient-protocol.h
        (gzochid_channelclient_client_protocol): Add `extern'.
      * gzochi-server/src/dataclient-protocol.h
        (gzochid_dataclient_client_protocol): Add `extern'.
      * gzochi-server/src/metaclient-protocol.h
        (gzochid_metaclient_client_protocol): Add `extern'.
      * gzochi-server/src/metaserver-protocol.h
        (gzochi_metad_metaserver_server_protocol,
        gzochi_metad_metaserver_client_protocol): Add `extern'.
      * gzochi-server/src/sessionclient-protocol.h
        (gzochid_sessionclient_client_protocol): Add `extern'.
      * gzochi-server/src/taskclient-protocol.h
        (gzochid_taskclient_client_protocol): Add `extern'.
      0bac5fca
    • Julian Graham's avatar
      Properly mark Mazewar static data symbols as `extern' in header files · 26fa45d6
      Julian Graham authored
      * examples/mazewar/client/src/data/avatars.h (mazewar_avatar_bits): Add
        `extern'.
      * examples/mazewar/client/src/data/font.h (mazewar_font_8x13_bytes): Add
        `extern'.
      * examples/mazewar/client/src/data/views.h (mazewar_view_edges): Add
        `extern'.
      26fa45d6
    • Julian Graham's avatar
      Initialize the Mazewar view context to make the compiler happy · c5b91333
      Julian Graham authored
      * examples/mazewar/client/src/display.c (mazewar_display_draw_view):
        Explicitly `memset' the view context to zero before use.
      c5b91333
    • Julian Graham's avatar
      Work around backwards-incompatible type change in libmicrohttpd 0.9.71 · 03ba4bed
      Julian Graham authored
      This patch defines `mhd_result' as either an `int' (in
      libmicrohttpd < 0.9.71) or `enum MHD_Result' (in libmicrohttpd >= 0.9.71).
      
      * gzochi-server/src/httpd.c (not_found404, not_found404_default,
        dispatch): Return `mhd_result'.
      * gzochi-server/src/httpd.h (mhd_result): New typedef.
      03ba4bed
    • Julian Graham's avatar
      Adjustments to CI configuration for successful buidls against Guile 3.0 · afffe5b8
      Julian Graham authored
      Unfortunately, GLib 2.x's API changes quickly and in incompatible ways. For
      example, the version that's in Debian stable is not compatible with the one
      in the latest Ubuntu LTS release. So one of the things this patch does is
      bump the CI build environment to use testing instead of stable.
      
      * .gitlab-ci.yml: Remove Guile 2.0-specific environment variables.
      * contrib/Dockerfile: Inherit from testing-slim instead of stable-slim.
        Install Guile 3.x.
      afffe5b8
  7. 03 Oct, 2020 10 commits
    • Julian Graham's avatar
      Remove stray SCM_DEFINE calls that are no longer necessary for snarfing · 4abef666
      Julian Graham authored
      * gzochi-server/src/api/tx.c (primitive_join_transaction,
        primitive_abort_transaction): Remove `SCM_DEFINE' macros.
      4abef666
    • Julian Graham's avatar
      Add support for building against Guile 3.x · 69500e36
      Julian Graham authored
      * gzochi-guile-client/configure.ac, gzochi-server/configure.ac
        (GUILE_PKG): Add 3.0 to list of usable Guile versions.
      69500e36
    • Julian Graham's avatar
      Update GLib version requirement to 2.61.x · 91e533e7
      Julian Graham authored
      * gzochi-server/README (Required External Packages): 2.54 -> 2.61
      91e533e7
    • Julian Graham's avatar
      Use `GDateTime' instead of `GTimeVal' for GLib 2.61.x compatibility · 2858afc6
      Julian Graham authored
      * gzochi-server/src/httpd-meta.c (gzochi_metad_client_info_new,
        handle_client_event): Use `GDateTime' instead of `GTimeVal'.
      2858afc6
    • Julian Graham's avatar
      Add compatibility hack for Guile 3.x record constructor protocol changes · 14758ef9
      Julian Graham authored
      Guile 3.x "unified" the R6RS records system with Guile's native records.
      Among other things, this incomaptibly changes the constructor delegation
      protocol such that the protocol argument may sometimes be a constructor and
      not a superconstructor.
      
      * gzochi-server/src/scheme/gzochi/private/data.scm
        (gzochi:deserialize-managed-record): Detect Guile 3.x and switch
        superconstructor delegation behavior accordingly.
      14758ef9
    • Julian Graham's avatar
      Fix unnecessary arguments to `gzochi:make-managed-reference' · cd980a05
      Julian Graham authored
      * gzochi-server/src/scheme/gzochi/private/data.scm
        (gzochi:deserialize-managed-reference): Remove `#f'.
      cd980a05
    • Julian Graham's avatar
      Make initialization of primitive hook functions more explicit · 8910a586
      Julian Graham authored
      One of the optimizations in Guile 3.x looks for mutations to module-local
      variables, and if it doesn't find any, may allocate them on the stack,
      effectively making them non-volatile. This means that reaching into a
      module's private interface from outside the compilation unit can lead to
      unpredictable results. To work around this, turn the primitive hook symbols
      in the Scheme API into first-class variables and expose setters for them as
      part of the public interface for the private modules. Call these setters
      from the C initialization functions for the Scheme API.
      
      * gzochi-server/src/api/Makefile.am: Remove snarfing configuration, which
        is no longer necessary.
      * gzochi-server/src/api/admin.c (primitive_applications,
        primitive_current_application, primitive_with_application): Remove
        snarfing macros.
        (gzochid_api_admin_init): Invoke the setter functions for primitive hook
        variables.
      * gzochi-server/src/api/channel.c (primitive_create_channel,
        primitive_get_channel, primitive_join_channel, primitive_leave_channel,
        primitive_send_channel_message, primitive_close_channel): Remove snarfing
        macros.
        (gzochid_api_channel_init): Invoke the setter functions for primitive
        hook variables.
      * gzochi-server/src/api/data.c (primitive_create_reference,
        primitive_dereference, primitive_get_binding, primitive_set_binding_x,
        primitive_remove_binding_x, primitive_remove_object_x,
        primitive_mark_for_write_x): Remove snarfing macros.
        (gzochid_api_data_init): Invoke the setter functions for primitive hook
        variables.
      * gzochi-server/src/api/log.c (primitive_log_internal, primitive_log):
        Remove snarfing macros.
        (gzochid_api_log_init): Invoke the setter functions for primitive hook
        variables.
      * gzochi-server/src/api/session.c (primitive_send_message,
        primitive_disconnect): Remove snarfing macros.
        (gzochid_api_session_init): Invoke the setter functions for primitive
        hook variables.
      * gzochi-server/src/api/task.c (primitive_schedule_task,
        primitive_cancel_task): Remove snarfing macros.
        (gzochid_api_task_init): Invoke the setter functions for primitive hook
        variables.
      * gzochi-server/src/api/tx.c (primitive_join_transaction,
        primitive_abort_transaction): Invoke the setter functions for primitive
        hook variables.
      * gzochi-server/src/gzochi-migrate.c (enqueue_oids,
        initialize_scheme_bindings): Invoke the setter function for primitive
        `enqueue-oids!' hook variable.
      * gzochi-server/src/scheme/gzochi/admin.scm
        (gzochi:set-primitive-applications!,
        gzochi:set-primitive-current-application!,
        gzochi:set-primitive-with-application!): New procedures.
        (primitive-applications, primitive-current-application,
        primitive-with-application): Convert to variable.
        (gzochi:current-application, gzochi:with-application): Dereference
        variable.
      * gzochi-server/src/scheme/gzochi/private/channel.scm
        (gzochi:set-primitive-create-channel!,
        gzochi:set-primitive-get-channel!, gzochi:set-primitive-join-channel!,
        gzochi:set-primitive-leave-channel!,
        gzochi:set-primitive-send-channel-message!,
        gzochi:set-primitive-close-channel!): New procedures.
        (primitive-create-channel, primitive-get-channel, primitive-join-channel,
        primitive-leave-channel, primitive-send-channel-message,
        primitive-close-channel): Convert to variable.
        (gzochi:create-channel, gzochi:get-channel, gzochi:join-channel,
        gzochi:leave-channel, gzochi:send-channel-message,
        gzochi:close-channel): Dereference variable.
      * gzochi-server/src/scheme/gzochi/private/data.scm
        (gzochi:set-primitive-mark-for-write!,
        gzochi:set-primitive-create-reference!,
        gzochi:set-primitive-dereference!, gzochi:set-primitive-get-binding!,
        gzochi:set-primitive-set-binding!, gzochi:set-primitive-remove-binding!,
        gzochi:set-primitive-remove-object!): New procedures.
        (primitive-create-reference, primitive-dereference,
        primitive-get-binding, primitive-set-binding! primitive-remove-binding!,
        primitive-remove-object!): Convert to variables.
        (gzochi:mark-for-write!, gzochi:create-reference, gzochi:dereference,
        gzochi:get-binding, gzochi:set-binding!, gzochi:remove-binding!,
        gzochi:remove-object!): Dereference variable.
      * gzochi-server/src/scheme/gzochi/private/data/migration.scm
        (gzochi:set-primitive-enqueue-oids!): New procedure.
        (enqueue-oids!, primitive-enqueue-oids!): Rename, convert to variable.
        (gzochi:visit-object): Dereference variable.
      * gzochi-server/src/scheme/gzochi/private/log.scm
        (gzochi:set-primitive-log!, gzochi:set-primitive-log-internal!): New
        procedures.
        (primitive-log, primitive-log-internal): Convert to variables.
        (gzochi:log, gzochi:log-internal): Dereference variable.
      * gzochi-server/src/scheme/gzochi/private/session.scm
        (gzochi:set-primitive-send-message!, gzochi:set-primitive-disconnect!):
        New procedures.
        (primitive-send-message, primitive-disconnect): Convert to variables.
        (gzochi:send-message, gzochi:disconnect): Dereference variable.
      * gzochi-server/src/scheme/gzochi/private/task.scm
        (gzochi:set-primitive-schedule-task!,
        gzochi:set-primitive-cancel-task!): New procedures.
        (primitive-cancel-task, primitive-schedule-task): Convert to variables.
        (gzochi:cancel-task, gzochi:schedule-task): Dereference variable.
      * gzochi-server/src/scheme/gzochi/tx.scm
        (gzochi:set-primitive-join-transaction!,
        gzochi:set-primitive-abort-transaction!): New procedures.
        (primitive-join-transaction, primitive-abort-transaction): Convert to
        variables.
        (gzochi:join-transaction, gzochi:abort-transaction): Dereference
        variable.
      * gzochi-server/tests/scheme/gzochi/mock-data.scm (initialize-mock-data):
        Use new primitive hook variable setters.
      * gzochi-server/tests/scheme/gzochi/test-tx.scm: Use new primitive hook
        variable setters.
      8910a586
    • Julian Graham's avatar
      Don't import `make-mutex' from `(guile)' · 7225d668
      Julian Graham authored
      Its proper home is `(ice-9 threads)'. Importing from `(guile)' was
      deprecated in the 2.2 series and unsupported from 3.0 on.
      
      * gzochi-guile-client/src/gzochi/main-loop.scm: Remove `make-mutex' from
        the import list for `(guile)'.
      7225d668
    • Julian Graham's avatar
      Unpack values from scm_open_bytevector_output_port using values API · 99b426c9
      Julian Graham authored
      * gzochi-server/src/scheme.c (scheme_managed_record_serializer): Use
        `scm_c_value_ref' instead of `scm_struct_ref' and `car' and `cadr'.
      99b426c9
    • Julian Graham's avatar
      Explicitly set `NULL' / binary encoding in dataserver / metaserver tests · 9deb5674
      Julian Graham authored
      * gzochi-server/tests/test-dataserver-protocol.c
        (dataserver_protocol_fixture_set_up): Use `g_io_channel_set_encoding' to
        set the `NULL' encoding on the read channel.
      * gzochi-server/tests/test-metaserver-protocol.c
        (metaserver_protocol_fixture_set_up): Use `g_io_channel_set_encoding' to
        set the `NULL' encoding on the read channel.
      9deb5674
  8. 19 Jun, 2020 1 commit
  9. 10 Nov, 2019 8 commits
    • Julian Graham's avatar
      task #15237: gzochid and gzochi-metad should respect SIGTERM · d257fb8d
      Julian Graham authored
      * gzochi-server/src/gzochi-metad.c (sigterm_handler,
        initialize_signal_handlers): New functions.
        (main): Call `initialize_signal_handlers'.
      * gzochi-server/src/gzochid.c (sigterm_handler,
        initialize_signal_handlers): New functions.
        (main): Call `initialize_signal_handlers'.
      d257fb8d
    • Julian Graham's avatar
      Remove unused, defunct files · 0da837a6
      Julian Graham authored
      * gzochi-server/src/admin.c, admin.h, context.c, context.h, fsm.c, fsm.h,
        tests/test-fsm.c: Removed files.
      * gzochi-server/src/Makefile.am (noinst_HEADERS): Remove references to
        admin.h, context.h, and fsm.h.
        (libgzochid_la_SOURCES): Remove references to admin.c, context.c, and
        fsm.c.
      * gzochi-server/src/app-task.c, tests/api/test-tx.c, tests/test-socket.c:
        Remove references to context.h.
      * gzochi-server/tests/Makefile.am (test_programs): Remove `test-fsm'.
        (test_fsm_CFLAGS, test_fsm_SOURCES, test_fsm_LDADD): Remove declarations.
      0da837a6
    • Julian Graham's avatar
      Improve reference, memory hygiene in gzochid / gzochi-metad root contexts · bf401c74
      Julian Graham authored
      * gzochi-server/src/gzochi-metad.c (root_context_dispose): Release
        references to root context properties.
        (initialize_httpd): Pass through the opaque pointer from handler
        registration.
        (main): Unref locally-allocated objects. Shut down servers on main loop
        exit and free the HTTP state pointer.
      * gzochi-server/src/gzochid.c, gzochid.h (GzochidRootContext): Add
        first-class references to HTTP and debug servers. Remove legacy
        `gzochid_context' object.
        (root_context_dispose, initialize_httpd, initialize_debugging,
        initialize_game_server, initialize_metaclient): New functions.
        (root_context_set_property, gzochid_root_context_class_init): Update to
        include new properties.
        (gzochid_root_context_init): Remove reference to admin context.
        (initialize_guile): Remove function.
        (main): Unref locally-allocated objects. Push initialization of various
        components to new initialization functions. Shut down servers on main
        loop exit and free the HTTP state pointer.
      bf401c74
    • Julian Graham's avatar
      Shut down the application store during application context finalization · 048a33a4
      Julian Graham authored
      * gzochi-server/src/app.c (gzochid_application_context_finalize): Call
        `gzochid_application_store_close'.
      048a33a4
    • Julian Graham's avatar
      Convert the debug server into a `GObject' for easier lifecycle management · 5f7a0dd7
      Julian Graham authored
      * gzochi-server/src/debug.c, debug.h: Add `GObject' boilerplate; remove
        old `gzochid_context' boilerplate.
        (gzochid_debug_server_start, gozchid_debug_server_stop): New functions.
      5f7a0dd7
    • Julian Graham's avatar
      Enhancements to gzochi debug REPL server · 32936858
      Julian Graham authored
      This patch incorporates some improvements made to the Guile version of the
      REPL server after the original copy-and-paste. It also replaces the
      deprecated `inet-aton' with `inet-pton' and adds an explicit shutdown
      function.
      
      * gzochi-server/src/scheme/gzochi/private/debug.scm: Port enhancements from
        Guile REPL server.
        (gzochi:stop-repl-server): New function.
      32936858
    • Julian Graham's avatar
      Make it possible to free HTTP server state resources during shutdown · a28d67d8
      Julian Graham authored
      Handler registration requires some memory to be allocated on the heap. This
      patch adds some "unregister" functions to make it possible to release that
      memory.
      
      * gzochi-server/src/httpd-app.c (gzochid_server_state_free): New function.
      * gzochi-server/src/httpd-app.c, httpd-app.h
        (gzochid_httpd_app_register_handlers): Return an opaque pointer.
        (gzochid_httpd_app_unregister_handlers): New function.
      * gzochi-server/src/httpd-meta.c (gzochi_metad_server_state_free): New
        function.
      * gzochi-server/src/httpd-meta.c, httpd-meta.h
        (gzochid_httpd_meta_register_handlers): Return an opaque pointer.
        (gzochid_httpd_meta_unregister_handlers): New function.
      a28d67d8
    • Julian Graham's avatar
      Always free the storage engine struct on dataserver shutdown · 4d6c76a8
      Julian Graham authored
      * gzochi-server/src/dataserver.c (gzochi_metad_data_server_finalize):
        Remove conditional check on handle pointer.
      * gzochi-server/src/dataserver.h (gzochi_metad_dataserver_stop): Remove
        dangling function prototype.
      4d6c76a8
  10. 03 Nov, 2019 2 commits