Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-2201

Remove the type_registered global flag in router_node.c

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.16.1
    • 1.17.0
    • None
    • None
    • Patch

    Description

      This type_registered flag is of no benefit for Dispatch as it is now, and it hinders doing repeated broker startups and shutdowns in a single thread (for testing purposes).

      static int type_registered = 0;
      
      qd_router_t *qd_router(qd_dispatch_t *qd, qd_router_mode_t mode, const char *area, const char *id)
      {
          if (!type_registered) {
              type_registered = 1;
              qd_container_register_node_type(qd, &router_node);
          }
      

      https://github.com/apache/qpid-dispatch/blob/d8800269d3a80225794be9914b5fc9f8d6118d04/src/router_node.c#L1623-L1630

      As per the mailing list discussion http://mail-archives.apache.org/mod_mbox/qpid-users/202107.mbox/browser, this code can be safely removed.

      Attachments

        Activity

          People

            jdanek Jiri Daněk
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: