+data-provider-master (0.3.1) unstable; urgency=low
+
+ * Git: slp/pkgs/d/data-provider-master
+ * Tag: data-provider-master_0.3.1
+
+ -- Sung-jae Park <nicesj.park@samsung.com> Tue, 12 Jun 2012 10:34:24 +0900
+
data-provider-master (0.3.0) unstable; urgency=low
* Git: slp/pkgs/d/data-provider-master
/*!
*/
extern int client_rpc_update_proxy(struct client_node *client, GDBusProxy *proxy);
-extern int client_rpc_update_conn(struct client_node *client, GDBusConnection *conn);
+extern int client_rpc_reset_proxy(struct client_node *client);
/*!
*/
extern struct client_node *client_rpc_find_by_proxy(GDBusProxy *proxy);
-extern struct client_node *client_rpc_find_by_conn(GDBusConnection *conn);
/*!
*/
extern int slave_rpc_resume_all(void);
extern int slave_rpc_ping(struct slave_node *slave);
extern int slave_rpc_update_proxy(struct slave_node *slave, GDBusProxy *proxy);
+extern int slave_rpc_reset_proxy(struct slave_node *slave);
extern void slave_rpc_clear_request_by_slave(struct slave_node *slave);
extern void slave_rpc_request_update(const char *pkgname, const char *cluster, const char *category);
Name: com.samsung.data-provider-master
Summary: Master data provider
-Version: 0.3.0
+Version: 0.3.1
Release: 1
Group: main/app
License: Samsung Proprietary License
client->faulted = 1;
client->pid = (pid_t)-1;
+ client_rpc_reset_proxy(client);
+
invoke_deactivated_cb(client);
client_destroy(client);
return 0;
client->faulted = 1;
client->pid = (pid_t)-1;
+ client_rpc_reset_proxy(client);
+
invoke_deactivated_cb(client);
client_destroy(client);
/*!
struct client_rpc {
GDBusProxy *proxy; /*!< Proxy object for this client */
- GDBusConnection *conn; /*!< Connection object for this client */
Eina_List *pending_request_list; /*!< Before making connection, this Q will be used for keeping the request packets */
struct client_node *client; /*!< client_life object */
};
return ret;
}
-int client_rpc_update_proxy(struct client_node *client, GDBusProxy *proxy)
+int client_rpc_reset_proxy(struct client_node *client)
{
struct client_rpc *rpc;
- struct packet *packet;
rpc = client_data(client, "rpc");
if (!rpc) {
return -EINVAL;
}
- if (rpc->proxy)
- DbgPrint("Proxy is overwritten\n");
-
- rpc->proxy = proxy;
-
- EINA_LIST_FREE(rpc->pending_request_list, packet) {
- push_packet(packet);
- }
-
+ rpc->proxy = NULL;
return 0;
}
-int client_rpc_update_conn(struct client_node *client, GDBusConnection *conn)
+int client_rpc_update_proxy(struct client_node *client, GDBusProxy *proxy)
{
struct client_rpc *rpc;
+ struct packet *packet;
rpc = client_data(client, "rpc");
if (!rpc) {
- ErrPrint("client has no \"rpc\" info\n");
+ ErrPrint("Client has no rpc info\n");
return -EINVAL;
}
- if (rpc->conn)
- ErrPrint("Connection is already exists, overwrite it\n");
+ if (rpc->proxy)
+ DbgPrint("Proxy is overwritten\n");
+
+ rpc->proxy = proxy;
+
+ EINA_LIST_FREE(rpc->pending_request_list, packet) {
+ push_packet(packet);
+ }
- rpc->conn = conn;
return 0;
}
g_object_unref(rpc->proxy);
rpc->proxy = NULL;
- rpc->conn = NULL;
EINA_LIST_FOREACH_SAFE(s_info.packet_list, l, n, packet) {
if (packet->client != client)
ret = client_set_data(client, "rpc", rpc);
if (ret < 0) {
+ ErrPrint("Failed to set \"rpc\" for client\n");
free(rpc);
return ret;
}
return NULL;
}
-struct client_node *client_rpc_find_by_conn(GDBusConnection *conn)
-{
- Eina_List *l;
- struct client_rpc *rpc;
-
- EINA_LIST_FOREACH(s_info.rpc_list, l, rpc) {
- if (rpc->conn != conn)
- continue;
-
- return rpc->client;
- }
-
- return NULL;
-}
-
/* End of a file */
return;
}
- client_rpc_update_conn(client, conn);
-
sender = g_dbus_method_invocation_get_sender(inv);
g_dbus_proxy_new(conn,
G_DBUS_PROXY_FLAGS_NONE,
if (aul_terminate_pid(pid) < 0)
ErrPrint("Terminate failed. pid %d\n", pid);
+ slave_rpc_reset_proxy(slave);
+
invoke_deactivate_cb(slave);
slave->state = SLAVE_PAUSED;
if (aul_terminate_pid(pid) < 0)
ErrPrint("Terminate failed, pid %d\n", pid);
+ slave_rpc_reset_proxy(slave);
+
invoke_deactivate_cb(slave);
slave->state = SLAVE_PAUSED;
slave_unref(slave);
slave->pid = (pid_t)-1;
slave->fault_count++;
+ slave_rpc_reset_proxy(slave);
invoke_deactivate_cb(slave);
slave->state = SLAVE_PAUSED;
return 0;
}
+int slave_rpc_reset_proxy(struct slave_node *slave)
+{
+ struct slave_rpc *rpc;
+
+ rpc = slave_data(slave, "rpc");
+ if (!rpc) {
+ ErrPrint("Failed to get RPC info\n");
+ return -EINVAL;
+ }
+
+ rpc->proxy = NULL;
+ return 0;
+}
+
int slave_rpc_update_proxy(struct slave_node *slave, GDBusProxy *proxy)
{
struct slave_rpc *rpc;