I'm all in favour of simplifying and clarifying, even when it means
some work is required on existing code. But in the case of filter
proc arg ordering there doesn't seem to be a clean way to write code
that will work on both AOLserver and NaviServer if the args are
reversed. Unless someone has any ideas..?
There are a few people now who've expressed interest in running
OpenACS on NaviServer and I wouldn't want to break things
gratuitously. The more people testing the code the better!
On 12/29/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> Between three of us do we have a lot of code that uses filter with
> aolserver's style of argument ordering?
> If none, then i do not see why we cannot change it. Compatibility with
> weird aolserver things never been our primary goal:-))
>
> At least it will be one less confusing places in the code and API.
>
> Stephen Deasey wrote:
> > I added the comment because the argument order is confusing. We could
> > change the order, but it not be compatible with AOLserver. Do large
> > bodies of code such as OpenACS use filter args? I think they do...
> >
> >
> > Something we could change is registered procs. Currently, an extra
> > args is always passed to the registered proc (a blank string if you
> > don't specify anything else). Dropping this would be cleaner. This
> > is an incompatible change, but it's easy to write code that works on
> > both AOLserver and NaviServer using defaults:
> >
> > proc my_registered_proc {{context default}} { ... }
> > ns_register_proc GET /* my_registered_proc
> > ns_register_proc GET /* my_registered_proc my_context
> >
> > What do you think?
> >
> >
> > On 12/29/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> >
> >>It still has this comment, so we can get rid of that comment and fix the
> >>order at the same time:-))
> >>
> >>/*
> >> * This really should be: cmd why ?arg?, but why and arg
> >> * are reversed for backwards compatibility.
> >> */
> >>
> >>
> >>Stephen Deasey wrote:
> >>
> >>>Fixed in CVS a couple of days ago. My fault, I missread the original
> >>>code and thought that like registered procs, if you didn't explicitly
> >>>pass an arg a blank string was passed. Should work now.
> >>>
> >>>
> >>>
> >>>
> >>>On 12/29/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>>It is in
> >>>>
> >>>>int NsTclFilterProc(void *arg, Ns_Conn *conn, int why)
> >>>>
> >>>>why arg is added after script args
> >>>>
> >>>>We can change it easily to always specify why first
> >>>>
> >>>>
> >>>>Zoran Vasiljevic wrote:
> >>>>
> >>>>
> >>>>>Am 29.12.2005 um 20:54 schrieb Vlad Seryakov:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>ns_register_filter trace GET * myfilter
> >>>>>>>>
> >>>>>>>>calls now "myfilter {} WHY"
> >>>>>
> >>>>>
> >>>>>But *why* is this so? IOW, what is this empty argument
> >>>>>passed to the myfilter? Is this something we overlooked
> >>>>>or is it something done on purpose, or what?
> >>>>>
> >>>>>I mean, maybe somebody has the answer out of the sleeve
> >>>>>and if not, I will have to dig into that...
> >>>>>
> >>>>>Cheers
> >>>>>Zoran
> >>>>>
> >>>>>
> >>>>>-------------------------------------------------------
> >>>>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> >>>>>files
> >>>>>for problems? Stop! Download the new AJAX search engine that makes
> >>>>>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> >>>>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >>>>>_______________________________________________
> >>>>>naviserver-devel mailing list
> >>>>>[email protected]
> >>>>>https://lists.sourceforge.net/lists/listinfo/naviserver-devel
> >>>>>
> >>>>
> >>>>--
> >>>>Vlad Seryakov
> >>>>571 262-8608 office
> >>>>[EMAIL PROTECTED]
> >>>>http://www.crystalballinc.com/vlad/
> >>>>
> >>>>
> >>>>
> >>>>-------------------------------------------------------
> >>>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> >>>>files
> >>>>for problems? Stop! Download the new AJAX search engine that makes
> >>>>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> >>>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >>>>_______________________________________________
> >>>>naviserver-devel mailing list
> >>>>[email protected]
> >>>>https://lists.sourceforge.net/lists/listinfo/naviserver-devel
> >>>>
> >>>
> >>>
> >>>
> >>>-------------------------------------------------------
> >>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> >>>files
> >>>for problems? Stop! Download the new AJAX search engine that makes
> >>>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> >>>http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> >>>_______________________________________________
> >>>naviserver-devel mailing list
> >>>[email protected]
> >>>https://lists.sourceforge.net/lists/listinfo/naviserver-devel
> >>>
> >>
> >>--
> >>Vlad Seryakov
> >>571 262-8608 office
> >>[EMAIL PROTECTED]
> >>http://www.crystalballinc.com/vlad/
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> >>for problems? Stop! Download the new AJAX search engine that makes
> >>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> >>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >>_______________________________________________
> >>naviserver-devel mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/naviserver-devel
> >>
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> > _______________________________________________
> > naviserver-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/naviserver-devel
> >
>
> --
> Vlad Seryakov
> 571 262-8608 office
> [EMAIL PROTECTED]
> http://www.crystalballinc.com/vlad/
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> naviserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel
>