Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.0
    • Target Release Version/s: 1.8.18.0, 10.10.0
    • Component/s: Channels/chan_iax2
    • Security Level: None
    • Labels:
      None
    • Environment:
      All. (running on Mac OSX 10.4.11 Power PC)
    • Frequency of Occurrence:
      Constant
    • SVN Revision Number:
      371822 (branch 10 head)
    • Regression:
      Yes

      Description

      On load, iax2-provision.c routine iax_provision_reload deletes the iax/provisioning/cache tree. This is good.

      Later, when routine iax_provision_version attempts to retrieve the cache entry, the call to ast_db_get is not handled correctly. ast_db_get returns 0 on success and -1 on failure. The existing code treats success as failure and vice versa. As a result, the first call fails, and is treated as success. The subsequent version check fails, and the cache entry is created. From now on, each call to ast_db_get succeeds and returns 0 which is treated as a failure and reported.

      With the attached patch, the test on the call to ast_db_get is properly handled. However, since there will always be a failure after reload, the unlock and return must not be done. Instead, we simply report the error the first time (a correct report, since the cache retrieval did not happen) and go on and build the entry.

        Activity

        Hide
        Jonathan Rose added a comment -

        Sorry about that one. This was my fault and it was introduced in a patch where we were trying to fix a multitude of reports by some static code analysis.

        Thanks for fixing this bug, I'm going to go ahead and commit this now.

        Show
        Jonathan Rose added a comment - Sorry about that one. This was my fault and it was introduced in a patch where we were trying to fix a multitude of reports by some static code analysis. Thanks for fixing this bug, I'm going to go ahead and commit this now.

          People

          • Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development