[Home]

Summary:ASTERISK-03779: [patch] use of parsing api for app_skel and more
Reporter:mochouinard (mochouinard)Labels:
Date Opened:2005-03-26 15:51:12.000-0600Date Closed:2008-01-15 15:28:55.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_skel.c-diff_rev1.txt
Description:This is just to update the app_skel with some basic stuff that should be use with all the new applications.

****** ADDITIONAL INFORMATION ******

Disclamed
Comments:By: Michael Jerris (mikej) 2005-03-26 17:01:17.000-0600

We are still missing some important things from options parsing as discussed in 3357.  Do we want to bring that back?

By: Mark Spencer (markster) 2005-03-26 18:33:48.000-0600

Nice, but not quite right...  The third argument should be an index into argv[] but that index should only be the count of named arguments.

By: Mark Spencer (markster) 2005-03-26 18:42:16.000-0600

(in other words, they should be "1" and "2" and argv[] need only be declare with size 2)

By: mochouinard (mochouinard) 2005-03-26 21:17:19.000-0600

yes, but it was like that in chanspy, so i didnt know if it had a purpuse.

also im surprise you didnt see the huge ammount of memory taken by the char *opts[OPTION_NULL] for nothing mark ;)
the option api was badly designed from the start, Ive put it the way it should be, but i know there is memory issues with that, so al add a ast_function to capture the argument or something.

Im open for sugestions

By: Mark Spencer (markster) 2005-03-27 16:36:50.000-0600

Just because you don't understand how to use it doesn't mean it's badly designed.  I'm not trying to defend the options API as is, and I'm certainly open to suggestions on the options API, but if you don't like it, I suggest you propose a more efficient alternative rather than just complain about what's there now.

I've fixed app_skel to *properly* demonstrate the options api in its current implementation (fixing a bug in the implementation in the process) and invite you to contribute any code / suggestions for improving it.

By: Digium Subversion (svnbot) 2008-01-15 15:28:55.000-0600

Repository: asterisk
Revision: 5277

U   trunk/app.c
U   trunk/apps/Makefile
U   trunk/apps/app_skel.c

------------------------------------------------------------------------
r5277 | markster | 2008-01-15 15:28:55 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix app bug, update skel example, add skel to makefile as option (bug ASTERISK-3779)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5277