resmgr_attach arguments ?

Are arguments passed to resmgr_attach (io_func, connect_func, etc) can be
delete/destroy
after a call to resmgr_attach? Does resmgr_attach makes an internal copy?

  • Mario

Mario Charest <mcharest@zinformatic.com> wrote:


Are arguments passed to resmgr_attach (io_func, connect_func, etc) can be
delete/destroy
after a call to resmgr_attach? Does resmgr_attach makes an internal copy?

int resmgr_attach
( dispatch_t * dpp, /* ptr copied /
resmgr_attr_t * attr, /
structure copied /
const char * path, /
path stored /
enum _file_type file_type, /
integer argument /
unsigned flags, /
integer argument /
const resmgr_connect_funcs_t * connect_funcs, /
ptr copied /
const resmgr_io_funcs_t * io_funcs, /
ptr copied /
RESMGR_HANDLE_T * handle ); /
ptr copied */

So the answer is that you can delete/destroy only the
resmgr_attr_t structure, and the path. All others
(the function call back tables, the handle if you want
the dispatch pointer) should be persistant for the
life of the connection.

Just a reminder that our libc CVS repository is online:

http://cvs.qnx.com/cgi-bin/cvsweb.cgi/nto/libc/dispatch/resmgr.c

Thomas

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf

<thomasf@qnx.com> wrote in message news:9g54ap$t5q$2@nntp.qnx.com

Mario Charest <> mcharest@zinformatic.com> > wrote:


Are arguments passed to resmgr_attach (io_func, connect_func, etc) can
be
delete/destroy
after a call to resmgr_attach? Does resmgr_attach makes an internal
copy?


int resmgr_attach
( dispatch_t * dpp, /* ptr copied /
resmgr_attr_t * attr, /
structure copied /
const char * path, /
path stored /
enum _file_type file_type, /
integer argument /
unsigned flags, /
integer argument /
const resmgr_connect_funcs_t * connect_funcs, /
ptr copied /
const resmgr_io_funcs_t * io_funcs, /
ptr copied /
RESMGR_HANDLE_T * handle ); /
ptr copied */

So the answer is that you can delete/destroy only the
resmgr_attr_t structure, and the path. All others
(the function call back tables, the handle if you want
the dispatch pointer) should be persistant for the
life of the connection.

Just a reminder that our libc CVS repository is online:

http://cvs.qnx.com/cgi-bin/cvsweb.cgi/nto/libc/dispatch/resmgr.c

Great!!! I looked for it but never though of looking in libc :wink:


Thomas

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com > Neutrino Development Group
(613)-591-0931 > http://www.qnx.com/~thomasf