1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-09-04 14:24:46 +00:00

Fix a pointer bug.

This commit is contained in:
Jiaqiang Xu
2013-11-05 16:45:10 +08:00
parent 2c3f140fcc
commit 87602806b6
3 changed files with 4 additions and 4 deletions

View File

@@ -500,7 +500,7 @@ handle_ret_common (char *data, size_t len, json_t **object, GError **error)
*object=json_loadb(data,len,0,&jerror);
if (*object == NULL) {
setjetoge(&jerror,*error);
setjetoge(&jerror,error);
json_decref (*object);
return -1;
}

View File

@@ -263,7 +263,7 @@ searpc_server_call_function (const char *svc_name,
}
array = json_loadb (func, len, 0 ,&jerror);
setjetoge(&jerror,error);
setjetoge(&jerror,&error);
if (!array) {
char buf[512];

View File

@@ -13,10 +13,10 @@ typedef enum {
json_t *json_gobject_serialize (GObject *);
GObject *json_gobject_deserialize (GType , json_t *);
inline static void setjetoge(const json_error_t *jerror, GError *error)
inline static void setjetoge(const json_error_t *jerror, GError **error)
{
/* Load is the only function I use which reports errors */
g_set_error(&error, SEARPC_JSON_DOMAIN, SEARPC_JSON_ERROR_LOAD, "%s", jerror->text);
g_set_error(error, SEARPC_JSON_DOMAIN, SEARPC_JSON_ERROR_LOAD, "%s", jerror->text);
}
inline static const char *json_object_get_string_or_null_member (json_t *object,const char *member_name)