From: Ronnie Sahlberg Date: Sun, 26 Jun 2011 08:35:01 +0000 (+1000) Subject: change the portmapper structure 'mapping' to 'pmap_mapping' X-Git-Tag: upstream/1.9.6^2~374 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=870b3764acfe8b23f55b534619b9742eca4deb98;p=deb_libnfs.git change the portmapper structure 'mapping' to 'pmap_mapping' so we dont pollute the namespace when not needed --- diff --git a/portmap/portmap.c b/portmap/portmap.c index 69b8ad5..d8015d9 100644 --- a/portmap/portmap.c +++ b/portmap/portmap.c @@ -46,7 +46,7 @@ int rpc_pmap_null_async(struct rpc_context *rpc, rpc_cb cb, void *private_data) int rpc_pmap_getport_async(struct rpc_context *rpc, int program, int version, rpc_cb cb, void *private_data) { struct rpc_pdu *pdu; - struct mapping m; + struct pmap_mapping m; pdu = rpc_allocate_pdu(rpc, PMAP_PROGRAM, PMAP_V2, PMAP_GETPORT, cb, private_data, (xdrproc_t)xdr_int, sizeof(uint32_t)); if (pdu == NULL) { @@ -58,7 +58,7 @@ int rpc_pmap_getport_async(struct rpc_context *rpc, int program, int version, rp m.vers = version; m.prot = IPPROTO_TCP; m.port = 0; - if (xdr_mapping(&pdu->xdr, &m) == 0) { + if (xdr_pmap_mapping(&pdu->xdr, &m) == 0) { rpc_set_error(rpc, "XDR error: Failed to encode data for portmap/getport call"); rpc_free_pdu(rpc, pdu); return -1; diff --git a/portmap/portmap.x b/portmap/portmap.x index 819951f..d28edca 100644 --- a/portmap/portmap.x +++ b/portmap/portmap.x @@ -4,7 +4,7 @@ const PMAP_PORT = 111; /* portmapper port number */ -struct mapping { +struct pmap_mapping { unsigned int prog; unsigned int vers; unsigned int prot; @@ -29,13 +29,13 @@ program PMAP_PROGRAM { PMAP_NULL(void) = 0; bool - PMAP_SET(mapping) = 1; + PMAP_SET(pmap_mapping) = 1; bool - PMAP_UNSET(mapping) = 2; + PMAP_UNSET(pmap_mapping) = 2; unsigned int - PMAP_GETPORT(mapping) = 3; + PMAP_GETPORT(pmap_mapping) = 3; call_result PMAP_CALLIT(call_args) = 5;