OpenTP1 Version 7 Programming Reference C Language
tpunadvertise - Unadvertise a service name
Format
ANSI C, C++
#include <xatmi.h> int tpunadvertise (char *svcname) |
K&R C
#include <xatmi.h> int tpunadvertise (svcname) char *svcname; |
Description
The function tpunadvertise() allows a server to unadvertise a service that it offers. By default, a server's services are advertised when it is booted and they are unadvertised when it is shutdown.
The function tpunadvertise() removes svcname as an advertised service for the server. The argument svcname cannot be NULL or the NULL string (""). Also, svcname should be 15 characters or fewer. Longer names are accepted and truncated to 15 characters. Care should be taken such that truncated names do not match other service names.
<<Argument>>
<<svcname
Specify the name of the service.>>
Return value
tpunadvertise() returns -1 on error and sets tperrno to indicate the error condition.
Errors
Under the following conditions, tpunadvertise() fails and sets tperrno to one of the following values:
Return value | Return value (numeric) | Explanation |
---|---|---|
TPEINVAL | 4 | The argument svcname is NULL or the NULL string (""). |
TPENOENT | 6 | The argument svcname is not currently advertised by the server. |
TPEPROTO | 9 | tpunadvertise() was called in an improper context. |
TPESYSTEM | 12 | A communication resource manager system error has occurred. The exact nature of the error is determined in a product-specific manner. |
TPEOS | 7 | An operating system error has occurred. The exact nature of the error is determined in a product-specific manner. |
See also
tpadvertise().
<<Notes on use with OpenTP1>>
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.