[sr-dev] [tracker] Comment added: bugs in uac_redirect module (Attachment added)

sip-router bugtracker at sip-router.org
Thu Jul 25 17:14:39 CEST 2013


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#327 - bugs in uac_redirect module
User who did this - Federico Cabiddu (lester)

----------
Hi Daniel,
this part is a workaround for when acc_db_set_table_name is called with tables which have different name length.
The db_table_name_buf is static and it's copied (as a pointer) into acc_env.text which is then used to call use_table.
In my case I am using db_flatstore so it's flat_use_table which is being called.
I have db accounting enabled for calls and for missed calls, and I have as table names "completed_calls" and "acc" (default one for uac_redirect).
When get_redirects is called for the first time the db accounting is called with "acc" as table name, db_table_name_buf contains "acc", the id for the pool is created with this table name and everything is fine.
Then once the call is answered the db accounting is called again, this time with "completed_calls" as table name, db_table_name_buf contains the good value but, at the same time the previous id contains the new table value.
Now at the next redirection, even if the table name is "acc" db_table_name_buf contains "accleted_calls" and all the id created using db_table_name_buf are changed and, due to the way the ids are created and compared, the CDRs is written in the "completed_calls" file.
So, putting '\0' at the end of the buffer helps at least to have the correct table name and to write to the correct file.
It's a rough solution. 
Maybe the static db_table_name_buf can be avoided, as shown in the new attached patch.

Best regards,

Federico Cabiddu
----------

One or more files have been attached.

More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=327#comment1029

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list