[asterisk-dev] [svn-commits] tilghman: branch tilghman/adaptive_realtime r115575 - in /team/tilghman/adapt...
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri May 9 01:36:00 CDT 2008
On Friday 09 May 2008 00:54:59 Michiel van Baak wrote:
> On 03:10, Fri 09 May 08, SVN commits to the Digium repositories wrote:
> > Author: tilghman
> > Date: Thu May 8 22:10:08 2008
> > New Revision: 115575
> >
> > URL: http://svn.digium.com/view/asterisk?view=rev&rev=115575
> > Log:
> > Add checks to existing realtime updates
> >
> > Modified: team/tilghman/adaptive_realtime/apps/app_voicemail.c
> > URL:
> > http://svn.digium.com/view/asterisk/team/tilghman/adaptive_realtime/apps/
> >app_voicemail.c?view=diff&rev=115575&r1=115574&r2=115575
> > =========================================================================
> >===== --- team/tilghman/adaptive_realtime/apps/app_voicemail.c (original)
> > +++ team/tilghman/adaptive_realtime/apps/app_voicemail.c Thu May 8
> > 22:10:08 2008 @@ -836,6 +836,9 @@
> > {
> > int res;
> > if (!ast_strlen_zero(vmu->uniqueid)) {
> > + if (strlen(password) > 10) {
> > + ast_realtime_require_field("voicemail", "password", RQ_CHAR,
> > strlen(password), NULL); + }
>
> You only check for the password field in realtime if the password is
> longer then 10 characters ? Why not check it every time?
Because the generic check at load time is for a password field of 10
characters already. Therefore, we only do another check, if the password
being added is longer than 10 characters, to ensure it doesn't get truncated
in the database (or not updated at all, on most databases).
A lot of the fields are basically guesses at how long they should be, until we
know (and then we can be more specific as to how large the column must be).
--
Tilghman
More information about the asterisk-dev
mailing list