mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
r24717: Some more easy bool conversions, update TODO for registry
(This used to be commit fc8771fb6a
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
f93a18eeb7
commit
ed8d04ead9
@ -1,5 +0,0 @@
|
|||||||
The following things still need to be fixed before this branch
|
|
||||||
can be merged:
|
|
||||||
- RPC-WINREG
|
|
||||||
- tests for diff functionality
|
|
||||||
- test for classname and last_mod_time being kept
|
|
@ -199,7 +199,7 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_NATIVE_ICONV
|
#ifdef HAVE_NATIVE_ICONV
|
||||||
if ((!from || !to) && !lp_parm_bool(-1, "iconv", "native", True)) {
|
if ((!from || !to) && !lp_parm_bool(-1, "iconv", "native", true)) {
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
if (!from) {
|
if (!from) {
|
||||||
|
@ -167,7 +167,7 @@ _PUBLIC_ bool next_token(const char **ptr,char *buff, const char *sep, size_t bu
|
|||||||
size_t len=1;
|
size_t len=1;
|
||||||
|
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return(False);
|
return false;
|
||||||
|
|
||||||
s = *ptr;
|
s = *ptr;
|
||||||
|
|
||||||
@ -180,11 +180,11 @@ _PUBLIC_ bool next_token(const char **ptr,char *buff, const char *sep, size_t bu
|
|||||||
s++;
|
s++;
|
||||||
|
|
||||||
/* nothing left? */
|
/* nothing left? */
|
||||||
if (! *s)
|
if (!*s)
|
||||||
return(False);
|
return false;
|
||||||
|
|
||||||
/* copy over the token */
|
/* copy over the token */
|
||||||
for (quoted = False; len < bufsize && *s && (quoted || !strchr_m(sep,*s)); s++) {
|
for (quoted = false; len < bufsize && *s && (quoted || !strchr_m(sep,*s)); s++) {
|
||||||
if (*s == '\"') {
|
if (*s == '\"') {
|
||||||
quoted = !quoted;
|
quoted = !quoted;
|
||||||
} else {
|
} else {
|
||||||
@ -196,7 +196,7 @@ _PUBLIC_ bool next_token(const char **ptr,char *buff, const char *sep, size_t bu
|
|||||||
*ptr = (*s) ? s+1 : s;
|
*ptr = (*s) ? s+1 : s;
|
||||||
*buff = 0;
|
*buff = 0;
|
||||||
|
|
||||||
return(True);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -259,9 +259,9 @@ _PUBLIC_ bool strequal_w(const char *s1, const char *s2)
|
|||||||
_PUBLIC_ bool strcsequal_w(const char *s1,const char *s2)
|
_PUBLIC_ bool strcsequal_w(const char *s1,const char *s2)
|
||||||
{
|
{
|
||||||
if (s1 == s2)
|
if (s1 == s2)
|
||||||
return(True);
|
return true;
|
||||||
if (!s1 || !s2)
|
if (!s1 || !s2)
|
||||||
return(False);
|
return false;
|
||||||
|
|
||||||
return strcmp(s1,s2) == 0;
|
return strcmp(s1,s2) == 0;
|
||||||
}
|
}
|
||||||
@ -442,11 +442,11 @@ _PUBLIC_ bool strhaslower(const char *string)
|
|||||||
t = toupper_w(s);
|
t = toupper_w(s);
|
||||||
|
|
||||||
if (s != t) {
|
if (s != t) {
|
||||||
return True; /* that means it has lower case chars */
|
return true; /* that means it has lower case chars */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -465,11 +465,11 @@ _PUBLIC_ bool strhasupper(const char *string)
|
|||||||
t = tolower_w(s);
|
t = tolower_w(s);
|
||||||
|
|
||||||
if (s != t) {
|
if (s != t) {
|
||||||
return True; /* that means it has upper case chars */
|
return true; /* that means it has upper case chars */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return False;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -588,7 +588,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* it needs to be non blocking for sends */
|
/* it needs to be non blocking for sends */
|
||||||
set_blocking(socket_get_fd(msg->sock), False);
|
set_blocking(socket_get_fd(msg->sock), false);
|
||||||
|
|
||||||
msg->event.ev = talloc_reference(msg, ev);
|
msg->event.ev = talloc_reference(msg, ev);
|
||||||
msg->event.fde = event_add_fd(ev, msg, socket_get_fd(msg->sock),
|
msg->event.fde = event_add_fd(ev, msg, socket_get_fd(msg->sock),
|
||||||
@ -676,7 +676,7 @@ static void irpc_handler_reply(struct messaging_context *msg_ctx, struct irpc_me
|
|||||||
} else {
|
} else {
|
||||||
talloc_steal(irpc, m);
|
talloc_steal(irpc, m);
|
||||||
}
|
}
|
||||||
irpc->done = True;
|
irpc->done = true;
|
||||||
if (irpc->async.fn) {
|
if (irpc->async.fn) {
|
||||||
irpc->async.fn(irpc);
|
irpc->async.fn(irpc);
|
||||||
}
|
}
|
||||||
@ -752,7 +752,7 @@ static void irpc_handler_request(struct messaging_context *msg_ctx,
|
|||||||
|
|
||||||
/* make the call */
|
/* make the call */
|
||||||
m->private = i->private;
|
m->private = i->private;
|
||||||
m->defer_reply = False;
|
m->defer_reply = false;
|
||||||
m->msg_ctx = msg_ctx;
|
m->msg_ctx = msg_ctx;
|
||||||
m->irpc = i;
|
m->irpc = i;
|
||||||
m->data = r;
|
m->data = r;
|
||||||
@ -831,7 +831,7 @@ static void irpc_timeout(struct event_context *ev, struct timed_event *te,
|
|||||||
{
|
{
|
||||||
struct irpc_request *irpc = talloc_get_type(private, struct irpc_request);
|
struct irpc_request *irpc = talloc_get_type(private, struct irpc_request);
|
||||||
irpc->status = NT_STATUS_IO_TIMEOUT;
|
irpc->status = NT_STATUS_IO_TIMEOUT;
|
||||||
irpc->done = True;
|
irpc->done = true;
|
||||||
if (irpc->async.fn) {
|
if (irpc->async.fn) {
|
||||||
irpc->async.fn(irpc);
|
irpc->async.fn(irpc);
|
||||||
}
|
}
|
||||||
@ -861,10 +861,10 @@ struct irpc_request *irpc_call_send(struct messaging_context *msg_ctx,
|
|||||||
irpc->callid = idr_get_new(msg_ctx->idr, irpc, UINT16_MAX);
|
irpc->callid = idr_get_new(msg_ctx->idr, irpc, UINT16_MAX);
|
||||||
if (irpc->callid == -1) goto failed;
|
if (irpc->callid == -1) goto failed;
|
||||||
irpc->r = r;
|
irpc->r = r;
|
||||||
irpc->done = False;
|
irpc->done = false;
|
||||||
irpc->async.fn = NULL;
|
irpc->async.fn = NULL;
|
||||||
irpc->mem_ctx = ctx;
|
irpc->mem_ctx = ctx;
|
||||||
irpc->reject_free = False;
|
irpc->reject_free = false;
|
||||||
|
|
||||||
talloc_set_destructor(irpc, irpc_destructor);
|
talloc_set_destructor(irpc, irpc_destructor);
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
BOOL ret = True;
|
bool ret = true;
|
||||||
poptContext pc;
|
poptContext pc;
|
||||||
struct poptOption long_options[] = {
|
struct poptOption long_options[] = {
|
||||||
POPT_AUTOHELP
|
POPT_AUTOHELP
|
||||||
|
@ -1,34 +1,5 @@
|
|||||||
- ..\..\, \bla\blie support in regshell
|
- ..\..\, \bla\blie support in regshell
|
||||||
- finish rpc_server
|
- finish rpc_server
|
||||||
|
|
||||||
reg_backend_dir:
|
|
||||||
- value support
|
|
||||||
|
|
||||||
reg_backend_creg.c:
|
|
||||||
- write support
|
|
||||||
|
|
||||||
reg_backend_regf:
|
|
||||||
- write support
|
|
||||||
|
|
||||||
reg_backend_rpc:
|
|
||||||
- value enum support
|
|
||||||
- write support
|
|
||||||
- rewrite
|
|
||||||
|
|
||||||
reg_backend_ldb:
|
|
||||||
- finish
|
|
||||||
|
|
||||||
reg_backend_wine.c:
|
|
||||||
- finish
|
|
||||||
|
|
||||||
regshell:
|
regshell:
|
||||||
- support for security descriptors
|
- support for security descriptors
|
||||||
|
|
||||||
gregedit.c:
|
|
||||||
- support for editing values / adding values / deleting values
|
|
||||||
- support for adding/deleting keys
|
|
||||||
- support for security descriptors
|
|
||||||
|
|
||||||
- pass parsed paths around rather than strings (i.e. just a list of strings)
|
|
||||||
- integrate various registry tools ?
|
|
||||||
- finish new patchfile code
|
|
||||||
|
@ -227,7 +227,7 @@ static NTSTATUS $name\__op_init_server(struct dcesrv_context *dce_ctx, const str
|
|||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL $name\__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
|
static bool $name\__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
|
||||||
{
|
{
|
||||||
if (dcesrv_$name\_interface.syntax_id.if_version == if_version &&
|
if (dcesrv_$name\_interface.syntax_id.if_version == if_version &&
|
||||||
GUID_equal(\&dcesrv\_$name\_interface.syntax_id.uuid, uuid)) {
|
GUID_equal(\&dcesrv\_$name\_interface.syntax_id.uuid, uuid)) {
|
||||||
@ -238,7 +238,7 @@ static BOOL $name\__op_interface_by_uuid(struct dcesrv_interface *iface, const s
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL $name\__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
|
static bool $name\__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
|
||||||
{
|
{
|
||||||
if (strcmp(dcesrv_$name\_interface.name, name)==0) {
|
if (strcmp(dcesrv_$name\_interface.name, name)==0) {
|
||||||
memcpy(iface, &dcesrv_$name\_interface, sizeof(*iface));
|
memcpy(iface, &dcesrv_$name\_interface, sizeof(*iface));
|
||||||
|
Reference in New Issue
Block a user