Summary: | ASTERISK-04085: [patch] More proper locking, formatting fixes, etc. - C part only | ||
Reporter: | Paul Cadach (pcadach) | Labels: | |
Date Opened: | 2005-05-05 16:34:36 | Date Closed: | 2008-01-15 15:34:02.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) ast-h323-lock.diff ( 1) ast-h323-lock-review.diff | |
Description: | This patch mostly intended to provide more proper locking mechanism for internal channel's structure returned by find_call() function. Existing scheme have possibility to allow structure modifications (including free()ing) between find_call() and individual lock within procedure/function uses find_call(). ****** ADDITIONAL INFORMATION ****** Also: 1) this patch provides some formatting fixes (to be compliant with Asterisk's coding/formatting guidelines), and names references to internal channel's structure as pvt instead of mix pvt and p. 2) For outgoing calls, it adds unique tag after host name to distinguish simultaneous calls to the same host (gateway, for example). 3) Removes assignments to pvt->options.port which isn't used. 4) Eliminates unneeded hidden structure copying when passing structure as argument, not structure pointer/reference (find_user(), other needs changes in C++ part too). 5) Removes unneeded assignments to private structure pointers in function variable declarations. 6) Eliminates usage of pointer to call options in setup_incoming_call(), all parameters stored within private structure only, no references to system-specific options (like user, peer, etc.). 7) Functions needs to be called with locked private structure renamed to have leading '__' to simplify code verifications. | ||
Comments: | By: Paul Cadach (pcadach) 2005-05-05 16:38:08 ast-h323-lock.diff is the patch. ast-h323-lock-review.diff is the same as ast-h323-lock.diff but generated by cvs diff -b -B command to eliminate formatting updates and simplify review of patch. By: Paul Cadach (pcadach) 2005-05-05 16:40:02 More H.323 updates depends on this patch is pending. By: Paul Cadach (pcadach) 2005-05-06 03:27:07 Of course, disclaimer is on file. By: jerjer (jerjer) 2005-05-11 09:22:05 commited to cvs -head By: jerjer (jerjer) 2005-05-11 09:22:17 not in -stable By: Digium Subversion (svnbot) 2008-01-15 15:34:01.000-0600 Repository: asterisk Revision: 5628 U trunk/channels/chan_h323.c ------------------------------------------------------------------------ r5628 | jeremy | 2008-01-15 15:34:01 -0600 (Tue, 15 Jan 2008) | 2 lines Formatting fixes, proper locking and to shut bkw up. Bug ASTERISK-4085 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5628 By: Digium Subversion (svnbot) 2008-01-15 15:34:02.000-0600 Repository: asterisk Revision: 5629 U trunk/channels/h323/ast_h323.cpp ------------------------------------------------------------------------ r5629 | jeremy | 2008-01-15 15:34:02 -0600 (Tue, 15 Jan 2008) | 2 lines C++ formatting fixes, Log PWLib assertions, remove uncessary locking and to shut bkw up. Bug ASTERISK-4085 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=5629 |