[PATCH] decouple RPC modules from get_pipe_fns()

James Peach jpeach at samba.org
Fri Jan 26 22:05:54 GMT 2007


On 26/01/2007, at 1:47 AM, Volker Lendecke wrote:

> On Thu, Jan 25, 2007 at 11:32:33PM -0800, James Peach wrote:
>> -        rpc_entry->cmds = SMB_REALLOC_ARRAY(rpc_entry->cmds,  
>> struct api_struct, rpc_entry->n_cmds + size);
>> +        rpc_entry->cmds = SMB_REALLOC_ARRAY(rpc_entry->cmds,
>> +			    struct api_struct, rpc_entry->n_cmds + ncmds);
>>  	if (!rpc_entry->cmds) {
>>  		return NT_STATUS_NO_MEMORY;
>>  	}
>> -        memcpy(rpc_entry->cmds + rpc_entry->n_cmds, cmds, size *  
>> sizeof(struct api_struct));
>> -        rpc_entry->n_cmds += size;
>> +        memcpy(rpc_entry->cmds + rpc_entry->n_cmds, cmds,
>> +		ncmds * sizeof(struct api_struct));
>> +        rpc_entry->n_cmds += ncmds;
>
> I know it's in the tree right now, but while changing this
> -- I don't see why this REALLOC/memcpy is necessary. Maybe
> we can get rid of it and point to the tables directly?

Yep, I'll be doing that next.

BTW, this patch is against 3.0.24. Volker, does the winreg pipe  
intentionally diverge between SAMBA_3_0 and SAMBA_3_0_24?


--
James Peach | jpeach at samba.org




More information about the samba-technical mailing list