[Harbour] Re: hbnetio / rpc filter

2010-01-13 Thread Angel Pais
Przemysław Czerpak escribió: STATIC FUNCTION MYRPC_FILTER( sFuncSym, ... ) STATIC s_hLegal := { "DATE"=>, "TIME"=> } IF sFuncSym:name $ s_hLegal RETURN sFuncSym:exec( ... ) ENDIF RETURN "<>" Would this also work ? STATIC FUNCTION MYRPC_FILTER( sFuncSym, ... ) sFuncSym :=

[Harbour] Re: hbnetio / rpc filter

2010-01-13 Thread Angel Pais
Mindaugas Kavaliauskas escribió: sFuncSym is symbol (but not a string), and I expect RTE on: 'rpc_' + sFuncSym I guess it should be changed to: sFuncSym := __DYNSN2SYM('rpc_' + sFuncSym:name ) Thank you Mindaugas ___ Harbour mailing list (attach

[Harbour] Re: hbnetio / rpc filter

2010-01-13 Thread Angel Pais
Przemysław Czerpak escribió: One small thing. Before MYRPC_FILTER() is called NETIO_SERVER() checks if given function exists. If not then it returns to client NETIO_ERR_NOT_EXISTS error code. It means that if you create function RPC_MYFUNC() and client request to execute MYFUNC() then MYRPC_FILT

Re: [Harbour] Re: hbnetio / rpc filter

2010-01-13 Thread Mindaugas Kavaliauskas
Hi, Would this also work ? STATIC FUNCTION MYRPC_FILTER( sFuncSym, ... ) sFuncSym := 'rpc_'+sFuncSym IF IsFunction(sFuncSym) RETURN sFuncSym:exec( ... ) ENDIF RETURN "<>" So all you have to do to enable a function to be remotely callable is name it beginnign with 'rpc_'

Re: [Harbour] Re: hbnetio / rpc filter

2010-01-13 Thread Przemysław Czerpak
On Wed, 13 Jan 2010, Angel Pais wrote: Hi, > >STATIC FUNCTION MYRPC_FILTER( sFuncSym, ... ) > > STATIC s_hLegal := { "DATE"=>, "TIME"=> } > > IF sFuncSym:name $ s_hLegal > > RETURN sFuncSym:exec( ... ) > > ENDIF > > RETURN "<>" > Would this also work ? > STATIC FUNCTION MYRPC_FILTER