Re: [naviserver-devel] spooler not working on linux

2009-11-21 Thread Vlad Seryakov
I am using it on 32 and 64 bit with default configure, so it is 
something different.

First, enable debug

ns_section ns/parameters
ns_param logdebug true

ns_section ns/server/server/module/nssock
ns_param readahead 1024
ns_param maxupload 1024


maxupload and readahead are used for uploads and readahead is the limit 
when to use spooler, maxupload is used to decide what temp file to use, 
by default temp file which is deleted is used, just for mmap, if length 
  maxupload, then regular temp file with name.

Try with it, also debugging would be good to enable but i forgot how to 
enable driver debug, now it uses special severity and i am not sure it 
works via config file. It's beed a while since i used it.

John Buckman wrote:
 I put naviserver into production today, and found that the spooler wouldn't 
 work for me, on my production linux (32bit) machine.  However, the same 
 config file works perfectly under OSX.  All spooler-enabled uploads get an 
 immediate The connection was reset error in Firefox.
 
 My config has:
  ns_param maxinput   30
  ns_param maxupload  1024
  ns_param spoolerthreads  1
 
 and nsd reports:
 [21/Nov/2009:17:42:35][18975.1065a6000][-spooler0-] Notice: spooler0: 
 accepting connections
 
 
 -- Any ideas on how to go about debugging the problem?
 
 -john
 
 ps:
 Changing maxupload to a large value makes uploads work the old (memory 
 hogging) way.
 
 Perhaps the problem is how I built my naviserver on linux?  I simply ran 
 autogen.sh from the cvs tree, and I also tried it with
 ./autogen.sh --enable-threads --enable-symbols  --with-tcl=/usr/local/lib
 
 
 
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
v...@crystalballinc.com
http://www.crystalballinc.com/vlad/

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] spooler not working on linux

2009-11-21 Thread Vlad Seryakov
Once the server started, connect to nscp console and issue

ns_logctl severity Debug(ns:driver) true

now in the nsd.log there must be a lot of driver and spooler related 
messages


Vlad Seryakov wrote:
 I am using it on 32 and 64 bit with default configure, so it is 
 something different.
 
 First, enable debug
 
 ns_section ns/parameters
 ns_param logdebug true
 
 ns_section ns/server/server/module/nssock
 ns_param readahead 1024
 ns_param maxupload 1024
 
 
 maxupload and readahead are used for uploads and readahead is the limit 
 when to use spooler, maxupload is used to decide what temp file to use, 
 by default temp file which is deleted is used, just for mmap, if length 
   maxupload, then regular temp file with name.
 
 Try with it, also debugging would be good to enable but i forgot how to 
 enable driver debug, now it uses special severity and i am not sure it 
 works via config file. It's beed a while since i used it.
 
 John Buckman wrote:
 I put naviserver into production today, and found that the spooler 
 wouldn't work for me, on my production linux (32bit) machine.  
 However, the same config file works perfectly under OSX.  All 
 spooler-enabled uploads get an immediate The connection was reset 
 error in Firefox.

 My config has:
  ns_param maxinput   30
  ns_param maxupload  1024
  ns_param spoolerthreads  1

 and nsd reports:
 [21/Nov/2009:17:42:35][18975.1065a6000][-spooler0-] Notice: spooler0: 
 accepting connections


 -- Any ideas on how to go about debugging the problem?

 -john

 ps:
 Changing maxupload to a large value makes uploads work the old 
 (memory hogging) way.

 Perhaps the problem is how I built my naviserver on linux?  I simply 
 ran autogen.sh from the cvs tree, and I also tried it with
 ./autogen.sh --enable-threads --enable-symbols  --with-tcl=/usr/local/lib



 --
  

 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
 30-Day trial. Simplify your report design, integration and deployment 
 - and focus on what you do best, core application coding. Discover 
 what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

 

-- 
Vlad Seryakov
v...@crystalballinc.com
http://www.crystalballinc.com/vlad/

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] large memory usage when uploading

2009-11-19 Thread Vlad Seryakov
Yes, regular form parser uses mmap, so for huge files it is not good

I use 1-2GB file pretty easily with the spooler.

In the script, just check if the file is spooled

set tmpfile [ns_conn contentfile]
if { $tmpfile !=  } {
   # Rename to keep it from being deleted on session exit
   file rename $tmpfile $tmpfile.mpg

   # Call offline parser
   set form [ns_set create]
   ns_parseformfile $tmpfile $form [ns_set iget [ns_conn headers] content-type]

}

Stephen Deasey wrote:
 On Thu, Nov 19, 2009 at 2:25 AM, John Buckman j...@magnatune.com wrote:
 I'm writing an app that accepts large file uploads, and trying to lower the 
 memory requirements.

 When I upload large files, at the point where the files are completely 
 uploaded, Naviserver consumes an equivalent amount of memory as the file 
 uploaded size, as it hands control over to my form handler. Memory is 
 released once my form handler returns.  Virtually no memory is used (thanks, 
 spooler) as the large file is being uploaded, only once the upload completes.

 I'm not sure why Naviserver needs to hold the file in memory.

 So, questions:

 a) is this by design?
 b) has anyone on this list worked on this section of code?
 c) any fixes, or should I plunge into the nsd/form.c code (is that right?) 
 to try to fix this?
 
 
 We originally talked about this way back in 2005:
 
 http://sourceforge.net/mailarchive/message.php?msg_id=37583D44-1F17-401D-8BCA-26F816831B92%40archiware.com
 
 Spooling got implemented later.
 
 What didn't didn't get implemented, and what you're tripping over, is
 the on-the-fly parsing of file-upload mime headers so that *only* the
 contents of the actual file becomes a file spooled on disk, and not
 the file topped and tailed with mime headers.  As you've discovered,
 the way the form parsing is implemented it just reads the whole thing
 back into memory anyway, negating the benefit of spooling to disk.
 
 Ideally, the spooler thread would parse the form as it is read in
 chunks from the socket, placing variables in the form structure, and
 spooling file contents to disk. If more than one file is in the form
 then multiple spool files would be used.
 
 Watch out for encoding. IIRC the way it currently works forms can be
 reparsed if the encoding changes. Perhaps everything but the file
 parts of a multipart form could be saved in a buffer..? ie. you strip
 out the large files from the input stream and leave the rest for
 normal form processing.
 
 Also watch out for which temp directory files are being spooled to. If
 it is on a separate partition then the final rename() will actually be
 a file copy.  Large files should probably be sent to a configured
 spool directory.
 
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] x86_64

2009-07-13 Thread Vlad Seryakov
Hi,

Anyone encountered something like this:

i am compiling current HEAD naviserver version on my new 64bit Archlinux

Linux video.mpower.net 2.6.29-ARCH #1 SMP PREEMPT Sat May 9 14:09:36 
CEST 2009 x86_64 Intel(R) Xeon(R) CPU X5355 @ 2.66GHz GenuineIntel GNU/Linux

All okay until i start the server, i get

[01/Jul/2009:01:07:13][10722.7fe1f388b6f0][-main-] Notice: driver: 
starting: nssock
[01/Jul/2009:01:07:13][10722.7fe1f388b6f0][-main-] Fatal: binder: 
sendmsg() failed: 'Bad file descriptor'


I have older (1 year code running without problems, i can start that 
binary, but even old code when i compile, i get this error).

Any hints?

-- 
Vlad Seryakov
v...@crystalballinc.com
http://www.crystalballinc.com/vlad/

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Is this list still alive?

2009-06-25 Thread Vlad Seryakov
Yes, well

and busy and i am not doing anything with naviserver for now


Ian Harding wrote:
 Haven't seen any messages for a while
 
 Hope everyone is well!
 
 - Ian
 
 --
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Mercurial help

2009-03-11 Thread Vlad Seryakov
yes, no history yet, i was doing baby steps

I used my bitbucket name, it is vseryakov, on SF it was taken, so SF name is 
just seryakov :-((

Stephen Deasey wrote:
 On Wed, Mar 11, 2009 at 3:10 AM, Vlad Seryakov v...@crystalballinc.com 
 wrote:
 imported all

 i skipped nsffmpeg, nsotcl, nstcp, i will not going to support themand
 they will not compile, so no point keeping broken things.

 nsocaml still may be of interest even it is not compiling as it is now.
 
 
 Hmm, they all just say 'Initial import', you didn't import the
 history. And you changed your name again, so there's about 3 'yous' on
 there now.
 
 I'll convert them -- there's only 9.
 
 --
 Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
 powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
 easily build your RIAs with Flex Builder, the Eclipse(TM)based development
 software that enables intelligent coding and step-through debugging.
 Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] commit/naviserver: Vlad Seryakov : Added call to nsproxy Tcl_FindExecutable(argv[0]); to keep Tcl 8.5 from crashing in thread related initialization.

2009-03-10 Thread Vlad Seryakov
Oops, missed it

Stephen Deasey wrote:
 On Sun, Mar 8, 2009 at 4:13 PM,  commits-nore...@bitbucket.org wrote:
 1 new changeset in naviserver:

 http://www.bitbucket.org/naviserver/naviserver/changeset/4b0584c5e64b/
 changeset:   r2184:4b0584c5e64b
 user:Vlad Seryakov
 date:2009-03-08 17:12:53
 summary: Added call to nsproxy Tcl_FindExecutable(argv[0]); to keep Tcl 
 8.5 from crashing in thread related initialization.
 
 
 Already present...
 
   
 http://bitbucket.org/naviserver/naviserver/src/4b0584c5e64b/nsproxy/nsproxylib.c#cl-432
 
 --
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Mercurial help

2009-03-10 Thread Vlad Seryakov
Stephen,

Can you describe how to import module into hg on bitbucket, it keeps saying i 
am not authorized.

Thanks

--
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Mercurial help

2009-03-10 Thread Vlad Seryakov
Oh, login as naviserver was the trick,

thank you i will import all remaining modules

Stephen Deasey wrote:
 On Tue, Mar 10, 2009 at 4:14 PM, Vlad Seryakov v...@crystalballinc.com 
 wrote:
 Stephen,

 Can you describe how to import module into hg on bitbucket, it keeps saying 
 i am not authorized.
 
 
 Log in as 'naviserver' at bitbucket.org.
 
 Got to:
 
 http://bitbucket.org/repo/create
 
 Fill out the info.  Once created, in the admin tab, on the right hand
 side under Permissions - Administrators  add verseryakov and whoever
 else you'd like.
 
 Back on your machine...
 
 You can now clone the repo from bitbucket to your machine if you like,
 and commit straight into it -- the repo url will be set correctly for
 you.
 
 As a shortcut, you can add something like this to your ~/.hgrc file:
 
 [paths]
 nsfoo = https://vserya...@bitbucket.org/naviserver/nsfoo/
 
 this allows you to refer to the repo on bitbucket as 'nsfoo' on the
 command line. So, if you've converted one of the remaining repos and
 you want to push it, without first cloning from bitbucket, you just:
 
 cd ~/nsfoo-hg
 hg outgoing nsfoo
 hg push nsfoo
 
 The 'outgoing' tells you what it would push without actually pushing.
 
 If you edit the ~/nsfo-hg/.hg/hgrc to add:
 
 [paths]
 default = http://bitbucket.org/naviserver/nsfoo
 
 you don't have to tell it where you want to push to. Just:
 
 cd ~/nsfoo-hg
 hg push
 
 
 Once it's up there, *then* you can customise the rest of the Admin
 options on bitbucket -- set up the commit emails etc. (look at
 naviserver for an example). Do this second so you don't spam the list
 with 5 years of history :-)
 
 
 I've converted some more modules.  Here's what's left to do:
 
 nsconf
 nsexpat
 #nsstats
 nssys
 nstk
 nszlib
 
 nsffmpeg
 nsfortune
 nsocaml
 nsotcl
 nssavi
 
 nsdbext
 nsdbpd
 
 
 I know you said some where perhaps obsolete now, but what they hey,
 better not to loose them.
 
 You could leave nsdbext and nsdbpd for me if you like. I was going to
 try merging in the whole aolserver history, which is a little more
 work.
 
 --
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Wiki and repository

2009-03-08 Thread Vlad Seryakov
I think i converted all SF wiki pages into Tcl wiki, so we can close SF 
wiki or make it redirect to Tcl wiki.

Second, i tried to import remaining modules from CVS, not sure or i 
forgot, i cannot create repositories in the bitbucket naviserver, i use 
hg init but it does not allow via ssh, i still cannot import my public 
key, it keeps saying it is invalid and i use openssh.
-- 
Vlad Seryakov
v...@crystalballinc.com
http://www.crystalballinc.com/vlad/

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] SLS cleanup

2009-03-05 Thread Vlad Seryakov
oops, we put it into closing list which calls release in the driver. please 
ignore

Vlad Seryakov wrote:
 Is this intentionally that NsSlsCleanup is called only in SockRelease but not 
 in SockClose. For normal connection which 
 call NsConnClose, SockRelease is not called and therefore SLS is never 
 cleanup?
 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] SLS

2009-03-02 Thread Vlad Seryakov
I am working with persistent connections right now and want to track when the 
socket is closed to cleanup some memory in 
Tcl but it looks like there is no way to call cleanup Tcl proc on socket close. 
I am thinking to extend ns_sls to attach 
Tcl proc to be called at cleanup stage.
Is this right thing to do?

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] SLS

2009-03-02 Thread Vlad Seryakov
I did not do anything yet, just running the idea by.

Persistent conns are available right now, our driver supports it, just 
need to set keep alive timeout to be long enough and you have TCP 
connection for free. The callbacks for cleanup i think should be running 
on NsConnClose in the same thread, in queue.c. Currently i can live 
without cleanup, i just do not do any cleanups but having it would be 
very useful.

Stephen Deasey wrote:
 On Mon, Mar 2, 2009 at 6:31 PM, Vlad Seryakov v...@crystalballinc.com wrote:
 I am working with persistent connections right now and want to track when 
 the socket is closed to cleanup some memory in
 Tcl but it looks like there is no way to call cleanup Tcl proc on socket 
 close. I am thinking to extend ns_sls to attach
 Tcl proc to be called at cleanup stage.
 Is this right thing to do?
 
 
 What else have you had to modify to create persistent connections -- a
 new driver?  You could run cleanup callbacks from your
 Ns_DriverCloseProc.
 
 Also, in what thread do you expect callbacks to run? In which thread
 are the sockets being held open?
 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
v...@crystalballinc.com
http://www.crystalballinc.com/vlad/

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Wiki Account

2009-02-20 Thread Vlad Seryakov
Well, in PmWiki we use TinyMCE for editing but using Tcl wiki has one advantage 
that other solutions do not:

it is already running, it is free and it does not require special server or 
maintenance except the Wiki content itself.
Still we need to host somewhere our generated documentation which will be 
hosted somewhere else.

Writing this i thought, will it be possible even to convert existing docs into 
some kind of wiki and use it with simple 
wikit or something. When writing docs the biggest problem is rendering multiple 
times to clean it up or make it nicer, 
with Wiki it will be much easier.

I even have somewhere one of the first Tcl wiki version by Jean-Claude Wippler, 
the file is only 5k but produces pretty 
nice Wiki output


Gustaf Neumann wrote:
 
 Bernd Eidenschink schrieb:
 Very nice idea!
 I am for this.
 
 good idea!
 (i wonder, though, when will wikis eventually add some kind of TinyMCE et. 
 al.)
   
 well, see e.g.
 http://alice.wu-wien.ac.at:8000/xowiki-doc/
 
 -gustaf  neumann
 Gave it a try with the watchdog article:
 http://wiki.tcl.tk/22570


 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
   
 
 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Wiki Account

2009-02-19 Thread Vlad Seryakov
It was long time ago i used but now i always get this error even if i logged 
in. In my opinion, this Wiki is no-use

Sorry! We could not process your edit due to a loss of session data. Please try 
again. If it still doesn't work, try 
logging out and logging back in.

We've been using pmwiki for a long time under Naviservr with nsphp, this is 
very simple and fast and powerful wiki, no 
need for database, just one dir with .php files. I'd vote for it, mediawiki is 
too complex for occasional edits and the 
syntax i forget completely if do not use it for some time. pmwiki syntax is 
much more simpler.


Ian Harding wrote:
 Hi,
 
 Can I have an account on the wiki?
 
 Thanks!
 
 - Ian
 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Config error

2009-02-05 Thread Vlad Seryakov
On Linux it just should show null because underlying snprintf handles NULLs 
pretty well

Vasiljevic Zoran wrote:
 Hi!
 
 It seems that we have problems if Dev logging is enabled.
 By definition the ConfigGet may return NULL. Also the value
 of the section param passed to this (below) and other
 similar functions may also be NULL. In such cases the
 Ns_Log below crashes at dereferencing section and/or value
 ptrs.
 
 
 CONST char *
 Ns_ConfigString(CONST char *section, CONST char *key, CONST char *def)
 {
  CONST char *value;
 
  value = ConfigGet(section, key, 0, def);
  Ns_Log(Dev, config: %s:%s value=\%s\ default=\%s\ (string),
 section, key, value, def);
 
  return value ? value : def;
 }
 
 
 
 --
 Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
 software. With Adobe AIR, Ajax developers can use existing skills and code to
 build responsive, highly engaging applications that combine the power of local
 resources and data with the reach of the web. Download the Adobe AIR SDK and
 Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Config error

2009-02-05 Thread Vlad Seryakov
The reason i think because Ns_DStringPrintf now uses OS's snprintf, before that 
it uses home-grown sprintf-like engine.

Vasiljevic Zoran wrote:
 On 05.02.2009, at 17:47, Vlad Seryakov wrote:
 
 On Linux it just should show null because underlying snprintf  
 handles NULLs pretty well
 
 
 On Solaris, it cores all arround.
 
 
 --
 Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
 software. With Adobe AIR, Ajax developers can use existing skills and code to
 build responsive, highly engaging applications that combine the power of local
 resources and data with the reach of the web. Download the Adobe AIR SDK and
 Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] commit/naviserver: groks: Manage lifetime of tcl synchronization objects without trampling memory -- -- The old scheme with both anonymous and named locks was makinf it difficul

2008-12-01 Thread Vlad Seryakov
Stephen,

Will it be too much to ask just to add all existing modules into 
Mercurial, frankly i would like to do it but just my mind on something 
else right now. At the same time i will start using Naviserver big time 
very soon and would like to have repository available for all bugfixes 
and improvements.

As for modules i think these below will not need to be imported because 
they are obsolete:

nsffmpeg
nsfortune
nsocaml
nsotcl
nssavi
nssip
nstcp

Thanks


We still can keep CVS, just disable write access and let whoever wants 
to checkout it to do it

Stephen Deasey wrote:
 On Tue, Nov 25, 2008 at 8:15 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 Ok, just to confirm

 what about CVS? should we disable it? clear description then should be made 
 how to get sources from new repo
 
 
 Yeah that needs to be done too.
 
 Convert all the modules to their own repos.
 
 Make a backup of CVS and stick it on the download section.
 
 Dissable CVS in the sourceforge interface.
 
 Fixup the README file etc. on how to get the new source.
 
 
 Converting the repos isn't hard but I like to clean them up too. I
 think I described how to do it before, so you can give it a go if you
 feel like it. Ask if you need help.  Otherwise, I'll just start
 converting them.
 
 
 Stephen Deasey wrote:
 On Tue, Nov 25, 2008 at 1:28 AM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 That means all development from now on goes to Mercurial, Right?

 Well no one complained so I guess that means we've switched.

 I'll convert the other modules...

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great 
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] commit/naviserver: groks: Manage lifetime of tcl synchronization objects without trampling memory -- -- The old scheme with both anonymous and named locks was makinf it difficul

2008-12-01 Thread Vlad Seryakov
This is awesome!

None in particular at the moment because i have all what i need running 
and i do not need to change them now. so take your time, i may help you 
once i clear my stuff at work

Stephen Deasey wrote:
 On Tue, Dec 2, 2008 at 3:33 AM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 Stephen,

 Will it be too much to ask just to add all existing modules into
 Mercurial, frankly i would like to do it but just my mind on something
 else right now. At the same time i will start using Naviserver big time
 very soon and would like to have repository available for all bugfixes
 and improvements.
 
 
 I already converted some:
 
   http://www.bitbucket.org/naviserver/
 
 I'll do the rest, but if there's any that are particularly important
 to you I'll do them first.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] commit/naviserver: groks: Manage lifetime of tcl synchronization objects without trampling memory -- -- The old scheme with both anonymous and named locks was makinf it difficul

2008-11-25 Thread Vlad Seryakov
Ok, just to confirm

what about CVS? should we disable it? clear description then should be made how 
to get sources from new repo

Stephen Deasey wrote:
 On Tue, Nov 25, 2008 at 1:28 AM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 That means all development from now on goes to Mercurial, Right?
 
 
 Well no one complained so I guess that means we've switched.
 
 I'll convert the other modules...
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] commit/naviserver: groks: Manage lifetime of tcl synchronization objects without trampling memory -- -- The old scheme with both anonymous and named locks was makinf it difficul

2008-11-24 Thread Vlad Seryakov
That means all development from now on goes to Mercurial, Right?


[EMAIL PROTECTED] wrote:
 1 new changeset in naviserver:
 
 http://www.bitbucket.org/naviserver/naviserver/changeset/931b474ecd20/
 changeset:   r2166:931b474ecd20
 user:groks
 date:2008-11-24 01:25:10
 summary: Manage lifetime of tcl synchronization objects without trampling 
 memory
 
 The old scheme with both anonymous and named locks was makinf it difficult
 to know when to cleanup. The code was broken -- some memory corruption
 and some cases missed.
 
 With this change all locks are named, with anon locks recieving an auto-
 generated name. Also, we no longer destroy locks because we can't do it
 safely, and there seems little point.
 affected #:  4 files (104 bytes)
 
 Repository URL: http://bitbucket.org/naviserver/naviserver/
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsdbpg

2008-11-21 Thread Vlad Seryakov
change

MODLIBS = -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a

to

MODLIBS = -lnsdb -L/opt/pgsql8.2.11/lib -lpq


Bernd Eidenschink wrote:
 I'm cursed. I never can compile a postgres driver for naviserver
 from scratch.
 
 Here's my tale - maybe you can hint me to an obvious mistake:
 
 I compiled a Postgres 8.2.11 from source into
 /opt/pgsql8.2.11
 
 Then I checked out /modules/nsdbpg.
 
 I changed in the Makefile the line
 MODLIBS= -lnsdb -lpq
 
 to
 MODLIBS = -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a
 
 and started make with the line
 make NAVISERVER=/usr/local/ns 
 CFLAGS=-I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include 
 -I/usr/local/ns/include
 
 It compiles. The only output is:
 gcc -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include -I/usr/local/ns/include 
   -c -o 
 nsdbpg.o nsdbpg.c
 gcc -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include -I/usr/local/ns/include 
   -c -o 
 tclcmds.o tclcmds.c
 tclcmds.c: In function ‘stream_actually_write’:
 tclcmds.c:830: warning: ‘Ns_ConnWrite’ is deprecated (declared 
 at /usr/local/ns/include/ns.h:)
 /bin/rm -Rf nsdbpg.so
 gcc -shared -I/opt/pgsql8.2.11/lib -I/opt/pgsql8.2.11/include 
 -I/usr/local/ns/include  -L/usr/local/ns/lib -o 
 nsdbpg.so nsdbpg.o 
 tclcmds.o  -L/usr/local/ns/include/nsdb.h -L/opt/pgsql8.2.11/lib/libpq.a 
 -lnsthread -lnsd -L/usr/local/ns/lib -ltcl8.4 -ldl -lgcc_s  -lieee -lm  
 -Wl,--export-dynamic  -L/usr/local/ns/lib -Wl,-rpath,:/usr/local/ns/lib
 
 So this warning about Ns_ConnWrite - ignored.
 
 No doing a ldd nsdbpg.so
 returns
 
 linux-gate.so.1 =  (0xb7fce000)
 libnsthread.so = /usr/local/ns/lib/libnsthread.so (0xb7fbe000)
 libnsd.so = /usr/local/ns/lib/libnsd.so (0xb7f46000)
 libtcl8.4.so = /usr/local/ns/lib/libtcl8.4.so (0xb7e9)
 libdl.so.2 = /lib/tls/i686/cmov/libdl.so.2 (0xb7e87000)
 libgcc_s.so.1 = /lib/libgcc_s.so.1 (0xb7e7c000)
 libm.so.6 = /lib/tls/i686/cmov/libm.so.6 (0xb7e57000)
 libc.so.6 = /lib/tls/i686/cmov/libc.so.6 (0xb7d08000)
 libz.so.1 = /usr/lib/libz.so.1 (0xb7cf2000)
 libcrypt.so.1 = /lib/tls/i686/cmov/libcrypt.so.1 (0xb7cc)
 libpthread.so.0 = /lib/tls/i686/cmov/libpthread.so.0 (0xb7ca8000)
 /lib/ld-linux.so.2 (0xb7fcf000)
 
 
 Hm. On another server libpq and libnsdb come up,
 missing here.
 
 When trying to run naviserver, called from my startscript
 with an exported LD_LIBRARY_PATH of
 
 export 
 LD_LIBRARY_PATH=/usr/local/ns/lib:/usr/local/ns/lib/xotcl1.6.2:/usr/local/ns/bin:/opt/pgsql8.2.11/lib:/usr/local/lib
 
 including the postgres directory, I get:
 
 [21/Nov/2008:18:23:52][5641.b7c426b0][-main-] Error: 
 modload: /usr/local/ns/bin/nsdbpg.so: couldn't load 
 file /usr/local/ns/bin/nsdbpg.so: /usr/local/ns/bin/nsdbpg.so: undefined 
 symbol: PQsetdbLogin
 
 Can you help me, Veronica Mars?
 
 Bernd.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Chnaged my mind: switch to mercurial

2008-11-20 Thread Vlad Seryakov
vseryakov is my username,

looks oike adding openssh pub key does not work, it keeps saying SSH key is not 
valid

Stephen Deasey wrote:
 On Wed, Aug 20, 2008 at 7:16 AM, Vasiljevic Zoran [EMAIL PROTECTED] wrote:
 On 20.08.2008, at 00:19, Stephen Deasey wrote:

 I think it's probably better to stay with the familiar cvs. It doesn't
 scare anyone, SF handles everything, and patches are probably too
 infrequent to for the vcs to make much difference anyway.

 Agree?
 Yes. Lets keep it simple for now.

 
 
 I've changed my mind about this again. It's just too much of a pain in
 the ass to do anything more than minor fixes without trampling on
 other peoples stuff, using CVS.
 
 Here's something new though:
 
   http://www.bitbucket.org/naviserver/naviserver/overview/
 
 Fancy hosting for mercurial repos. It's like github (if you're
 familiar with that, very popular), but for mercurial. It's up to date
 for both branches of AOLserver, and naviserver with the exception of
 Zoran's commit the other day (I'll update that now).  It also models
 the fact that naviserver is a fork AOLserver 4.0.10.
 
 This would have all the advantages we talked about previously, plus a
 couple of new ones which would be particularly helpful when developing
 larger changes which need a bit of back and forth development before
 being committed: branches a patch queues.
 
 If you look at the interface you'll see a 'fork' link. The idea is any
 random stranger can fork any project to make changes. They then send a
 pull request to you and merge the changes back, and they delete their
 fork.  Bitbucket also supports mercurial queues, which is almost the
 same but a bit easier when reworking a set of patches.
 
 So the ideas is that we'd use bitbucket for hosting the mercurial
 repos and keep everything else as is.
 
 How does this sound?
 
 
 (Tell me you username on bitbucket and I'll add you to the project).
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] PHP streaming hangs

2008-11-08 Thread Vlad Seryakov
 
 Does this actually need to flush?
 
 It depends when php calls it. In the case where there's no body, eg. a
 302 redirect, then maybe this signals 'all done' and you're to write
 the headers. In the case where there is a body it's not needed because
 naviserver will construct and dump the headers when you try to write
 the first data, and it will send both with a single syscall (and
 packet, if it fits), which is more efficient.
 
 So you should try not to flush. You might try to do nothing in this
 call, and detect when you've finished sending in the case of a
 zero-length body some other way. When php returns control to your
 Ns_Op function you could check to see if any bytes were sent and if
 not, flush the headers.

I tried it, with code before senfile implementation where we had flush 
function it worked perfectly, so PHP is calling this only when it needs 
to actually send headers. Not sure i can find out about body coming, 
even in 302 case there can be body but may be not. Will try again

 But anyway, you're checking for ctx-conn != NULL before setting the
 response code, then using it unconditionally when you write the data.
 
 Ns_ConnWriteData can fail but you're ignoring the return code and
 returning success

It is mostly possible that the problem is in nsphp :-((

 
 
 Does php try to set a length header? You may need to check for it in
 here and call Ns_ConnSetLengthHeader.
 

This i checked, no length


 
 Whether the write succeeds or fails, you're returning the original
 buffer length, which I guess signals success to php. It might be hard
 to figure out exactly how much did get sent, because
 conn-nContentSent includes the headers bytes. But maybe php doesn't
 care? You'll have to check if you can return -1 or 0 or something.

when abort is called, i do not return str_length, it might be logjmp 
inside php


 You might also want to check if php exposes it's buffering. If you can
 figure out that your ub_write call is being called with all the data
 that's going to be sent (the script has finished executing) or the
 last piece of data, you shouldn't pass the flag NS_CONN_STREAM.
 Otherwise, you should.

No buffering, PHP calls it with all pieces separately

 
 
 I tried that but could not get it to work, it generates configure but
 when i run it i never could make it finish, there are always some errors.
 
 
 
 Do you need to buy into the full build process? Maybe you can just
 pull in the header and link against the library..?

The problem with PHP that it can support only one SAPI implementation 
and nsphp is not just extesion but SAPI handler, so just compiling it as 
extension will not work



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] PHP streaming hangs

2008-11-08 Thread Vlad Seryakov
The major difference between previous version and current that in the 
previous version we always closed connection, even in 1.1, PHP streaming 
was not using chunked encoding explicitly and the server never 
auto-assigned it.
In current version the server decided and because we always keep-alive 
and in chunked, Firefox after 3 request hangs because reply is not 
correct. This is strange because in telnet session it looks fine but my 
eye may not be protocol-demanding like Firefox.

Vlad Seryakov wrote:
 Does this actually need to flush?

 It depends when php calls it. In the case where there's no body, eg. a
 302 redirect, then maybe this signals 'all done' and you're to write
 the headers. In the case where there is a body it's not needed because
 naviserver will construct and dump the headers when you try to write
 the first data, and it will send both with a single syscall (and
 packet, if it fits), which is more efficient.

 So you should try not to flush. You might try to do nothing in this
 call, and detect when you've finished sending in the case of a
 zero-length body some other way. When php returns control to your
 Ns_Op function you could check to see if any bytes were sent and if
 not, flush the headers.
 
 I tried it, with code before senfile implementation where we had flush 
 function it worked perfectly, so PHP is calling this only when it needs 
 to actually send headers. Not sure i can find out about body coming, 
 even in 302 case there can be body but may be not. Will try again
 
 But anyway, you're checking for ctx-conn != NULL before setting the
 response code, then using it unconditionally when you write the data.

 Ns_ConnWriteData can fail but you're ignoring the return code and
 returning success
 
 It is mostly possible that the problem is in nsphp :-((
 

 Does php try to set a length header? You may need to check for it in
 here and call Ns_ConnSetLengthHeader.

 
 This i checked, no length
 
 
 Whether the write succeeds or fails, you're returning the original
 buffer length, which I guess signals success to php. It might be hard
 to figure out exactly how much did get sent, because
 conn-nContentSent includes the headers bytes. But maybe php doesn't
 care? You'll have to check if you can return -1 or 0 or something.
 
 when abort is called, i do not return str_length, it might be logjmp 
 inside php
 
 
 You might also want to check if php exposes it's buffering. If you can
 figure out that your ub_write call is being called with all the data
 that's going to be sent (the script has finished executing) or the
 last piece of data, you shouldn't pass the flag NS_CONN_STREAM.
 Otherwise, you should.
 
 No buffering, PHP calls it with all pieces separately
 

 I tried that but could not get it to work, it generates configure but
 when i run it i never could make it finish, there are always some errors.


 Do you need to buy into the full build process? Maybe you can just
 pull in the header and link against the library..?
 
 The problem with PHP that it can support only one SAPI implementation 
 and nsphp is not just extesion but SAPI handler, so just compiling it as 
 extension will not work
 
 
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] naviserver ChangeLog,1.827,1.828

2008-11-08 Thread Vlad Seryakov
Not sure what are you asking?

Stephen Deasey wrote:
 On Sat, Nov 8, 2008 at 10:42 PM, Vlad Seryakov
 [EMAIL PROTECTED] wrote:
 Update of /cvsroot/naviserver/naviserver
 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26902

 Modified Files:
ChangeLog
 Log Message:
 mark connection flags when last chunk is sent


 Index: ChangeLog
 ===
 RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v
 retrieving revision 1.827
 retrieving revision 1.828
 diff -C2 -d -r1.827 -r1.828
 *** ChangeLog   7 Nov 2008 19:01:57 -   1.827
 --- ChangeLog   8 Nov 2008 22:42:09 -   1.828
 ***
 *** 1,2 
 --- 1,7 
 + 2008-11-08  Vlad Seryakov [EMAIL PROTECTED]
 +
 +   * nsd/connio.c: Mark connection flags with NS_CONN_SENT_LAST_CHUNK
 +   when last chunk is actuall sent.
 +
 
 
 What?
 
 
 $ grep -r NS_CONN_SENT_LAST_CHUNK *
 
 ChangeLog:   * nsd/connio.c: Mark connection flags with 
 NS_CONN_SENT_LAST_CHUNK
 include/ns.h:   #define NS_CONN_SENT_LAST_CHUNK0x100 /* Marks that
 the last chunk was sent in chunked mode */
 nsd/connio.c:  connPtr-flags |= NS_CONN_SENT_LAST_CHUNK;
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Relocating ns_atclose calls

2008-11-07 Thread Vlad Seryakov
Actually, i do not need it anymore


Stephen Deasey wrote:
 On Fri, Nov 7, 2008 at 4:32 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 
 In most cases ... it will work as before because
 atclose blocks and socket is not yet returned to driver
 
 
 driver.c:NsSockClose() does return the Sock to the driver thread, and
 it does not block.


 ... if i need to use socket garanteed at connection end, this is the
 only place i can do it.
 
 
 Why? What are you trying to do?
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] PHP streaming hangs

2008-11-07 Thread Vlad Seryakov
It is funny, using telnet and submitting same headers never triggers 
this, but when using firefox, after sevrral requests it hangs, and after 
timeout outputs:

0

c

test page

0

as it lost sequence and puts the whole buffer with trailer as the first 
one. I want to find the problem and then will put test for future checks

Stephen Deasey wrote:
 On Fri, Nov 7, 2008 at 9:23 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 This is the simple PHP page that triggers hanging, when attached to the
 nsd, backtrace on all thread show they all are in the condwait or poll
 wait, seems like sent/expected bytes miscalculation.

 ?php

 $test = @$_COOKIE[test];
 setcookie(test, 1, time() + 60, '/');

 if ($test == 1) {
header(HTTP/1.0 304 Not Modified);
exit();
 }
 ?
 test page

 
 
 Make a 'tests' directory and add the above snippet. Make it run from
 'make test'.
 
 The 'nsvfs' module in CVS is an example of an external module which
 has tests using the nstest_http command. You could just 'cp -a
 ../nsvfs/tests tests' and then cut 'n paste from the Makefile.
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] PHP streaming hangs

2008-11-07 Thread Vlad Seryakov
Added, runs fine but that the thing, it hangs in firefox, not in the test

Stephen Deasey wrote:
 On Fri, Nov 7, 2008 at 10:24 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 
 I want to find the problem and then will put test for future checks
 
 
 No, you write the test to help find the bug.
 
 
 It is funny, using telnet and submitting same headers never triggers
 this, but when using firefox, after sevrral requests it hangs
 
 
 Rather than typing the same thing into telnet over and over again, and
 then repeating it with firefox, and then hoping other people can guess
 right and reproduce what you're doing and have them repeat it all too,
 why not check into CVS a 10 line test file?  It's just GOT to be
 easier, right?
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] PHP streaming hangs

2008-11-07 Thread Vlad Seryakov
Yes, keep-alive is the key, nshttp_test closes connection so it cannot 
test this

I tried that but could not get it to work, it generates configure but 
when i run it i never could make it finish, there are always some errors.


Stephen Deasey wrote:
 On Sat, Nov 8, 2008 at 3:38 AM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 Added, runs fine but that the thing, it hangs in firefox, not in the test

 
 
 OK, so there's a difference.
 
 Maybe keepalive -- you mentioned what looked like responses garbled
 together? An HTTP 1.1 request will force keepalive:
 
 test php-1.1 {sequential requests w/keepalive} -body {
 foreach n {0 1 2} {
 lappend results [nstest_http -http 1.1 \
  -getbody 1 \
  -getheaders content-length \
  GET /test.php]
 }
 set results
 } -cleanup {
 unset -nocomplain results
 } -result {200 10 {test page\n}} {200 10 {test page\n}} {200 10 {test 
 page\n}}
 
 
 
 Also, can you adjust the build to use an already installed php? See:
 README.SELF-CONTAINED-EXTENSIONS in the php source for directions.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] PHP streaming hangs

2008-11-07 Thread Vlad Seryakov
In telnet session, i do it endlessly, no hangs, mistery

GET /test.php HTTP/1.1
Host: vlad.mpower.net
Cookie: test=1

HTTP/1.1 304 Not Modified
MIME-Version: 1.0
Server: NaviServer/4.99.3
Date: Sat, 08 Nov 2008 05:06:44 GMT
X-Powered-By: PHP/5.2.6
Set-Cookie: test=1; expires=Sat, 08-Nov-2008 05:07:44 GMT; path=/
Content-type: text/html
Connection: keep-alive
Transfer-Encoding: chunked

0

Stephen Deasey wrote:
 On Sat, Nov 8, 2008 at 3:38 AM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 Added, runs fine but that the thing, it hangs in firefox, not in the test

 
 
 OK, so there's a difference.
 
 Maybe keepalive -- you mentioned what looked like responses garbled
 together? An HTTP 1.1 request will force keepalive:
 
 test php-1.1 {sequential requests w/keepalive} -body {
 foreach n {0 1 2} {
 lappend results [nstest_http -http 1.1 \
  -getbody 1 \
  -getheaders content-length \
  GET /test.php]
 }
 set results
 } -cleanup {
 unset -nocomplain results
 } -result {200 10 {test page\n}} {200 10 {test page\n}} {200 10 {test 
 page\n}}
 
 
 
 Also, can you adjust the build to use an already installed php? See:
 README.SELF-CONTAINED-EXTENSIONS in the php source for directions.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsphp and other broken things

2008-10-29 Thread Vlad Seryakov
Ok, while preparing test case i was able to pinpoint the location of the 
problem.
I use PmWiki and it uses If-modified-Since header to return 304 
responses. In new code send_headers was no-op but actually i have to 
call Ns_ConnWriteData with 0 length to flush headers.

Now it works, it was module problem.

Stephen Deasey wrote:
 On Tue, Oct 28, 2008 at 5:02 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 After 2008-09-11, nsphp stopped working, even with the latest update to
 non-obsolete functions, it looks like something in the core flow,
 especially streaming part doe snot work properly.

 I tried all versions and the latest stable is marked in ChangeLog at
 2008-09-11.

 This is only HTTP related and it could be problem in nsphp, but it was
 very stable until functions it used became obsolete. I started using
 Ns_ConnWriteData with or without NS_CONN_STREAM and browsers stopped
 showing web pages.

 These functions would tell that streaming is required and no
 Content-Length will be supplied:

 Ns_ConnSetRequiredHeaders(ctx-conn, ctype, -1);
 Ns_ConnFlushHeaders(ctx-conn, SG(sapi_headers).http_response_code);

 Then
 Ns_ConnWriteData without any flags would just send data to the browser

 In new code, the server does all things automatically but NS_CONN_STREAM
 flags is required to tell that we are streaming. Flush is not used
 anymore. When i telnet i get page back without content-length but still,
 every second request hangs or comes empty.

 
 
 I'm not sure how you're triggering this. Can you write a test and
 point me at it?
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] nsphp and other broken things

2008-10-28 Thread Vlad Seryakov
After 2008-09-11, nsphp stopped working, even with the latest update to 
non-obsolete functions, it looks like something in the core flow, 
especially streaming part doe snot work properly.

I tried all versions and the latest stable is marked in ChangeLog at 
2008-09-11.

This is only HTTP related and it could be problem in nsphp, but it was 
very stable until functions it used became obsolete. I started using 
Ns_ConnWriteData with or without NS_CONN_STREAM and browsers stopped 
showing web pages.

These functions would tell that streaming is required and no 
Content-Length will be supplied:

Ns_ConnSetRequiredHeaders(ctx-conn, ctype, -1);
Ns_ConnFlushHeaders(ctx-conn, SG(sapi_headers).http_response_code);

Then
Ns_ConnWriteData without any flags would just send data to the browser

In new code, the server does all things automatically but NS_CONN_STREAM 
flags is required to tell that we are streaming. Flush is not used 
anymore. When i telnet i get page back without content-length but still, 
every second request hangs or comes empty.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] How to listen on 2 ports?

2008-10-24 Thread Vlad Seryakov
Just load nssock second time with different name

ns_section ns/server/modules
ns_param nssock nssock.so
ns_param nssock2 nssock.so

ns_section ns/server/module/nssock
ns_paramport 90

ns_section ns/server/module/nssock2
ns_paramport 81

Vasiljevic Zoran wrote:
 He you socket/driver gurus out there!
 
 What are my options if I want to have NS listen
 to more than one port?
 
 We have the setup with just one virtual servers
 and listen on 0.0.0.0 address (all interfaces).
 What we would like to do is to listen on 1 more
 port but if possible from the same virtual server.
 I would not like to complicate things by introducing
 a second virtual server, it at all possible.
 
 Ideas?
 
 Zoran
 
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] naviserver ChangeLog,1.820,1.821

2008-10-22 Thread Vlad Seryakov
Right

Stephen Deasey wrote:
 On Wed, Oct 22, 2008 at 3:14 AM, Vlad Seryakov
 [EMAIL PROTECTED] wrote:
 Update of /cvsroot/naviserver/naviserver
 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17830

 Modified Files:
ChangeLog
 Log Message:
 nsssl module ported, sock context and driver context exposed


 Index: ChangeLog
 ===
 RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v
 retrieving revision 1.820
 retrieving revision 1.821
 diff -C2 -d -r1.820 -r1.821
 *** ChangeLog   21 Oct 2008 21:46:36 -  1.820
 --- ChangeLog   22 Oct 2008 02:14:23 -  1.821
 ***
 *** 13,16 
 --- 13,24 
  modules/nstftpd: ported to new driver API

 + modules/nsssl: Ported to new API
 +
 + nsd/conn.c: Added new Ns_ConnSockContext function which returns 
 sock-arg,
 + socket-wide context
 +
 + Ns_ConnDriverContext will now return connPtr-drvPtr-arg, this is 
 driver-wide
 + context.
 +
 
 
 These structure members are already public, so Ns_ConnSockContext()
 and Ns_ConnDriverContext() are not needed:
 
 include/ns.h:
 
 typedef struct Ns_Sock {
 Ns_Driver  *driver;
 SOCKET  sock;   /* Connection socket */
 struct sockaddr_in  sa; /* Actual peer address */
 void   *arg;/* Driver context. */
 } Ns_Sock;
 
 typedef struct Ns_Driver {
 void*arg;   /* Driver callback data. */
...
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] naviserver/nsd driver.c,1.119,1.120

2008-10-22 Thread Vlad Seryakov
 
 static ssize_t
 Recv(Ns_Sock *sock, struct iovec *bufs, int nbufs, Ns_Time
 *timeoutPtr, int flags)
 {
 static const char request[] = GET /whateva HTTP/1.0\r\n\r\n;
 size_t requestLen = sizeof(request);
 socklen_t sockLen = sizeof(struct sockaddr_in);
 
 memcpy(bufs-iov_base, request, requestLen);
 
 return recvfrom(sock-sock,
 bufs-iov_base + requestLen,
 bufs-iov_len - requestLen,
 0, (struct sockaddr*) sock-sa, size);
 }
 
 (checking for buffer lengths skipped here)
 
 
 The advantage of doing it this way is that everything is much simpler
 from the driver threads point of view. It doesn't need to know
 anything special about non-standard protocols, and there isn't
 anything in the driver callback api that isn't also useful to the HTTP
 server.


Arguable this is not very clear and simple, driver will have to hack 
buffers and every request should pretend to be HTTP just so driver 
thread would think that it serves only HTTP requests.

If we have special codes and already have 3, does another one breaks 
anythings if only one code makes overall process simpler not only in 
driver thread but for drivers itself?

The only reason of new code because SOCK_READY does queue socket 
immediately but because request structure is not set, NsGetRequest will 
call SockRead/SockParse. Basically ACCEP_QEUEU code is the same as 
ACCEPT_DATA but it skips hacking HTTP request buffer and let the conn 
thread perform processing where ACCEPT_DATA assumes HTTP request and 
assumes HTTP flow to be performed.



 Also, this can't work:
 
 nsd/driver.c:1515
 
 status = DriverAccept(sockPtr);
 
 if (status == NS_DRIVER_ACCEPT_ERROR) {
 status = SOCK_ERROR;
 ...
 
 } else {
 status = SOCK_MORE;
 ...
 
 if (status == NS_DRIVER_ACCEPT_DATA) {
 ...
 } else if (status == NS_DRIVER_ACCEPT_QUEUE) {
 ...
 }
 }

Oops, my bad



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] modules/nsssl nsssl.c,1.6,1.7

2008-10-22 Thread Vlad Seryakov

 The check for (sslPtr == NULL) happens after it's already been used.


Oh, late night work :-((

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] modules/nsssl nsssl.c,1.6,1.7

2008-10-22 Thread Vlad Seryakov
I tried to use Ns_SockSendBufs() but it sends data directly to socket 
where i need to send via driver's send proc.

Why connPtr-nContentSent is not updated, all send called with conn 
parameters should do this

Stephen Deasey wrote:
 Index: nsssl.c
 ===
 RCS file: /cvsroot/naviserver/modules/nsssl/nsssl.c,v
 retrieving revision 1.6
 retrieving revision 1.7
 diff -C2 -d -r1.6 -r1.7
 *** nsssl.c 22 Oct 2008 02:14:24 -  1.6
 --- nsssl.c 22 Oct 2008 03:23:06 -  1.7
 ***
 --- 432,447 
   */

 ! static int
 ! SendBufs(SOCKET sock, struct iovec *bufs, int nbufs, Ns_Time *timeoutPtr, 
 int flags)
  {
 ! Ns_Conn *conn = Ns_GetConn();
 !
 ! return Ns_ConnSend(conn, bufs, nbufs);
 ! }
 !
 
 
 This should be Ns_SockSendBufs(), otherwise connPtr-nContentSent will
 be double counted and the driver thread may block.
 
 Although in this case it should actually be Send(), which is your SSL
 specific implementation of Ns_SockSendBufs(). The way it is now static
 files may be sent in the clear :-/
 
 
 (Basically, you implement the SendFile() callback by calling
 Ns_SockSendFileIndirect(), which is the default library implementation
 which scrapes the bytes off disk, and pass it Send(), which is your
 implementation of writing to the network.  nssock is maybe a little
 confusing in that it doesn't actually do anything but call the default
 implementations, because it doesn't have to...)
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] 2006-06-24 - FCGI

2008-09-10 Thread Vlad Seryakov
I would help in co-developing and testing it but right now my head is 
too busy with other project so it is hard to start this new module.
As usual, to start is the hardest thing

Bernd Eidenschink wrote:
 Yes, that's why i thought about developing fcgi module for ns, just to
 make an option for Rails and other frameworks to run on naviserver. It
 could work like for nginx, but could not, still an option is an option.
 
 True. These frameworks offer so much so nicely out of the box one would never 
 want to re-invent in ADP/Tcl.
 
 And on the other hand they need a real webserver doing all the return huge 
 files, return lots of cached small files etc. stuff.
 
 Bernd.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Log rolling error

2008-08-28 Thread Vlad Seryakov
Seems to be working on my side, regardless of path.

Are there any other errors in the log?

Daniel Stasinski wrote:
 I've noticed that when I install to the non-default directory, log
 rolling seems to fail.  Before I start digging, anyone else have any
 simple fix?
 
 Daniel
 
   [26/Aug/2008:08:00:00][7928.b7549b90][-sched-] Error: nslog: failed:
 roll '/home/nsadmin/naviserver/servers/myserver/modules/nslog/access.log':
 'No such file or directory'
 
   ns_section ns/server/myserver/module/nslog
   ns_paramfile
 /home/nsadmin/naviserver/servers/myserver/modules/nslog/access.log
   ns_paramrolllog true
   ns_paramrollonsignalfalse
   ns_paramrollhour8
   ns_parammaxbackup   45
   ns_paramlogcombined true
   ns_paramrollfmt %Y-%m-%d
 
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] naviserver ChangeLog,1.787,1.788

2008-08-28 Thread Vlad Seryakov
 + * tests/http_byteranges.test: Add a couple of tests for ranges on
 + larger files to exercise the file descriptor path rather than the
 + in memory mmap or cache path. Unfortunately, this actually
 + triggers the writer thread and this has no support of ranges,
 + which I guess is where it's actually most needed. TODO...
 + 

I really like last changes, at the same time i need writer support 
because my tests showed that serving big files with conn threads are 
waste of resources.
At the same time, being able to support range in the writer make sense.

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] naviserver ChangeLog,1.787,1.788

2008-08-28 Thread Vlad Seryakov
And sent email without finishing the thought :-))

Maybe parsing for range should done early enough and saved in the 
request, so whoever then will be sending data will use it.

Just a thought from east coast :-))

Vlad Seryakov wrote:
 +* tests/http_byteranges.test: Add a couple of tests for ranges on
 +larger files to exercise the file descriptor path rather than the
 +in memory mmap or cache path. Unfortunately, this actually
 +triggers the writer thread and this has no support of ranges,
 +which I guess is where it's actually most needed. TODO...
 + 
 
 I really like last changes, at the same time i need writer support 
 because my tests showed that serving big files with conn threads are 
 waste of resources.
 At the same time, being able to support range in the writer make sense.
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Last build, cache test failure

2008-08-26 Thread Vlad Seryakov
I spent a lot of time and still cannot resolve the problem with latest 
version ns_cache test failure.

One problem i noticed with latest Tcl 8.5.4, in crashes nsd in thread 
test in 64bit and hangs forever in 32bit Linux.

But ns_caches fails with tests using -expires and i rolled back the 
changed i made recently and it still fails. I cannot see why driver 
change would make it fail, but other sources are the same.

Help please

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] ns_time Tcl type problem

2008-08-26 Thread Vlad Seryakov
It looks like the problem with Tcl ns_time type:

ossweb:nscp 78 ns_time
1219798300
ossweb:nscp 79 ns_time
1219798300
ossweb:nscp 80 ns_time get
164905896
ossweb:nscp 81 ns_time get
164905848

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Bug in fastpath cache causes info leak

2008-08-22 Thread Vlad Seryakov
I mainly use Archlinux so i created package file but basically i added 
just 2 lines to it and overall it looks like it:

./configure --prefix=/usr --enable-threads --disable-64bit

sed -i -e 's/-DUSE_THREAD_ALLOC=1//g' tclConfig.sh
sed -i -e 's/-DUSE_THREAD_ALLOC=1//g' Makefile

make install


Bernd Eidenschink wrote:
 You used to have to manually edit the makefile to disable zippy. Is
 this still the case?
 What i do i use sed to replace zippy define after i ran configure, there
 is no easy way to disable it currently
 
 Hi Vlad!
 
 Can you share the way you do it? Thanks!
 
 Bernd.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Bug in fastpath cache causes info leak

2008-08-21 Thread Vlad Seryakov
I think many issues or questions also are result of defaults in 
Aolserver and Naviserver still being set according to past AOL setup and 
requirements. It can be considered as an extreme case and because a lot 
of functionality was implemented for AOL high-performance requirements 
and setup, everybody else has to know that deeply, change config and/or 
know C code good enough to make knowledgeable decisions.

For example, one of such things is threaded allocator which is default 
in Tcl, nowadays default allocators a good enough, return memory to the 
system, zippy is needed only in very high performance cases and even in 
such cases it needs carefull testing to make sure the application does 
not consume more and more different pieces of memory which will lead to 
even wore fragmentation. I always recompile Tcl with default memory 
allocator: it has 2 benefits, 1) not-ever-growing, 2) i can use vtmalloc 
easily for example if default one does not work like i need

We know the code and we assume everybody else should and many questions 
and problems reported seem like dumb or idiotic but they are not in all 
cases.

I think all functionality AOL developed is very valuable but enabling it 
by default is making everybody else to follow AOL's way of doing things 
with AS/NS.

Jeff Rogers wrote:
 Brett Schwarz wrote:
 Wow, I am amazed at the different reactions to this issue between
 this list and the aolserver list. Makes me want to switch to
 naviserver even more now...
 
 90% of the difference is that the issue was introduced here by someone
 saying I contributed a patch.  That in itself gets a better reaction 
 than hyperbole and insisting that everyone else doesn't know what 
 they're talking about.  On the flipside, some of the reactions were 
 overly harsh and dismissive.
 
 BTW, the solution in the patch of adding the filename to the hash key
 was rejected by the OP.
 
 After all the discussion there, I am generally in agreement that there 
 is no real problem other than insufficient documentation, caveats, and 
 examples.  But some options to make the cache less aggressive when 
 necessary can be a good thing.  Other than adding in the filename (which 
 causes more memory to be used) a way to avoid the caching in the first 
 place could be good; either a -nocache flag to ns_returnfile or a 
 different command (to still get the performance of mmap-ing) or my other 
 suggestion of skipping caching for files matching certain patterns 
 (e.g., under a particular directory like /tmp, /var/tmp, or whatever) 
 would avoid uselessly using up the cache memory in the first place.
 
 As far as the performance impact (of mmap or fastpath in the first 
 place) numbers speak louder than speculation, and testing it isn't that 
 hard.
 
 
 -J
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Bug in fastpath cache causes info leak

2008-08-21 Thread Vlad Seryakov
 
 You used to have to manually edit the makefile to disable zippy. Is
 this still the case?
 

What i do i use sed to replace zippy define after i ran configure, there 
is no easy way to disable it currently

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] CVS, just keep it?

2008-08-19 Thread Vlad Seryakov
Oh, yes, i got used to deal with CVS and even i remembered about hg, 
first priority was CVS and then hg updated slipped and got forgotten.
I like it but in reality, we need just one repository and if we do 
switch then completely. We can still stick with CVS, but i am ready to 
switch to anything else.

Stephen Deasey wrote:
 So what's the verdict on switching from cvs to mercurial? Or git or whatever?
 
 Vlad is the only one who gave it a try, but he switched back to cvs.
 
 There's an orphan commit to mercurial now that isn't in cvs. Here's the patch:
 
   http://naviserver.sourceforge.net/hg/naviserver/rev/e5f41846eef4
 
 
 I think it's probably better to stay with the familiar cvs. It doesn't
 scare anyone, SF handles everything, and patches are probably too
 infrequent to for the vcs to make much difference anyway.
 
 Agree?
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Bug in fastpath cache causes info leak

2008-08-19 Thread Vlad Seryakov
I agree with this assessment. Nobody's fault in particular but 
unfortunate circumstances. Still the fix is good  and naviserver has 
fastpath cache disabled as oppose to aolserver.

Stephen Deasey wrote:
 fyi, there's talk of a bug in the fastpath cache on the aolserver
 list. I agree with the reporter, John: it's totally busted. I
 committed a fix last night, but if you're not on the commits list you
 won't have seen it. Heads up.
 
 The fix was to lookup objects in the cache using the file name, as the
 windows code did, and not use the two-stage file name to inode, inode
 to object lookups.
 
 The only down side might be that if you have files known by more than
 one name, eg symlinks, the cache will hold duplicates and be less
 efficient. But that may not be a great idea anyway: with symlinks,
 user-agents will use different URLs to request the same file, so HTTP
 caching can't be used.
 
 Also, it seems to me that the problem has nothing to do with dynamic
 content or temp files or the programmer doing anything wrong. You
 could be unlucky with your timing and have random content appear
 instead of the file you expected. For example, two programmers could
 log in to one machine and edit two html documents live. If they happen
 to save at the same time, and there happens to be requests for those
 files which cause them to be cached, and the OS chooses to recycle
 inodes unfavourably, then the contents of either of the files might
 appear to be any other file that has previously been cached by
 fastpath.  Ouch.
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Fortran, Oberan, GW-BASIC and ...

2008-06-19 Thread Vlad Seryakov
I used to be big fan of Python and a long time ago i played with python 
in aolserver. The problem is that Python has one global lock that 
prevents several interpreters running simultaneously. For playing it was 
fun, i guess for not very busy sites it will work fine as well, but for 
high load it is no-go.

Bernd Eidenschink wrote:
 Hi there!
 
 Anyone ever tried Python with AOLserver/Naviserver?
 
 Those projects seem stalled, but look(ed) very advanced:
 
 http://sourceforge.net/projects/pywx/
 http://www.rexx.com/~dkuhlman/aolserver_howto.html
 
 Just out of curiosity.
 
 Bernd.
 
 -
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services for
 just about anything Open Source.
 http://sourceforge.net/services/buy/index.php
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Mercurial: naviserver.sourceforge.net/hg/

2008-06-01 Thread Vlad Seryakov
I decided to try, followed all the instructions.
First impression is very positive, it was easy. I commited my latest 
changes into hg, so now both repos are in sync.
I will try to maintain both for a while and see how it goes and will 
import all the modules one by one.

Stephen Deasey wrote:
 I updated the naviserver mercurial repo with the latest changes from
 cvs put it on sourceforge:
 
   http://naviserver.sourceforge.net/hg/
 
 
 To check it out:
 
   hg clone http://naviserver.sourceforge.net/hg/naviserver  ~/in/naviserver-hg
 
 Or, if you've already cloned from the freehg.org repo, you can simply
 update with the differences:
 
   hg -R ~/in/navserver-hg pull -u
 
 The -u at the end means 'and update the working directory'. pull and
 update are 2 separate things.
 The -R saves you from CD'ing into the repo directory.
 
 If you are updating instead of cloning, you might want to change the
 default pull location in the repo config file:
 
   ~/in/naviserver-hg/.hg/hgrc
 
   [paths]
   default = http://naviserver.sourceforge.net/hg/naviserver
 
 Now you don't have to specify where to pull from each time. cd into
 the repo directory and 'hg pull -u'. Same for other commands which
 work with two repos: incoming, outgoing etc.
 
 
 I guess that's how most people would grab a copy of the latest source.
 For people who expect to commit to the public repo themselves you
 might want to clone via ssh. A couple of prerequisites:
 
 Add something like the following to your ~/.ssh/config file:
 
   Host sf shell.sf.net
 Hostname  shell.sf.net
 User  yoursfusername
 
 log into sf and do the following:
 
   ssh sf
   ln -s /home/groups/n/na/naviserver ~/ns
   echo source /home/groups/n/na/naviserver/bashc  ~/.bashrc
 
 bashrc just sets the umask correctly and adds the 'hg' command to the PATH.
 
 Now you can clone via ssh:
 
   hg clone ssh://sf/ns/hg/naviserver ~/in/naviserver-hg
 
 That's also where you push to make your commits public.
 
   hg clone ~/in/naviserver-hg ~/ns-work
   cd ~/work
   ... hack hack hack ...
   hg commit
   hg push ssh://sf/ns/hg/naviserver
 
 
 For people who don't have direct commit access, and with mercurial
 that's really no disadvantage, perhaps a good way to work is to use
 the 'patchbomb' extension.  Add the following to your ~/.hgrc file:
 
   [extensions]
   patchbomb=
 
   [email]
   from = Your Name [EMAIL PROTECTED]
 
   [smtp]
   host = smtp.gmail.com
   port = 587
   tls = 1
   username = [EMAIL PROTECTED]
   password = 
 
 (or whatever)
 
 btw. you'll also want to make sure that the following is present --
 it's what your name appears as in the commit message:
 
   [ui]
   username = Your Name [EMAIL PROTECTED]
 
 
 Now, to publish your last commit (the tip, aka HEAD) you could do:
 
   hg email -r tip --to naviserver-devel@lists.sourceforge.net
 
   ('hg help email' for more)
 
 The patch is created as an attachment such that it can exactly
 reproduce the commit when imported to another repo, including the
 committer name, date etc., so full credit is always given.  At this
 point some one with commit access would import the patch, check it,
 and if OK push it:
 
   hg import ~/saved-email
   hg push
 
 
 Commit Messages:
 
 Format them like an email. A single like subject of about ~70 chars,
 followed by a blank like, followed by the body, word wrapped to ~80
 chars.  Keyword stuff the subject so that folks can get the gist of it
 by skimming. Prefix with a module name such as nsperm: if you think it
 makes sense. Say 'Add ...' instead of 'Added ...'.
 
 
 
 The commit messages should be working, and so is cia.vc. Here's an example:
 
 http://sourceforge.net/mailarchive/message.php?msg_id=hg.1883a10a6e0c.1210791169.-2015825136%40sc8-pr-shella-b.sourceforge.net
 
 
 Does this all look OK?
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsmemcached

2008-05-27 Thread Vlad Seryakov
Just tested it, works fine regardless is it first time or not

I am using latest version from CVS of server and the module on Archlinux 
2.6.24-ARCH

Daniel Stasinski wrote:
 I have noticed a quirk in the nsmemcache module.  On the very first
 get command from a fresh restart of nsd, it will not read past about
 1379 bytes and returns a partial chunk of data.  The length is
 correct, but the data past 1379 is corrupt.
 
 To set, I performed:
 
ns_memcache set bigdata [string repeat X 2048]
 
 Next, I killed and restarted nsd and performed:
 
ns_puts [ns_memcache get bigdata text]br' returns 1
ns_puts [string length $text]br/   ' returns 2048
ns_puts $text
 
 All subsequent reads are correct.  Only the very first read is affected.
 
 Daniel
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsmemcached

2008-05-27 Thread Vlad Seryakov
 
 
 Looks like the 'expires' and 'flags' variables might be uninitialised
 for the cmdSet etc. commands if values aren't passed from Tcl.

In CVS version 1.5 they are initialized with 0

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Mercurial: naviserver.sourceforge.net/hg/

2008-05-23 Thread Vlad Seryakov
Does that mean i have to use either one, CVS or HG, not both at the same 
time?
What i am asking, we still have 2 repos, will it work if commits are 
coming to both of them?

Stephen Deasey wrote:
 I updated the naviserver mercurial repo with the latest changes from
 cvs put it on sourceforge:
 
   http://naviserver.sourceforge.net/hg/
 
 
 To check it out:
 
   hg clone http://naviserver.sourceforge.net/hg/naviserver  ~/in/naviserver-hg
 
 Or, if you've already cloned from the freehg.org repo, you can simply
 update with the differences:
 
   hg -R ~/in/navserver-hg pull -u
 
 The -u at the end means 'and update the working directory'. pull and
 update are 2 separate things.
 The -R saves you from CD'ing into the repo directory.
 
 If you are updating instead of cloning, you might want to change the
 default pull location in the repo config file:
 
   ~/in/naviserver-hg/.hg/hgrc
 
   [paths]
   default = http://naviserver.sourceforge.net/hg/naviserver
 
 Now you don't have to specify where to pull from each time. cd into
 the repo directory and 'hg pull -u'. Same for other commands which
 work with two repos: incoming, outgoing etc.
 
 
 I guess that's how most people would grab a copy of the latest source.
 For people who expect to commit to the public repo themselves you
 might want to clone via ssh. A couple of prerequisites:
 
 Add something like the following to your ~/.ssh/config file:
 
   Host sf shell.sf.net
 Hostname  shell.sf.net
 User  yoursfusername
 
 log into sf and do the following:
 
   ssh sf
   ln -s /home/groups/n/na/naviserver ~/ns
   echo source /home/groups/n/na/naviserver/bashc  ~/.bashrc
 
 bashrc just sets the umask correctly and adds the 'hg' command to the PATH.
 
 Now you can clone via ssh:
 
   hg clone ssh://sf/ns/hg/naviserver ~/in/naviserver-hg
 
 That's also where you push to make your commits public.
 
   hg clone ~/in/naviserver-hg ~/ns-work
   cd ~/work
   ... hack hack hack ...
   hg commit
   hg push ssh://sf/ns/hg/naviserver
 
 
 For people who don't have direct commit access, and with mercurial
 that's really no disadvantage, perhaps a good way to work is to use
 the 'patchbomb' extension.  Add the following to your ~/.hgrc file:
 
   [extensions]
   patchbomb=
 
   [email]
   from = Your Name [EMAIL PROTECTED]
 
   [smtp]
   host = smtp.gmail.com
   port = 587
   tls = 1
   username = [EMAIL PROTECTED]
   password = 
 
 (or whatever)
 
 btw. you'll also want to make sure that the following is present --
 it's what your name appears as in the commit message:
 
   [ui]
   username = Your Name [EMAIL PROTECTED]
 
 
 Now, to publish your last commit (the tip, aka HEAD) you could do:
 
   hg email -r tip --to naviserver-devel@lists.sourceforge.net
 
   ('hg help email' for more)
 
 The patch is created as an attachment such that it can exactly
 reproduce the commit when imported to another repo, including the
 committer name, date etc., so full credit is always given.  At this
 point some one with commit access would import the patch, check it,
 and if OK push it:
 
   hg import ~/saved-email
   hg push
 
 
 Commit Messages:
 
 Format them like an email. A single like subject of about ~70 chars,
 followed by a blank like, followed by the body, word wrapped to ~80
 chars.  Keyword stuff the subject so that folks can get the gist of it
 by skimming. Prefix with a module name such as nsperm: if you think it
 makes sense. Say 'Add ...' instead of 'Added ...'.
 
 
 
 The commit messages should be working, and so is cia.vc. Here's an example:
 
 http://sourceforge.net/mailarchive/message.php?msg_id=hg.1883a10a6e0c.1210791169.-2015825136%40sc8-pr-shella-b.sourceforge.net
 
 
 Does this all look OK?
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Mercurial: naviserver.sourceforge.net/hg/

2008-05-23 Thread Vlad Seryakov
I am personally ready to switch right away, i use hg for xine-lib for a 
long time already, in readonly mode but it did not require much learning 
to use it.

More questions, is hg repo hosted by SF? Is it Sf service or you just 
run additional hg server there?

Stephen Deasey wrote:
 On Fri, May 23, 2008 at 7:39 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 Does that mean i have to use either one, CVS or HG, not both at the same
 time?
 What i am asking, we still have 2 repos, will it work if commits are
 coming to both of them?
 
 
 No, we should use one or the other.
 
 Or, we should treat what's in the hg repos now as a demo/test and plan
 to redo them later.
 
 
 
 You could commit your recent change to the hg repo and then they will
 be in synch again, and we can decide what to do. You can be the guinea
 pig :-)
 
 btw. I deleted the ChangeLog in the hg repo. The commit log messages
 should be enough.
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Mercurial: naviserver.sourceforge.net/hg/

2008-05-23 Thread Vlad Seryakov
Another question: why to keep every module in separate repo?
will it be easier to have them under one root?

Stephen Deasey wrote:
 On Fri, May 23, 2008 at 8:45 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 I am personally ready to switch right away, i use hg for xine-lib for a
 long time already, in readonly mode but it did not require much learning
 to use it.

 More questions, is hg repo hosted by SF? Is it Sf service or you just
 run additional hg server there?
 
 
 I basically followed this recipe:
 
 http://www.selenic.com/mercurial/wiki/index.cgi/MercurialOnSourceforge
 
 Although I used mercurial-1.0  (installed into
 /home/groups/n/na/naviserver/local/mercurial-1.0)
 
 All the repos live in /home/groups/n/na/naviserver/hg
 
 Mercurial comes with cgi-scripts to publish the repos, that's what you
 see when you go to:
 
   http://naviserver.sourceforge.net/hg/
 
 (See: /home/groups/n/na/naviserver/cgi-bin)
 
 (And btw. you can get the same view on your own machine by typing 'hg
 serve', built-in web server).
 
 
 So, the repos in $SF/hg  are basically identical to what you end up
 with on your own machine when you clone. The only difference is that I
 modified the per-repo hgrc file to add the hooks for commit messages
 and a couple of other small things.
 
 I guess I should make clear, the naviserver repo, and each of the
 module repos would in fact be individual repos.
 
 
 So to convert the other modules from cvs, you'd run 'hg convert'
 (which you have to enable first, it's an extension shipped with
 mercurial). And then you'd clean it up a little, make sure the commit
 messages follow the mercurial style etc. And then you'd clone it up
 there:
 
   hg clone ./nsexample ssh://sf/ns/hg/nsexample
 
 And then you would ssh into sf and copy the hgrc from an existing repo
 into the new one:
 
   ssh sf
   cd ~/ns/hg
   cp naviserver/.hg/hgrc nsexample/.hg/hgrc
   vi nsexample
 
 It should show up in the web interface automatically.  You only need
 to edit the top of the file to change the display name, basically just
 this:
 
   [web]
   description = Programmable Web Server
 
   [cia]
   module = naviserver
 
 You could also edit 'contact' if you like. It's just for display on
 the web interface.
 
 
 That should be it.  We can go into more details about how to convert
 modules from cvs later, but shout out if you're keen to get started.
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_share

2008-05-18 Thread Vlad Seryakov
i've never used it

Vasiljevic Zoran wrote:
 Hi again!
 
 This is yet-antother scrap candidate. I wonder if
 anybody is still using this ancient interface?
 I would like to get it out as to keep the code
 smaller and simpler to maintain.
 
 Cheers
 Zoran
 
 
 
 
 -
 This SF.net email is sponsored by: Microsoft 
 Defy all challenges. Microsoft(R) Visual Studio 2008. 
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_perm module bug fix

2008-05-11 Thread Vlad Seryakov
 
 Also, you need to fix your editor so that it doesn't automatically
 change whitespace willy-nilly. Your 3 line change turned into a
 gigantic unreadable mess in the commit email.
 
 (when you figure out how to fix it, remind Vlad 'cos he seems to have
 forgotten :-)

Yes, i think i have.
What are our editor predefines? i think i tried but my editor keeps 
removing tabs automaticlaly and this is not what we want i guess.

- Use whitespaces, not tabs
- Tab is 8 charactares, or 4 ?

what else?

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_perm module bug fix

2008-05-11 Thread Vlad Seryakov
 
 You're using Vim?  Maybe someone knows how to fix this. Anyone?

No, i do not use Vim and i just fixed that. Tested using cvs diff, works 
fine.

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_perm module bug fix

2008-05-11 Thread Vlad Seryakov
I use fte (or efte) editor, very old but flexible and i use it 10 years 
already, it has an option to trim lines on save. i disabled it and now 
it does not change untouched lines.

Stephen Deasey wrote:
 On Sun, May 11, 2008 at 6:43 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 You're using Vim?  Maybe someone knows how to fix this. Anyone?
 No, i do not use Vim and i just fixed that. Tested using cvs diff, works
 fine.
 
 
 Groovy.  So how did you fix it?
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] [naviserver-commits] naviserver/nsd adprequest.c, 1.29, 1.30

2008-05-11 Thread Vlad Seryakov
Yes, makes sense

Stephen Deasey wrote:
 On Fri, May 9, 2008 at 7:11 PM, Vlad Seryakov
 [EMAIL PROTECTED] wrote:
 Update of /cvsroot/naviserver/naviserver/nsd
 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5680/nsd

 Modified Files:
adprequest.c
 Log Message:
* nsd/adprequest.c: Fixed situation when adp registered absolute path
outside of the page root.

Output error message when registered adp callback could resolve file

  if (file == NULL) {
 + Ns_Log(Error, adp file not found for %s %s, file=%s, flags=0x%x,
 +conn-request-method, conn-request-url, adp-file, 
 adp-flags);
  status = Ns_ConnReturnInternalError(conn);
  goto done;
 
 
 Maybe this should just return a 404?
 
 I guess the idea behind the internal error is that if you register an
 ADP with a fully qualified path and the file does not exist then it is
 a config error. But it is kind of weird to stat the file at
 registration time -- we don't do that anywhere else -- so the error is
 delayed to runtime.
 
 If someone moves a file without bouncing the server the error-log may
 fill up before anyone notices.
 
 A 404 is probably a big enough clue as to what's gone wrong.
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_perm module bug fix

2008-05-10 Thread Vlad Seryakov
patched, submitted. Thanks

Daniel Stasinski wrote:
 Here is an interesting one that has been broken since AOLserver 4.0.
 
 In hosts.allow, you can use either a full or partial hostname, or
 ipaddr/netmask.   Not all work.
 
 192.168.0.10/255.255.255.255  - Gives error Invalid address or
 hostname 192.168.0.10. should be ipaddr/netmask or hostname
 192.168.0.10/255.255.255.0 - This fixes the above -BUT- it allows in
 the whole class C, which may not really be what is wanted.
 bob.someserver.com  - this works (though haven't looked deep enough
 to see if it does sanity check on forward + reverse lookup to
 guarantee it is really the right host)
 
 The error is caused by inet_addr() returning INADDR_NONE on
 255.255.255.255 .  Using inet_aton() resolves this issue.   A patch to
 nsperm.c at around line #739 follows:
 
 *slash = '\0';
 if (inet_aton(net, ip) == 0 || inet_aton(slash+1, mask) == 0) {
 Tcl_AppendResult(interp, invalid address or hostname \,
  net, \.  should be ipaddr/netmask
 or hostname, NULL);
 goto fail;
 }
 
 Daniel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] moonshadow

2008-05-10 Thread Vlad Seryakov
What will happen if 100 threads will send commands at the same time and 
those commands will be more complicated, not just return?

Main thread will serialize them, i guess.
Does not it seems like global lock in Lua?
Will it scale the way you want it to scale?

Vasiljevic Zoran wrote:
 On 10.05.2008, at 17:50, Vasiljevic Zoran wrote:
 
  I think
 it is the most one can do with Tcl.
 
 
 Hm ... not that bad consider the
 trivialiy of the example.
 
 package req Thread
 set tp [tpool::create -initcmd {
  proc sayhello args {
  return hello-[thread::id]
  }
 }]
 
 proc unknown args {
  global tp
  set id [tpool::post $tp $args]
  tpool::wait $tp $id
  tpool::get  $tp $id
 }
 
 % time {sayhello} 100
 48 microseconds per iteration
 % sayhello
 hello-tid0xb0103000
 % thread::id
 tid0xa0111fa0
 
 As you see, unknown triggers the sayhello that is declared
 on pool threads, but not in my thread. And the execution
 time is not really bad. And this is just generic stuff.
 Done in C really tight, I can go make that 1/5 most probably.
 
 
 
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] moonshadow

2008-05-10 Thread Vlad Seryakov
You may also check out SpiderMonkey javascript. It is thread safe and 
runtime is not very big.

Vasiljevic Zoran wrote:
 On 10.05.2008, at 06:13, Andrew Piskorski wrote:
 
 On Fri, May 09, 2008 at 06:06:05PM +0200, Vasiljevic Zoran wrote:

 I saw somewhere that Lua can have global and per-thread state
 and that you can provide your own locking primitives they use
 to lock their own code, but I haven't dig deeper there...
 Damn again. This is a global lock that serializes everything.
 A no go :-(
 Same applies to others (Ruby, Phyton, Perl).
 Zoran, are you SURE?  Because from what I've read about Lua, it does
 NOT have any sort of single global lock limiting true parallelism to
 one cpu/core at a time the way Python and Ruby do.  Lua's default
 behavior is coroutines cooperatively multitasking on just a single
 cpu, but AFAIK the Lua implementation is not inherently limited to
 that.
 
 Coroutines are something similar, (purists outthere, note: _similar_)
 to Tcl event loop in terms that they work on a single processor.
 This is not real MP multithreading that we need in order to scale.
  From the programing perspective, they are indeed very interesting
 because they don't force me into the event-loop shoe. I have
 nothing against event-loop. It is just that it is really targeted to
 a GUI type of apps.
 I was greping to lua_lock calls arround the code and found mostly:
 
 something () {
lua_lock(L);
//...
lua_unlock(L);
 }
 
 OK, this must _not_ mean they are absolutely serialized, but it
 really appears to me like that on the first glance.
 What I plan to do is go to Lua developers and ask couple of
 questions...
 

 Your application clearly wants to use many thousands of stateful
 lightweight processes.  AFAIK Lua and especially Erlang both support
 that out of the box.  Do you ALSO need to run 2 or 8 or more of those
 threads in parallel (at the exact same time) on a single multi-cpu
 server?  Recent versions of Erlang definitely support that.  I'm not
 sure whether or not Lua supports that out of the box, but it may be
 feasible to make it work.
 
 Yep, Erlang is something that looks very good as well. I just stumbled
 across that yesterday.  Clever, clever... still I have to see how
 they works internally and what are the gotchas of their message-passing.
 
 Cheers
 Zoran
 
 
 
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_perm module bug fix

2008-05-10 Thread Vlad Seryakov
Added

Daniel Stasinski wrote:
 On Sat, May 10, 2008 at 12:33 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 Do you need write access to naviserver CVS?
 
 That would be great.  Thank you.
 
 Daniel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] sample config

2008-05-10 Thread Vlad Seryakov
If you want to work on that take a look on nsconf module, i tried to 
collect all config options with small description there. Could be a 
starting point for the man page.

Vasiljevic Zoran wrote:
 Hi !
 
 In the process of a spring-cleanup I wanted to attack
 the gobal sample-config.tcl file that we deliver
 with the server. The purpose of that file is obviously
 dual:
 
   o. get a config file people can start with
   o. declare and document each and every config option
 
 As it seems, we fail to meet any of those goals _really_.
 One can use this file to start the server, right, but
 thats about it. Any attempt to understand it, is not
 going to bear fruits...
 
 I will reorganize this file as follows:
 
o. write man page about the overal layout of the file
o. write man page explaining server internal parameters
o. expand man pages for each module and put explanations
   of module paramaters there
o. rewrite this file to include sample for configuring
   two virtual servers
 
 Since we now have man pages in place, logical place to
 put all possible documentation and description of options
 is there. In the config file we can put only really necessary
 stuff that is needed to startup some example configurations
 and put cross references to the documentation.
 
 Vlad already started this right by providing a minimal
 no-fuss config file for somebody that needs to pull up
 the server fast with minimal config. What we need is
 something similar to that for virtual servers in perhaps
 2 or 3 sample configurations. But we should NOT put docs
 in that files. We should write docs in man and put only
 refs to that in the config files.
 
 Any other ideas? Suggestions?
 
 Zoran
 
 
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] moonshadow

2008-05-09 Thread Vlad Seryakov
 Effectively, what I need is a upside-down of the
 Tcl model: one interp any many threads.
 Don't tell me: go shop Java. This does not compute
 (for various unrelated reasons).

You can use ns_job, you define how may Tcl interp/threads you may use 
and then just submit tasks, each task will get state and do the work.


I guess you already explored that.

 and, do why do you need all separate 1000 threads for every user, is  
 the
 requirement to be connected to all at the same time? just wondering
 
 Yes. 1000's of workstations may be connected all the time
 and over a long time. And all of them are pumping data to
 the server, mostly. Doing this in a event-loop mode is
 possible but not feasible. I must isolate everybody in a
 thread because of the potential (complex) state that each
 connection may have.

You may combine methods, like let one thread to handle several 
connections sequentially if that will work but i do not have exact 
details so i will stop now.

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns_register_adp

2008-05-09 Thread Vlad Seryakov
yes, this situation was not handled properly,
fixed in CVS

Daniel Stasinski wrote:
 While still migrating from aolserver to naviserver, I have found that
 when using ns_register_adp to register an adp that is outside of the
 page directory, naviserver returns a 500 error.  Nothing is logged.
 
 Good -- ns_register_adp GET /hellogood adp/hello.adp
 Bad -- ns_register_adp GET /hellobad /home/nsadmin/hello.adp
 
 Daniel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] moonshadow

2008-05-09 Thread Vlad Seryakov
 
 Yes. Won't work. I mean it _could_ but I need to program
 for that _extra_. Ideally, I would start 10,100,1000 threads
 each with its own small universe that actually contains
 just dark matter (nothing) whereas all the good-stuff is
 located centraly (a large mother-interpreter?).
 Ideally, all the Tcl commands would be automagically executed
 in the mother but have access to my local space (for
 uplevel and upvar and friends).

So what you need is the ability to create lightweight Tcl thread with 
minimum commands, but with couple important commands to access special 
global state or ability to submit/retrieve data from global state.
Is this correct?

But that monster thread, how do you execute in it?
Using ns_proxy or messaging, or some other way?

I guess you create regular pthread, call Tcl_CreateInterp,
register several command and execute your Tcl script.
Why do you think it is not generic enough?

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns as loadable extension

2008-05-08 Thread Vlad Seryakov
Vasiljevic Zoran wrote:
 On 07.05.2008, at 22:51, Vlad Seryakov wrote:
 
 Adding Tcl to this just makes it much more flexible and powerful but
 making binary server as Tcl package and require it to run within Tcl i
 am not sure i like.
 
 Well, it is not or-or. It is both. I would not just ditch the
 standalone version. Instead, I would create a separate wrapper
 in parallel to ns_main that loads the thing as Tcl extension
 and maniplates the config from the Tcl side (by means of new
 per-virtual-server commands or such).


Ok, i agree


 Making libnsd.so true Tcl package i would like to help though.
 
 Isn't that already done?
 You can do load lobnsd.so in a Tcl shell even today.

I know but i heard that it is not complete and some part does not work 
or something like that, i will not speculate on this...

I guess if libnsd.so would be true complete Tcl package we would not be 
discussing this :-)))

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] ns as loadable extension

2008-05-07 Thread Vlad Seryakov
Once you started the server, it is not Tcl package anymore, need nscp to 
access it.

Or i am not following?

Vasiljevic Zoran wrote:
 Hi!
 
 I believe we talked about that some time ago already.
 Does anybody have any interest in making us being a
 yet-another Tcl loadable extension? One that you could
 for example package require naviserver and then
 configure and start/manage several virtual http servers
 from within a Tcl environment/program?
 
 Here I do not think about loading the libnsd.so only.
 I mean the complete server plus modules.
 
 Cheers
 Zoran
 
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] drop CVS

2008-05-07 Thread Vlad Seryakov
One benefit i can see is not immediate and obvious but having more 
flexible source control system may attract or make it easy to handle 
access to more developers, easy to revert unneeded changes, as Stephan 
pointed, better patch control and changsets.

Yes, it will require some learning but not that much, still this is just 
source control system, using it in the-CVS-mode, as commit/update/diff, 
will be possible with any tool.

Oh, one more, it is 21st century, CVS is not part of that:-)))

Vasiljevic Zoran wrote:
 On 06.05.2008, at 01:56, Stephen Deasey wrote:
 
 I am too lazy to write that essay. You should try it out to see what
 you're missing out on.  Here's a starter:
 
 That _was_ the essay! Thanks for going to such extent to
 show me what SVN can do.
 
 I recall watching a video on YouTube with Linus Thorvalds
 
   http://www.youtube.com/watch?v=4XpnKHJAok8
 
 where he takes both CVS and SVN under heavy barrage,
 advocating for his GIT solution. As we are in the process
 of considering a repository change, I thought everybody
 should be at least informed about the other possibilities.
 
 Personally, if you guys think we will benefit from such a
 change, I will be the last one to oppose. It is just that
 I do not have much time learning something new if it isn't
 really bringing me immediate benefits (life is short and
 internet is large).
 
 Cheers
 Zoran
 
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsphp.c error

2008-05-05 Thread Vlad Seryakov
I am working on it, i think i found the problem, i use ns_strcopy but 
should use estrdup, PHP does freeing. Will test and commit, i've never 
tested PHP with basic auth before.

Stephen Deasey wrote:
 On Mon, May 5, 2008 at 5:02 AM, Daniel Stasinski [EMAIL PROTECTED] wrote:
 When using nsphp with CVS version of naviserver, the following crash occurs:

 /root/modules/nsphp/php-5.2.5/main/SAPI.c(424) : Block 0x08523200 status:
 Invalid pointer: ((thread_id=0x0001) != (expected=0xB53FFB90))
 [04/May/2008:20:58:14][27361.b53ffb90][-conn:default:0] Fatal:
 received fatal signal 11
 Aborted

 To duplicate, load a page that requires authentication, such as:
 http://something.com/nsconf.tcl and then a plain non-authenticated
 page like http://something.com/helloworld.php

 Daniel
 
 
 Here's some tips to help narrow down the cause of the crash:
 
   http://naviserver.sourceforge.net/w/Running_Tests
 
 A backtrace would be very helpful.
 
 
 So would a short test case (the auth stuff you mentioned above).  You
 could do this by loading nsphp in the naviserver/tests/test.nscfg file
 and adding a new file tests/php.test, but even better would be to add
 this to the nsphp module itself.
 
 nsphp doesn't already have the test harness set up, but you can use
 nsloopctl as an example of a module which does.
 
   http://naviserver.cvs.sourceforge.net/naviserver/modules/nsloopctl/
 
 Basically you need to cut 'n paste the test targets from the Makefile,
 copy the tests/all.tcl into place, copy the tests/config.tcl and edit,
 then add a php.test file with your single test.
 
 Send the output of 'cvs diff -u' to the list  (and your backtrace /
 bug hunting results).
 
 
 If you're uncomfortable fixing the bug someone else will take a look
 at it, but if you'd like to take a shot yourself we can guide you
 through it.
 
 
 Thanks!
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsphp.c error

2008-05-05 Thread Vlad Seryakov
Just commited the fix, tested with MediaWiki, works fine, does not crash 
on auth pages anymore.

Also, upgraded to php-5.2.6

Daniel Stasinski wrote:
 When using nsphp with CVS version of naviserver, the following crash occurs:
 
 /root/modules/nsphp/php-5.2.5/main/SAPI.c(424) : Block 0x08523200 status:
 Invalid pointer: ((thread_id=0x0001) != (expected=0xB53FFB90))
 [04/May/2008:20:58:14][27361.b53ffb90][-conn:default:0] Fatal:
 received fatal signal 11
 Aborted
 
 To duplicate, load a page that requires authentication, such as:
 http://something.com/nsconf.tcl and then a plain non-authenticated
 page like http://something.com/helloworld.php
 
 Daniel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] nsssl crash

2008-05-05 Thread Vlad Seryakov
It used to work fine but actually it was some time ago, let me load and 
check it locally, in the meantime backtrack would be helpful as well.

Daniel Stasinski wrote:
 Before I begin hunting down a crash involving nsssl from cvs, are
 there any known issues?
 
 The server loads with no errors but crashes on the first ssl page access.
 
 ns_sectionns/server/default/module/nsssl
 ns_paramport443
 ns_paramaddress 192.168.0.10
 ns_paramhostnamesecure.server.com
 ns_paramcertificate
 /home/nsadmin/naviserver/servers/www.server.com/modules/nsssl/server.pem
 ns_paramciphers
 ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
 ns_paramprotocols   SSLv2, SSLv3, TLSv1
 
 Daniel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] drop CVS

2008-05-04 Thread Vlad Seryakov
SF in general but CVS in particular, i remember offered to switch to SF 
SVN, but i could not find good enough reasons.

With CVS i know that it does not handle directories, renaming, moving 
and i do not even try to do it, contacting SF everytime to cleanup CVS 
is not very convenient either. So, at least moving to SVN will make it 
much easier to control our repository, we can still stick with SF, i am 
not insisting.

Vasiljevic Zoran wrote:
 On 03.05.2008, at 21:14, Vlad Seryakov wrote:
 
 i do not have big
 enough reason beside my not-liking Sf service.
 
 
 Just to be clear... SF supports both CVS and SVN.
 Is the SF in general that you do not like or is
 it the CVS especially?
 
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] [AOLSERVER] nsdbi database driver interface 0.1

2008-05-02 Thread Vlad Seryakov
Frankly, i would go from CVS to SVN/Mercurial/Git, whatever.
I still think SF CVS sucks, so i would switch anytime if my voice will 
need to be counted:-)))

The question i have, is freehg.org reliable and supposed to live long?
On other hand SF is very popular and search engine favorite, not that 
popularity is my big concern though.

Stephen Deasey wrote:
 (sorry for the delay)
 
 
 On Thu, Apr 17, 2008 at 3:49 PM, Vlad Seryakov [EMAIL PROTECTED] wrote:
 This is very cool,

 Can you commit it into primary Naviserver CVS?
 
 
 Hmm, I hadn't thought about it much, I just wanted to get it off my
 hard drive. But now that you mention it, it would kind of suck to move
 it out of mercurial (and I'm not even sure there's a downward
 conversion tool...)
 
 Btw. some time ago I also converted the aolserver and naviserver
 histories to mercurial.  I cleaned up the commits quite a lot so that
 logical changes appear in one changeset with comments in the right
 place in the right format, attributed to the right people etc.  I
 collapsed about 30% of the commits IIRC.
 
 I did the same for naviserver then stuck it on to the end of the
 history of aolserver 4.0.10.  So, there's now complete history going
 back 8 years which is browsable and annotatable.  Check it out:
 
 http://freehg.org/u/groks/naviserver/
 http://freehg.org/u/groks/aolserver/
 
 
 I don't want to agitate for change too strongly, but maybe it's worth
 thinking about?
 
 
 http://www.selenic.com/mercurial/wiki/
 
 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
 Don't miss this year's exciting event. There's still time to save $100. 
 Use priority code J8TL2D2. 
 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Win32 version released

2008-03-10 Thread Vlad Seryakov
SF admin page says Wiki is disabled

Bernd Eidenschink wrote:
 Pre-complied 4.99.2 version released on SF download page.
 
 Thanks Vlad!
 
 I added a link on the Wiki and deleted some spam on various pages. We should 
 consider turning of self-registration, otherwise this is only a temporary 
 fix. Maybe someone with admin-privileges on the wiki can do that?
 
 Bernd.
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Win32 version released

2008-03-09 Thread Vlad Seryakov
Pre-complied 4.99.2 version released on SF download page.

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] mingw makefile problem

2008-03-08 Thread Vlad Seryakov
Problem solved, naviserver now compiles and runs successfully under 
Windows when built using mingw compiler.

All modules work, also i tested Postgres driver, works fined as well.

I think publishing somewhere binaries for win32, this way it is very 
easy to download and test the server, just not sure where to put the archive

Vlad Seryakov wrote:
 to the makefile gurus out there, i almost pulled all my remaining hair 
 trying to figure out this:
 
 i am compailing naviserver under mingw on window, all compiles fin until 
 i get into any modules.
 
 here is the problem
 
 # cd nssock
 
 # gmake -d
 GNU Make 3.81
 Copyright (C) 2006  Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.
 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
 PARTICULAR PURPOSE.
 
 This program built for i686-pc-mingw32
 find_and_set_shell path search set default_shell = C:/msys/bin/sh.exe
 Reading makefiles...
 Reading makefile `makefile'...
 Reading makefile `../include/Makefile.build' (search path) (no ~ 
 expansion)...
 Reading makefile `../include/Makefile.module' (search path) (no ~ 
 expansion)...
 Reading makefile `../include/Makefile.global' (search path) (no ~ 
 expansion)...
 CreateProcess(C:\msys\bin\uname.exe,uname -a,...)
 Main thread handle = 0x07a0
 CreateProcess(C:\msys\bin\uname.exe,uname -a,...)
 ../include/Makefile.module:126: *** multiple target patterns.  Stop.
 
 # gmake -v
 GNU Make 3.81
 
 Makefile.module is our standard makefile, works fine under Linux.
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] mingw makefile problem

2008-03-07 Thread Vlad Seryakov
to the makefile gurus out there, i almost pulled all my remaining hair 
trying to figure out this:

i am compailing naviserver under mingw on window, all compiles fin until 
i get into any modules.

here is the problem

# cd nssock

# gmake -d
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32
find_and_set_shell path search set default_shell = C:/msys/bin/sh.exe
Reading makefiles...
Reading makefile `makefile'...
Reading makefile `../include/Makefile.build' (search path) (no ~ 
expansion)...
Reading makefile `../include/Makefile.module' (search path) (no ~ 
expansion)...
Reading makefile `../include/Makefile.global' (search path) (no ~ 
expansion)...
CreateProcess(C:\msys\bin\uname.exe,uname -a,...)
Main thread handle = 0x07a0
CreateProcess(C:\msys\bin\uname.exe,uname -a,...)
../include/Makefile.module:126: *** multiple target patterns.  Stop.

# gmake -v
GNU Make 3.81

Makefile.module is our standard makefile, works fine under Linux.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] compat

2007-12-06 Thread Vlad Seryakov
It is also not supported on Windows as well, i had to hack and replace 
%j with %lld on the fly.
I guess this is modern-Linux only vsnprintf additions.

Is it worth switching back to internal DStringPrintf? It was working fine?

Vasiljevic Zoran wrote:
 Hi
 
 I'm running on a Solaris 2.8 and %jd is not known there:
 
   len = snprintf(buf, sizeof(buf), %jd:%ld,
 
 There are handful of files which contain those. Question
 is: what is %j doing? Why do we need it?
 
 
 
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] compat

2007-12-06 Thread Vlad Seryakov
It matters because for example Windows just crashes if you specify 
invalid specifier, for example Linux supports %T but Windows does not, 
and if you specify in your c code or Tcl code %T, it will crash.
Same with %j, Windows ignores it and corrupts stack, so i had to write 
wrapper around snprintf and replace %j which is ugly. Having universal 
sprintf function like it was before takes one problem away and adding 
new specifier is not that hard thqn trying to figure out portability 
issues and chasing them for hours.


Vasiljevic Zoran wrote:
 On Dec 6, 2007, at 5:22 PM, Vlad Seryakov wrote:
 
 It is also not supported on Windows as well, i had to hack and replace
 %j with %lld on the fly.
 I guess this is modern-Linux only vsnprintf additions.

 Is it worth switching back to internal DStringPrintf? It was working  
 fine?
 
 So far:
 
Solaris 2.8   - bad
Solaris 2.10  - OK
Linux - OK
Mac OSX 10.3+ - OK
 
 It seems that this is a later addition to Unix which I was
 not aware of. If Windows does not have that either we must
 somehow automate that over the config scripts...
 
 I believe replacing with DStringPrintf will not bring anything
 as this is just the format specifier, so it does not matter
 if you use snprintf or vsnprintf or whatever.
 
 
 
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] compat

2007-12-06 Thread Vlad Seryakov
I guess this is Stephen's call

Vasiljevic Zoran wrote:
 On Dec 6, 2007, at 5:41 PM, Vlad Seryakov wrote:
 
 Having universal
 sprintf function like it was before takes one problem away and adding
 new specifier is not that hard thqn trying to figure out portability
 issues and chasing them for hours.
 
 I buy that, but this is pretty difficult to maintain, right?
 I still do not know what this %j is good for... Perhaps drop
 that altogether?
 
 
 
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] quick help

2007-12-04 Thread Vlad Seryakov
By not working what exactly happens?

I am using HEAD version with adp, no  problem and no special configuration.

do you have any errors in the log?

Vasiljevic Zoran wrote:
 Hi !
 
 I just updated our code with CVS HEAD and our ADP pages
 are not serving any more. No ADP processing tages place
 at all. Just HTML part is sent.
 What setup controls if ADP is turned on or off per server?
 
 I have something like:
 
ns_section ns/server/$server/adp
ns_param map /*.adp
 
 in the config file. Obviously this is not
 enough any more.
 
 One may wonder how come we noticed that so late?
 Simple: we really only use ADP in some corner
 cases. I happen to stumble accross one of those now.
 
 Thanks,
 Zoran
 
 
 
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] quick help

2007-12-04 Thread Vlad Seryakov
nsd.tcl is still the only place for config, it is just instead of 
hardcoding registration of callbacks for ADP in c, now they are 
registered in Tcl. That means, without config.tcl .adp files will not be 
served even if enabled in nsd.tcl.

I am not sure if this is good moving core functionality into Tcl, that 
means running just nsd binary now will not work properly without proper 
tcl/*.tcl files

Vasiljevic Zoran wrote:
 On Dec 4, 2007, at 4:18 PM, Vlad Seryakov wrote:
 
 By not working what exactly happens?
 
 Just html gets served. The adp constructs are ignored.
 But I believe I found the culprit...
 
 The file ns/tcl/config.tcl is completely new for me!
 There I see:
 
 #
 # Register ADP page handlers for GET, HEAD and POST
 # requests, if enabled.
 #
 
 proc _ns_config_server_adp_pages {server} {
 
 This means that ADP module needs to be setup
 IN ADDITION to the server configuration file.
 This is pretty obscure I would say... I will not
 argue now if this is right or wrong, as I need
 to make this work pronto. But having two places
 where something is configured is prett confusing.
 Is there some hidden/important reason why is this so?
 
 
 
 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Windows port

2007-11-09 Thread Vlad Seryakov
Also, will it make sense to have windows port similar to Tcl, just 
makefile for nmake without any Visual Studio stuff.
I would work on that as well

Vasiljevic Zoran wrote:
 On Nov 8, 2007, at 7:45 PM, Vlad Seryakov wrote:
 
  It looks like Windows port is completely broken, i tried to compile  
 it
  today without any success, too many Unix specifics and eventually it
  stopped with NOCOMPAT error about no compatible macros.

  Zoran, i thought you are required to have windows version, how do you
  compile?

 
 As for the time being, we do not. We are still at the older CVS
 version. But the time is right as we will now going to update
 that as our V3 release is just arround the corner.
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Windows port

2007-11-09 Thread Vlad Seryakov
I just compiled Tcl with MS compiler, no Visual C, no mingw.

Their makefiles are pretty clear and simple, as soon as nsd compiles i 
will make makefiles

Vasiljevic Zoran wrote:
 On Nov 9, 2007, at 4:46 PM, Vlad Seryakov wrote:
 
 Also, will it make sense to have windows port similar to Tcl, just
 makefile for nmake without any Visual Studio stuff.
 I would work on that as well
 
 Hm... actually yes. Some mingw (I think mingw is used by tcl)
 compatible build should be nice to have. We never invested
 in that as then you get issues while debugging so we just made
 the vc++ build.
 OTOH, cygwin is not something that should be used, as Tcl doesn't
 use it either.
 
 
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Windows port

2007-11-08 Thread Vlad Seryakov
  It looks like Windows port is completely broken, i tried to compile it
  today without any success, too many Unix specifics and eventually it
  stopped with NOCOMPAT error about no compatible macros.

  Zoran, i thought you are required to have windows version, how do you
  compile?




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Large file upload dilemma

2007-10-25 Thread Vlad Seryakov
Yes, that makes sense, i added ns_parsefoormfile proc tot form.tcl which 
may be called by ns_getform.

I just initially did not want to make so many changes, just to test it 
more before making transparent

Vasiljevic Zoran wrote:
 On 24.10.2007, at 18:13, Vlad Seryakov wrote:
 
 ns_conn contentfile will be non empty only in such situation, in  
 normal
 cases it is always empty
 
 
 I see something like this in tcl/form.tcl:
 
 
 #
 # ns_getform --
 #
 #   Return the connection form, copying multipart form data
 #   into temp files if necessary.
 #
 # Results:
 #   A set with form key/value pairs or empty if no form found
 #
 # Side effects:
 #   May create number of temporary files for multipart-form-data
 #   forms containing data from uploaded files. Also registers
 #   an [ns_atclose] callback to delete those file on conn close.
 #
 
 A of current, it parses the mpart formdata in distinct
 files and gives you the set with the data. To me you
 should pack the alternate method you just added herein.
 Wether the mpart form was parsed within the server or
 with the external procedure, the caller does not really
 care. He/she gets the unified interface to all cases
 without having to know the details?
 So, ideally, you should extend the ns_getform to do
 all the hidden magic of [ns_conn contentfile].
 
 Or?
 
 
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Large file upload dilemma

2007-10-25 Thread Vlad Seryakov
ok, we are testing that functionality pretty hard, with combination of 
IIS and IE/firefox to upload huge files with progess enabled. so far 
works very good.

The other reason i did not want to make it ransparent, it takes a while 
to parse 1GB file in Tcl routine, split files and copy them into temp 
files. In our case we do not want to do it immediately after the upload, 
i just keep them in staging area and later or other server will process 
them. Making ns_getform transparent will trigger parsing those files 
immediately and will kill server performance, it will consume conn 
thread parsing files just to get rid of them on conn thread exit.

When dealing with such big files may be it is better to have more 
flexibility?

Vasiljevic Zoran wrote:
 On 25.10.2007, at 18:23, Vlad Seryakov wrote:
 
 I just initially did not want to make so many changes, just to test it
 more before making transparent
 
 But don't forget to do that once you're confident
 it works.
 
 
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Large file upload dilemma

2007-10-25 Thread Vlad Seryakov
How about config option which will be on by default, whoever wants 
flexibility will need to turn it off?

Vasiljevic Zoran wrote:
 On 25.10.2007, at 18:53, Vlad Seryakov wrote:
 
 The other reason i did not want to make it ransparent, it takes a  
 while
 to parse 1GB file in Tcl routine, split files and copy them into temp
 files. In our case we do not want to do it immediately after the  
 upload,
 i just keep them in staging area and later or other server will  
 process
 them. Making ns_getform transparent will trigger parsing those files
 immediately and will kill server performance, it will consume conn
 thread parsing files just to get rid of them on conn thread exit.
 
 Understand. I still do not like that conceptually but I
 understand your point.
 
 So for multipart uploads exceeding some value you would
 basically need to do one additional step. And this you
 can decide by looking in ns_conn and checking if there
 is a file left for you.
 
 When dealing with such big files may be it is better to have more
 flexibility?
 
 True. But it is very awkward and hidden. And by being
 such, it is prone to misunderstanding.
 
 Honestly, I do not have an idea how one would make that
 more clear. OTOH, this is not written in stone so perhaps
 when we start deployment, we can figure out if this is
 sufficient or not.
 
 I will try to explain this behaviour to our web programmers
 and wee what they think about it.
 
 
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Large file upload dilemma

2007-10-23 Thread Vlad Seryakov
We are building web site which will accept uploads of very big files, 
1-2GB is average. Spooler works fine but the problem comes after the 
upload. With big number of users, all my virtual memory will be 
exhausted very quickly by mmap, and after the upload i need to copy 
those files somewhere because they are temp and deleted already.

This makes the whole spooling thing useless by its own, i think it needs 
to be extended so i can somehow tell that those urls needs to go into 
normal files, not mmaped without parsing multipart-data at all, for such 
big files, it is better to do it offline than on the web server.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Large file upload dilemma

2007-10-23 Thread Vlad Seryakov
 
 Your dilemma ist: how to specifiy that server should NOT preparse
 the uploaded multipart-data?
 

Yes, i am thinking how to make driver to spool data into regular file, 
not mmap it and just pass to the connection thread. In the conn some 
kind of command like ns_conn tempfile would return name of the file and 
in the script i have to do whatever i want.

This asks for another knob to introduce, something like max upload limit 
if greater, contents will go directly into file without parsing.

The spooler thread can still do the upload work.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Set uid/gid in Tcl

2007-10-18 Thread Vlad Seryakov
Question,

Will it be useful to have internal Tcl command for changing real uid/gid?

for example i want to start as root, prepare data, load modules and then 
in Tcl switch to non-privileged user.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-15 Thread Vlad Seryakov
The only thing which broke my old code regarding switching to vsnprintf 
is that old Ns_DStringPrintf handled empty string differently, vsnprintf 
now puts (null), before that empty string did not put anything.

I still need to review si the damage is critical enough or never upgrade 
until all code updated. That sucks

Vlad Seryakov wrote:
 Yes, works fine now, Thanks
 
 Stephen Deasey wrote:
 On 10/13/07, Vlad Seryakov [EMAIL PROTECTED] wrote:
 I was able to find the location which causes the crash but i am not sure
 how to fix it

 In function Ns_VALog i call vsnprintf directly, it works, when it is
 called via Ns_DStringVPintf it crashes. using va_copy does not help


 diff -r 22a912b584eb nsd/dstring.c
 --- a/nsd/dstring.c  Fri Oct 12 20:35:13 2007 +0100
 +++ b/nsd/dstring.c  Sat Oct 13 19:46:22 2007 +0100
 @@ -176,10 +176,11 @@ Ns_DStringPrintf(Ns_DString *dsPtr, CONS
   */

  char *
 -Ns_DStringVPrintf(Ns_DString *dsPtr, CONST char *fmt, va_list ap)
 -{
 -char *buf;
 -int   origLength, newLength, bufLength, result;
 +Ns_DStringVPrintf(Ns_DString *dsPtr, CONST char *fmt, va_list apSrc)
 +{
 +char*buf;
 +int  origLength, newLength, bufLength, result;
 +va_list  ap;

  origLength = dsPtr-length;

 @@ -205,11 +206,13 @@ Ns_DStringVPrintf(Ns_DString *dsPtr, CON
  buf = dsPtr-string + origLength;
  bufLength = newLength - origLength;

 +va_copy(ap, apSrc);
  #ifdef __WIN32
  result = _vsnprintf_s(buf, bufLength, fmt, ap);
  #else
  result = vsnprintf(buf, bufLength, fmt, ap);
  #endif
 +va_end(ap);

  /*
   * Check for overflow and retry. For win32 just double the buffer size
 @@ -229,11 +232,13 @@ Ns_DStringVPrintf(Ns_DString *dsPtr, CON
  buf = dsPtr-string + origLength;
  bufLength = newLength - origLength;

 +va_copy(ap, apSrc);
  #ifdef __WIN32
  result = _vsnprintf_s(buf, bufLength, fmt, ap);
  #else
  result = vsnprintf(buf, bufLength, fmt, ap);
  #endif
 +va_end(ap);
  }

 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-13 Thread Vlad Seryakov
When i replaced Ns_VALog with pure vfprintf it does not crash anymore, 
so it is definitely something with passing va_list.

I tried as discussed here but it still crashes:
http://osdir.com/ml/redhat.amd64/2006-12/msg1.html

void
Ns_Log(Ns_LogSeverity severity, CONST char *fmt, ...)
{
 va_list ap;

 va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
fprintf(stderr, \n);
 //Ns_VALog(severity, fmt, ap);
 va_end(ap);
}


Gustaf Neumann wrote:
 there is nothing wrong on using *va_list in general.
 the problem is rather in vsnprintf, which does most probably
 a loop like in Ns_DStringVarAppend
 
 char *
 Ns_DStringVarAppend(Ns_DString *dsPtr, ...)
 {
 register char   *s;
 va_list ap;
 
 va_start(ap, dsPtr);
 while ((s = va_arg(ap, char *)) != NULL) {
 Ns_DStringAppend(dsPtr, s);
 }
 va_end(ap);
 
 return dsPtr-string;
 }
 
 which fails, when the va_list is terminated by 0 and not (char*)NULL.
 however, this should not account for the problem with vsnprintf(),
 which should not read more arguments as indicated by the fmt string.
 You are the, the number of %-codes corresponds to the arguments?
 Is the error produced via Ns_TclLogErrorInfo() ?
 
 What happens, if you add at the end of the vararglist in the call
 causing the problem a (char*)NULL)?
 
 -gustaf neumann
 
 
  
 Vlad Seryakov schrieb:
 I use ns_log or Ns_Log, so it should take care about it, it ends up in 
 Ns_DStringPrintf which calls vsnprintf.


 Is it correct in x64 to pass *va_list?

 Ns_VALog(Ns_LogSeverity severity, CONST char *fmt, va_list *vaPtr)

 Gustaf Neumann wrote:
   
 be sure to terminate va_* argument lists with NULL (or to be on the safe 
 side
 with  (char*)NULL) and not with 0. when you have sizeof(int) != 
 sizeof(char *),
 the compiler will put a 32bit  for 0, a comparison with a 64bit null 
 pointer
 will fail. I am pretty sure, the vsnprintf()  tries to write an error 
 message
 and misses the end of the var arg list

 -gustaf neumann

 PS: fixed a similar issue in xotcl more than a year ago.

 Vlad Seryakov schrieb:
 
 Hi,

 This is an example when it crashes inside vsnprintf, experimenting i 
 found  that issuing long unknown command crashes as well. In my case i 
 noticed that trying to log long lines does not work as well. In x32 
 everything works fine

 db:vlad[18:01:19]#uname -a
 Linux db 2.6.22-ARCH #1 SMP PREEMPT Thu Oct 4 11:47:51 EDT 2007 x86_64 
 Intel(R) Xeon(R) CPU   X5355  @ 2.66GHz GenuineIntel GNU/Linux


 ossweb:nscp 1
 ossweb:nscp 1 aa

   
 
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-13 Thread Vlad Seryakov
with included old dsprintf.c it works fine

Vlad Seryakov wrote:
 I was able to find the location which causes the crash but i am not sure 
 how to fix it
 
 In function Ns_VALog i call vsnprintf directly, it works, when it is 
 called via Ns_DStringVPintf it crashes. using va_copy does not help
 
 
  {
char buf[4096];
vsnprintf(buf, sizeof(buf), fmt, *vaPtr);
Ns_DStringAppend(cachePtr-buffer, buf);
  }
  //Ns_DStringVPrintf(cachePtr-buffer, fmt, *vaPtr);
 
 
 Gustaf Neumann wrote:
 there is nothing wrong on using *va_list in general.
 the problem is rather in vsnprintf, which does most probably
 a loop like in Ns_DStringVarAppend

 char *
 Ns_DStringVarAppend(Ns_DString *dsPtr, ...)
 {
 register char   *s;
 va_list ap;

 va_start(ap, dsPtr);
 while ((s = va_arg(ap, char *)) != NULL) {
 Ns_DStringAppend(dsPtr, s);
 }
 va_end(ap);

 return dsPtr-string;
 }

 which fails, when the va_list is terminated by 0 and not (char*)NULL.
 however, this should not account for the problem with vsnprintf(),
 which should not read more arguments as indicated by the fmt string.
 You are the, the number of %-codes corresponds to the arguments?
 Is the error produced via Ns_TclLogErrorInfo() ?

 What happens, if you add at the end of the vararglist in the call
 causing the problem a (char*)NULL)?

 -gustaf neumann


  
 Vlad Seryakov schrieb:
 I use ns_log or Ns_Log, so it should take care about it, it ends up in 
 Ns_DStringPrintf which calls vsnprintf.


 Is it correct in x64 to pass *va_list?

 Ns_VALog(Ns_LogSeverity severity, CONST char *fmt, va_list *vaPtr)

 Gustaf Neumann wrote:
   
 be sure to terminate va_* argument lists with NULL (or to be on the safe 
 side
 with  (char*)NULL) and not with 0. when you have sizeof(int) != 
 sizeof(char *),
 the compiler will put a 32bit  for 0, a comparison with a 64bit null 
 pointer
 will fail. I am pretty sure, the vsnprintf()  tries to write an error 
 message
 and misses the end of the var arg list

 -gustaf neumann

 PS: fixed a similar issue in xotcl more than a year ago.

 Vlad Seryakov schrieb:
 
 Hi,

 This is an example when it crashes inside vsnprintf, experimenting i 
 found  that issuing long unknown command crashes as well. In my case i 
 noticed that trying to log long lines does not work as well. In x32 
 everything works fine

 db:vlad[18:01:19]#uname -a
 Linux db 2.6.22-ARCH #1 SMP PREEMPT Thu Oct 4 11:47:51 EDT 2007 x86_64 
 Intel(R) Xeon(R) CPU   X5355  @ 2.66GHz GenuineIntel GNU/Linux


 ossweb:nscp 1
 ossweb:nscp 1 aa

   

 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel

 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-13 Thread Vlad Seryakov
Yes, works fine now, Thanks

Stephen Deasey wrote:
 On 10/13/07, Vlad Seryakov [EMAIL PROTECTED] wrote:
 I was able to find the location which causes the crash but i am not sure
 how to fix it

 In function Ns_VALog i call vsnprintf directly, it works, when it is
 called via Ns_DStringVPintf it crashes. using va_copy does not help

 
 
 diff -r 22a912b584eb nsd/dstring.c
 --- a/nsd/dstring.c   Fri Oct 12 20:35:13 2007 +0100
 +++ b/nsd/dstring.c   Sat Oct 13 19:46:22 2007 +0100
 @@ -176,10 +176,11 @@ Ns_DStringPrintf(Ns_DString *dsPtr, CONS
   */
 
  char *
 -Ns_DStringVPrintf(Ns_DString *dsPtr, CONST char *fmt, va_list ap)
 -{
 -char *buf;
 -int   origLength, newLength, bufLength, result;
 +Ns_DStringVPrintf(Ns_DString *dsPtr, CONST char *fmt, va_list apSrc)
 +{
 +char*buf;
 +int  origLength, newLength, bufLength, result;
 +va_list  ap;
 
  origLength = dsPtr-length;
 
 @@ -205,11 +206,13 @@ Ns_DStringVPrintf(Ns_DString *dsPtr, CON
  buf = dsPtr-string + origLength;
  bufLength = newLength - origLength;
 
 +va_copy(ap, apSrc);
  #ifdef __WIN32
  result = _vsnprintf_s(buf, bufLength, fmt, ap);
  #else
  result = vsnprintf(buf, bufLength, fmt, ap);
  #endif
 +va_end(ap);
 
  /*
   * Check for overflow and retry. For win32 just double the buffer size
 @@ -229,11 +232,13 @@ Ns_DStringVPrintf(Ns_DString *dsPtr, CON
  buf = dsPtr-string + origLength;
  bufLength = newLength - origLength;
 
 +va_copy(ap, apSrc);
  #ifdef __WIN32
  result = _vsnprintf_s(buf, bufLength, fmt, ap);
  #else
  result = vsnprintf(buf, bufLength, fmt, ap);
  #endif
 +va_end(ap);
  }
 
 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now  http://get.splunk.com/
 ___
 naviserver-devel mailing list
 naviserver-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/naviserver-devel
 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


[naviserver-devel] Crash in x64 mode in Ns_Log

2007-10-12 Thread Vlad Seryakov
Hi,

This is an example when it crashes inside vsnprintf, experimenting i 
found  that issuing long unknown command crashes as well. In my case i 
noticed that trying to log long lines does not work as well. In x32 
everything works fine

db:vlad[18:01:19]#uname -a
Linux db 2.6.22-ARCH #1 SMP PREEMPT Thu Oct 4 11:47:51 EDT 2007 x86_64 
Intel(R) Xeon(R) CPU   X5355  @ 2.66GHz GenuineIntel GNU/Linux


ossweb:nscp 1
ossweb:nscp 1 aa

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


  1   2   3   4   5   >