mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
rpc: annotate various parameters as being required to be non-NULL
The server name and client data callbacks need to be non-NULL or the system will crash at various times. This is particularly bad when some of the crashes only occur post-exec restart. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
b41780e47a
commit
9da0cc9ddb
@ -47,7 +47,8 @@ virNetServerPtr virNetServerNew(const char *name,
|
|||||||
virNetServerClientPrivNew clientPrivNew,
|
virNetServerClientPrivNew clientPrivNew,
|
||||||
virNetServerClientPrivPreExecRestart clientPrivPreExecRestart,
|
virNetServerClientPrivPreExecRestart clientPrivPreExecRestart,
|
||||||
virFreeCallback clientPrivFree,
|
virFreeCallback clientPrivFree,
|
||||||
void *clientPrivOpaque);
|
void *clientPrivOpaque)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(11) ATTRIBUTE_NONNULL(13);
|
||||||
|
|
||||||
virNetServerPtr virNetServerNewPostExecRestart(virJSONValuePtr object,
|
virNetServerPtr virNetServerNewPostExecRestart(virJSONValuePtr object,
|
||||||
const char *name,
|
const char *name,
|
||||||
@ -55,7 +56,9 @@ virNetServerPtr virNetServerNewPostExecRestart(virJSONValuePtr object,
|
|||||||
virNetServerClientPrivNewPostExecRestart clientPrivNewPostExecRestart,
|
virNetServerClientPrivNewPostExecRestart clientPrivNewPostExecRestart,
|
||||||
virNetServerClientPrivPreExecRestart clientPrivPreExecRestart,
|
virNetServerClientPrivPreExecRestart clientPrivPreExecRestart,
|
||||||
virFreeCallback clientPrivFree,
|
virFreeCallback clientPrivFree,
|
||||||
void *clientPrivOpaque);
|
void *clientPrivOpaque)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||||
|
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6);
|
||||||
|
|
||||||
void virNetServerClose(virNetServerPtr srv);
|
void virNetServerClose(virNetServerPtr srv);
|
||||||
|
|
||||||
|
@ -72,14 +72,17 @@ virNetServerClientPtr virNetServerClientNew(unsigned long long id,
|
|||||||
virNetServerClientPrivNew privNew,
|
virNetServerClientPrivNew privNew,
|
||||||
virNetServerClientPrivPreExecRestart privPreExecRestart,
|
virNetServerClientPrivPreExecRestart privPreExecRestart,
|
||||||
virFreeCallback privFree,
|
virFreeCallback privFree,
|
||||||
void *privOpaque);
|
void *privOpaque)
|
||||||
|
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(7) ATTRIBUTE_NONNULL(9);
|
||||||
|
|
||||||
virNetServerClientPtr virNetServerClientNewPostExecRestart(virNetServerPtr srv,
|
virNetServerClientPtr virNetServerClientNewPostExecRestart(virNetServerPtr srv,
|
||||||
virJSONValuePtr object,
|
virJSONValuePtr object,
|
||||||
virNetServerClientPrivNewPostExecRestart privNew,
|
virNetServerClientPrivNewPostExecRestart privNew,
|
||||||
virNetServerClientPrivPreExecRestart privPreExecRestart,
|
virNetServerClientPrivPreExecRestart privPreExecRestart,
|
||||||
virFreeCallback privFree,
|
virFreeCallback privFree,
|
||||||
void *privOpaque);
|
void *privOpaque)
|
||||||
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||||
|
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
|
||||||
|
|
||||||
virJSONValuePtr virNetServerClientPreExecRestart(virNetServerClientPtr client);
|
virJSONValuePtr virNetServerClientPreExecRestart(virNetServerClientPtr client);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user