create_conn_struct_tos() and connection re-use

Jeremy Allison jra at
Fri Jun 22 22:06:30 UTC 2018

On Sat, Jun 23, 2018 at 09:56:43AM +1200, Andrew Bartlett wrote:
> Well, I can't hold a talloc_stackframe() across different calls, that's
> the thing, we will need to return to python a connection object.  
> The idea is to have a call to set up a connection, and then make file
> operations in new function calls that pass in that connection.  How do
> I do that safely?
> (If I have to, I can do that, call back to python from the C with a
> function pointer, but some info on how to do plan A would help). 
> I'm asking now because I've just got the task in from the client and it
> is on-topic and top of mind right now. 

Well first do step zero, and find out if doing the connection
setup teardown is really the main cost :-).

As you're doing a specific set of operations on a specific share,
seems to me it might just be easier to create a new python
wrapper call that creates a frame, gets the service and then
does the required calls from parameters passed into it.

Why call out to python at all, just do it all in C ?


More information about the samba-technical mailing list