mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
Remove conn parameter from JSON error macro
This commit is contained in:
parent
9140756d30
commit
46ef463135
@ -36,8 +36,8 @@
|
|||||||
|
|
||||||
/* XXX fixme */
|
/* XXX fixme */
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
#define ReportError(conn, code, fmt...) \
|
#define virJSONError(code, fmt...) \
|
||||||
virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
|
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||||
__FUNCTION__, __LINE__, fmt)
|
__FUNCTION__, __LINE__, fmt)
|
||||||
|
|
||||||
|
|
||||||
@ -909,9 +909,9 @@ virJSONValuePtr virJSONValueFromString(const char *jsonstring)
|
|||||||
(const unsigned char*)jsonstring,
|
(const unsigned char*)jsonstring,
|
||||||
strlen(jsonstring));
|
strlen(jsonstring));
|
||||||
|
|
||||||
ReportError(NULL, VIR_ERR_INTERNAL_ERROR,
|
virJSONError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("cannot parse json %s: %s"),
|
_("cannot parse json %s: %s"),
|
||||||
jsonstring, (const char*) errstr);
|
jsonstring, (const char*) errstr);
|
||||||
VIR_FREE(errstr);
|
VIR_FREE(errstr);
|
||||||
virJSONValueFree(parser.head);
|
virJSONValueFree(parser.head);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -1034,14 +1034,14 @@ cleanup:
|
|||||||
#else
|
#else
|
||||||
virJSONValuePtr virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED)
|
virJSONValuePtr virJSONValueFromString(const char *jsonstring ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
ReportError(NULL, VIR_ERR_INTERNAL_ERROR, "%s",
|
virJSONError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("No JSON parser implementation is available"));
|
_("No JSON parser implementation is available"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
char *virJSONValueToString(virJSONValuePtr object ATTRIBUTE_UNUSED)
|
char *virJSONValueToString(virJSONValuePtr object ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
ReportError(NULL, VIR_ERR_INTERNAL_ERROR, "%s",
|
virJSONError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("No JSON parser implementation is available"));
|
_("No JSON parser implementation is available"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user