summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/data-provider-master.spec2
-rw-r--r--src/server.c44
-rw-r--r--src/service_common.c3
3 files changed, 28 insertions, 21 deletions
diff --git a/packaging/data-provider-master.spec b/packaging/data-provider-master.spec
index 4c9b77e..17922f9 100644
--- a/packaging/data-provider-master.spec
+++ b/packaging/data-provider-master.spec
@@ -1,6 +1,6 @@
Name: data-provider-master
Summary: Master service provider for liveboxes.
-Version: 0.24.8
+Version: 0.24.9
Release: 1
Group: HomeTF/Livebox
License: Flora License
diff --git a/src/server.c b/src/server.c
index e4a2b8e..c916263 100644
--- a/src/server.c
+++ b/src/server.c
@@ -4711,9 +4711,7 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
if (ret != LB_STATUS_SUCCESS)
goto out;
- if (util_free_space(IMAGE_PATH) < MINIMUM_SPACE) {
- ret = LB_STATUS_ERROR_NO_SPACE;
- } else if (instance_pd_owner(inst)) {
+ if (instance_pd_owner(inst)) {
ret = LB_STATUS_ERROR_ALREADY;
} else if (package_pd_type(instance_package(inst)) == PD_TYPE_BUFFER) {
lazy_pd_destroyed_cb(inst);
@@ -5978,13 +5976,6 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p
goto out;
}
- if (util_free_space(IMAGE_PATH) < MINIMUM_SPACE) {
- ErrPrint("Not enough space\n");
- ret = LB_STATUS_ERROR_NO_SPACE;
- id = "";
- goto out;
- }
-
ret = validate_request(pkgname, id, &inst, &pkg);
id = "";
@@ -6124,13 +6115,6 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa
goto out;
}
- if (util_free_space(IMAGE_PATH) < MINIMUM_SPACE) {
- ErrPrint("Not enough space\n");
- ret = LB_STATUS_ERROR_NO_SPACE;
- id = "";
- goto out;
- }
-
ret = validate_request(pkgname, id, &inst, &pkg);
id = "";
if (ret != LB_STATUS_SUCCESS)
@@ -6359,6 +6343,7 @@ out:
static struct packet *service_update(pid_t pid, int handle, const struct packet *packet)
{
+ Eina_List *inst_list;
struct pkg_info *pkg;
struct packet *result;
const char *pkgname;
@@ -6395,6 +6380,31 @@ static struct packet *service_update(pid_t pid, int handle, const struct packet
goto out;
}
+ inst_list = package_instance_list(pkg);
+ if (!eina_list_count(inst_list)) {
+ ret = LB_STATUS_ERROR_NOT_EXIST;
+ DbgFree(lb_pkgname);
+ goto out;
+ }
+
+ if (id && strlen(id)) {
+ Eina_List *l;
+ struct inst_info *inst;
+
+ ret = LB_STATUS_ERROR_NOT_EXIST;
+ EINA_LIST_FOREACH(inst_list, l, inst) {
+ if (!strcmp(instance_id(inst), id)) {
+ ret = LB_STATUS_SUCCESS;
+ break;
+ }
+ }
+
+ if (ret == LB_STATUS_ERROR_NOT_EXIST) {
+ DbgFree(lb_pkgname);
+ goto out;
+ }
+ }
+
/*!
* \TODO
* Validate the update requstor.
diff --git a/src/service_common.c b/src/service_common.c
index d6d4007..2b57e56 100644
--- a/src/service_common.c
+++ b/src/service_common.c
@@ -813,14 +813,11 @@ HAPI struct service_context *tcb_svc_ctx(struct tcb *tcb)
*/
HAPI int service_common_unicast_packet(struct tcb *tcb, struct packet *packet)
{
- struct service_context *svc_ctx;
if (!tcb || !packet) {
DbgPrint("Invalid unicast: tcb[%p], packet[%p]\n", tcb, packet);
return -EINVAL;
}
- svc_ctx = tcb->svc_ctx;
-
DbgPrint("Unicast packet\n");
return secure_socket_send(tcb->fd, (void *)packet_data(packet), packet_size(packet));
}