projects
/
platform
/
framework
/
web
/
livebox-viewer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sync with the private repository
[platform/framework/web/livebox-viewer.git]
/
src
/
master_rpc.c
diff --git
a/src/master_rpc.c
b/src/master_rpc.c
index
d3b68e1
..
0cb0e21
100644
(file)
--- a/
src/master_rpc.c
+++ b/
src/master_rpc.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 201
2
Samsung Electronics Co., Ltd
+ * Copyright 201
3
Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Flora License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-24,6
+24,7
@@
#include <packet.h>
#include <com-core_packet.h>
#include <packet.h>
#include <com-core_packet.h>
+#include <livebox-errno.h>
#include "debug.h"
#include "dlist.h"
#include "debug.h"
#include "dlist.h"
@@
-169,7
+170,7
@@
static int done_cb(pid_t pid, int handle, const struct packet *packet, void *dat
if (packet_get(packet, "i", &ret) != 1) {
ErrPrint("Invalid result packet\n");
if (packet_get(packet, "i", &ret) != 1) {
ErrPrint("Invalid result packet\n");
- ret =
-EINVAL
;
+ ret =
LB_STATUS_ERROR_INVALID
;
}
DbgPrint("[%s] Returns: %d\n", packet_command(packet), ret);
}
DbgPrint("[%s] Returns: %d\n", packet_command(packet), ret);
@@
-199,11
+200,8
@@
int master_rpc_async_request(struct livebox *handler, struct packet *packet, int
command = create_command(handler, packet);
if (!command) {
ErrPrint("Failed to create a command\n");
command = create_command(handler, packet);
if (!command) {
ErrPrint("Failed to create a command\n");
- if (ret_cb)
- ret_cb(handler, NULL, data);
-
packet_unref(packet);
packet_unref(packet);
- return
-E
FAULT;
+ return
LB_STATUS_ERROR_
FAULT;
}
command->ret_cb = ret_cb;
}
command->ret_cb = ret_cb;
@@
-217,7
+215,7
@@
int master_rpc_async_request(struct livebox *handler, struct packet *packet, int
push_command(command);
packet_unref(packet);
push_command(command);
packet_unref(packet);
- return
0
;
+ return
LB_STATUS_SUCCESS
;
}
int master_rpc_request_only(struct livebox *handler, struct packet *packet)
}
int master_rpc_request_only(struct livebox *handler, struct packet *packet)
@@
-228,7
+226,7
@@
int master_rpc_request_only(struct livebox *handler, struct packet *packet)
if (!command) {
ErrPrint("Failed to create a command\n");
packet_unref(packet);
if (!command) {
ErrPrint("Failed to create a command\n");
packet_unref(packet);
- return
-E
FAULT;
+ return
LB_STATUS_ERROR_
FAULT;
}
command->ret_cb = NULL;
}
command->ret_cb = NULL;
@@
-238,7
+236,7
@@
int master_rpc_request_only(struct livebox *handler, struct packet *packet)
push_command(command);
packet_unref(packet);
push_command(command);
packet_unref(packet);
- return
0
;
+ return
LB_STATUS_SUCCESS
;
}
int master_rpc_clear_fault_package(const char *pkgname)
}
int master_rpc_clear_fault_package(const char *pkgname)
@@
-248,7
+246,7
@@
int master_rpc_clear_fault_package(const char *pkgname)
struct command *command;
if (!pkgname)
struct command *command;
if (!pkgname)
- return
-EINVAL
;
+ return
LB_STATUS_ERROR_INVALID
;
DbgPrint("Clear requests of the fault package(%s)\n", pkgname);
DbgPrint("Clear requests of the fault package(%s)\n", pkgname);
@@
-297,13
+295,13
@@
int master_rpc_sync_request(struct packet *packet)
if (result) {
if (packet_get(result, "i", &ret) != 1) {
ErrPrint("Invalid result packet\n");
if (result) {
if (packet_get(result, "i", &ret) != 1) {
ErrPrint("Invalid result packet\n");
- ret =
-EINVAL
;
+ ret =
LB_STATUS_ERROR_INVALID
;
}
packet_unref(result);
} else {
ErrPrint("Failed to send a sync request\n");
}
packet_unref(result);
} else {
ErrPrint("Failed to send a sync request\n");
- ret =
-E
FAULT;
+ ret =
LB_STATUS_ERROR_
FAULT;
}
packet_unref(packet);
}
packet_unref(packet);