- Remove stupid indentations from trace msgs.

- Update the rpc TODO list a bit.
- Add some constants for winapi_check.
- Nil pointer support for some UUID functions (spotted by Olivier
  Evalet).
This commit is contained in:
Greg Turner 2002-11-06 21:58:21 +00:00 committed by Alexandre Julliard
parent 36595828c3
commit b9ae9eca13
2 changed files with 20 additions and 16 deletions

View File

@ -23,6 +23,7 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "windef.h"
#include "winbase.h"
@ -111,10 +112,10 @@ RPC_STATUS RPCRT4_CreateBindingW(RpcBinding** Binding, BOOL server, LPWSTR Prots
{
RpcBinding* NewBinding;
if (Binding)
TRACE(" (*Binding == ^%p, server == %s, Protseq == \"%s\")\n", *Binding, server ? "Yes" : "No", debugstr_w(Protseq));
TRACE("(*Binding == ^%p, server == %s, Protseq == \"%s\")\n", *Binding, server ? "Yes" : "No", debugstr_w(Protseq));
else {
ERR("!RpcBinding?\n");
*((char *)0) = 0; /* we will crash below anyhow... */
assert(FALSE); /* we will crash below anyhow... */
}
NewBinding = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcBinding));
@ -131,7 +132,7 @@ RPC_STATUS RPCRT4_CreateBindingW(RpcBinding** Binding, BOOL server, LPWSTR Prots
RPC_STATUS RPCRT4_CompleteBindingA(RpcBinding* Binding, LPSTR NetworkAddr, LPSTR Endpoint, LPSTR NetworkOptions)
{
TRACE(" (RpcBinding == ^%p, NetworkAddr == \"%s\", EndPoint == \"%s\", NetworkOptions == \"%s\")\n", Binding, NetworkAddr, Endpoint, NetworkOptions);
TRACE("(RpcBinding == ^%p, NetworkAddr == \"%s\", EndPoint == \"%s\", NetworkOptions == \"%s\")\n", Binding, NetworkAddr, Endpoint, NetworkOptions);
RPCRT4_strfree(Binding->NetworkAddr);
Binding->NetworkAddr = RPCRT4_strdupA(NetworkAddr);
@ -148,7 +149,7 @@ RPC_STATUS RPCRT4_CompleteBindingA(RpcBinding* Binding, LPSTR NetworkAddr, LPST
RPC_STATUS RPCRT4_CompleteBindingW(RpcBinding* Binding, LPWSTR NetworkAddr, LPWSTR Endpoint, LPWSTR NetworkOptions)
{
TRACE(" (RpcBinding == ^%p, NetworkAddr == \"%s\", EndPoint == \"%s\", NetworkOptions == \"%s\")\n", Binding,
TRACE("(RpcBinding == ^%p, NetworkAddr == \"%s\", EndPoint == \"%s\", NetworkOptions == \"%s\")\n", Binding,
debugstr_w(NetworkAddr), debugstr_w(Endpoint), debugstr_w(NetworkOptions));
RPCRT4_strfree(Binding->NetworkAddr);
@ -173,7 +174,7 @@ RPC_STATUS RPCRT4_ResolveBinding(RpcBinding* Binding, LPSTR Endpoint)
RPC_STATUS RPCRT4_SetBindingObject(RpcBinding* Binding, UUID* ObjectUuid)
{
TRACE(" (*RpcBinding == ^%p, UUID == %s)\n", Binding, debugstr_guid(ObjectUuid));
TRACE("(*RpcBinding == ^%p, UUID == %s)\n", Binding, debugstr_guid(ObjectUuid));
if (ObjectUuid) memcpy(&Binding->ObjectUuid, ObjectUuid, sizeof(UUID));
else UuidCreateNil(&Binding->ObjectUuid);
return RPC_S_OK;
@ -183,7 +184,7 @@ RPC_STATUS RPCRT4_SpawnBinding(RpcBinding** Binding, RpcBinding* OldBinding)
{
RpcBinding* NewBinding;
if (Binding)
TRACE(" (*RpcBinding == ^%p, OldBinding == ^%p)\n", *Binding, OldBinding);
TRACE("(*RpcBinding == ^%p, OldBinding == ^%p)\n", *Binding, OldBinding);
else {
ERR("!RpcBinding?");
/* we will crash below anyhow... */
@ -355,7 +356,7 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding* Binding)
RPC_STATUS RPCRT4_CloseBinding(RpcBinding* Binding)
{
TRACE(" (Binding == ^%p)\n", Binding);
TRACE("(Binding == ^%p)\n", Binding);
if (Binding->conn) {
CancelIo(Binding->conn);
CloseHandle(Binding->conn);

View File

@ -29,11 +29,7 @@
* right now.
*
* - The server portions of the patch don't seem to be getting accepted by
* Alexandre. My guess is that once I have a working test he'll conceed to
* let this in. To implement this properly is tricky and possibly beyond my
* abilities; Ove seems to think the right way to do this is to use LPC
* (Local Procedure Call, another undocumented monster). LPC has no implementation
* in wine and is not going to be trivial to create.
* Alexandre. Instead, we are working on "rpcss.exe.so" which will replace them.
*
* - There are several different memory allocation schemes for MSRPC.
* I don't even understand what they all are yet, much less have them
@ -51,7 +47,7 @@
* up the code with conditionals like we do now.
*
* - Data marshalling: So far, only the very beginnings of an implementation
* exist in wine. NDR protocol is mostly documented, but the MS API's to
* exist in wine. NDR protocol itself is documented, but the MS API's to
* convert data-types in memory into NDR are not.
*
* - ORPC is RPC for OLE; once we have a working RPC framework, we can
@ -63,7 +59,6 @@
*
* - In-source API Documentation, at least for those functions which we have
* implemented, but preferably for everything we can document, would be nice.
* I started out being quite good about this, and ended up getting lazy.
* Some stuff is undocumented by Microsoft and we are guessing how to implement
* (in these cases we should document the behavior we implemented, or, if there
* is no implementation, at least hazard some kind of guess, and put a few
@ -77,9 +72,9 @@
*
* - Concurrency: right now I don't think (?) we handle more than one request at a time;
* we are supposed to be able to do this, and to queue requests which exceed the
* concurrency limit.
* concurrency limit. Lots of scenarios are untested.
*
* - Protocol Towers: Totally unimplemented. I don't even know what these are.
* - Protocol Towers: Totally unimplemented.... I think.
*
* - Context Handle Rundown: whatever that is.
*
@ -88,6 +83,8 @@
* - Statistics: we are supposed to be keeping various counters. we aren't.
*
* - Connectionless RPC: unimplemented.
*
* - XML RPC: Dunno if microsoft does it... but we'd might as well just for kicks.
*
* - ...? More stuff I haven't thought of. If you think of more RPC todo's drop me
* an e-mail <gmturner007@ameritech.net> or send a patch to wine-patches.
@ -501,6 +498,8 @@ unsigned short WINAPI UuidHash(UUID *uuid, RPC_STATUS *Status)
short c0 = 0, c1 = 0, x, y;
int i;
if (!uuid) data = (BYTE*)(uuid = &uuid_nil);
TRACE("(%s)\n", debugstr_guid(uuid));
for (i=0; i<sizeof(UUID); i++) {
@ -538,6 +537,8 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, LPSTR* StringUuid)
if(!(*StringUuid))
return RPC_S_OUT_OF_MEMORY;
if (!Uuid) Uuid = &uuid_nil;
sprintf(*StringUuid, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
Uuid->Data1, Uuid->Data2, Uuid->Data3,
Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],
@ -559,6 +560,8 @@ RPC_STATUS WINAPI UuidToStringW(UUID *Uuid, LPWSTR* StringUuid)
{
char buf[37];
if (!Uuid) Uuid = &uuid_nil;
sprintf(buf, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
Uuid->Data1, Uuid->Data2, Uuid->Data3,
Uuid->Data4[0], Uuid->Data4[1], Uuid->Data4[2],