[asterisk-bugs] [Asterisk 0014789]: [patch] add possibility to read

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Mar 30 14:38:32 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14789 
====================================================================== 
Reported By:                junky
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14789
Category:                   Functions/func_volume
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 184986 
Request Review:              
====================================================================== 
Date Submitted:             2009-03-30 14:18 CDT
Last Modified:              2009-03-30 14:38 CDT
====================================================================== 
Summary:                    [patch] add possibility to read
Description: 
Currently, with VOLUME() with can only set values with that function.

In some cases, it could be useful to read the existing value.

====================================================================== 

---------------------------------------------------------------------- 
 (0102421) mmichelson (administrator) - 2009-03-30 14:38
 http://bugs.digium.com/view.php?id=14789#c102421 
---------------------------------------------------------------------- 
Good idea, JunK-Y. There are some issues with your patch though.

1. This will not compile in dev mode because you have mixed declarations
with the rest of the code. If you move the *buf = '\0'; line to after the
declarations, this warning will go away.

2. Always make sure to lock the channel when performing datastore
operations.

3. The portion of code which handles if the datastore cannot be found is
incomplete. You create the datastore and the volume_information struct;
however, you never attach the datastore to the channel, nor do you set the
datastore's data field to point to the newly created volume_information
struct.

4. The last item is a minor coding guidelines violation. For one-line if
statements, you should use curly braces. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-30 14:38 mmichelson     Note Added: 0102421                          
======================================================================




More information about the asterisk-bugs mailing list