static void set_default_server_announce_type(void);
static void set_allowed_client_auth(void);
+static void *lp_local_ptr(struct service *service, void *ptr);
+
static const struct enum_list enum_protocol[] = {
{PROTOCOL_NT1, "NT1"},
{PROTOCOL_LANMAN2, "LANMAN2"},
}
}
+
/**
- * Free the allocated data for one parameter for a given share.
+ * Free the allocated data for one parameter for a given share
+ * specified by an snum.
*/
-static void free_parameter(int snum, struct parm_struct parm)
+static void free_one_parameter_by_snum(int snum, struct parm_struct parm)
{
void *parm_ptr;
uint32_t i;
for (i=0; parm_table[i].label; i++) {
- free_parameter(snum, parm_table[i]);
+ free_one_parameter_by_snum(snum, parm_table[i]);
}
}
bitmap_set(pservice->copymap, i);
}
+/***************************************************************************
+ Return the local pointer to a parameter given a service struct and the
+ pointer into the default structure.
+***************************************************************************/
+
+static void *lp_local_ptr(struct service *service, void *ptr)
+{
+ return (void *)(((char *)service) + PTR_DIFF(ptr, &sDefault));
+}
+
/***************************************************************************
Return the local pointer to a parameter given the service number and the
pointer into the default structure.
void *lp_local_ptr_by_snum(int snum, void *ptr)
{
- return (void *)(((char *)ServicePtrs[snum]) + PTR_DIFF(ptr, &sDefault));
+ return lp_local_ptr(ServicePtrs[snum], ptr);
}
/***************************************************************************