[OpenSIPS-Devel] [OpenSIPS/opensips] ef82ca: Fix codec handling functions when faulty streams a...

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jan 26 12:14:08 CET 2016


  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ef82ca2368462c41f7115202e90f73d8ab16fd1f
      https://github.com/OpenSIPS/opensips/commit/ef82ca2368462c41f7115202e90f73d8ab16fd1f
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M modules/sipmsgops/codecs.c

  Log Message:
  -----------
  Fix codec handling functions when faulty streams are defined.

Bogus test on the return code of stream_process() (using bitwise OR for -1, 0 and 1 values :O ), leads to a generic failure to find any codec in any stream if there is an invalid stream in the SDP.
For example, if a video stream is defined but with no codecs, stream_process() will return -1 for it (as it is a bogus stream). While iterating through all the stream (including the valid audio stream), the -1 ret code will discard any 1 future ret code due the bogus bitwise OR.




More information about the Devel mailing list