static GList *__client_list = NULL;
static Ecore_Timer *g_connect_timer = NULL;
+static bool g_connected = false;
static bool connect_service();
{
char *sender = NULL;
+ if (!g_connected) {
+ LOGW("Not connected to autofill service");
+ return 0;
+ }
+
if (!svc_rpc_h) {
- LOGW("Not initialized");
+ LOGW("RPC port for autofill service is not created");
return 0;
}
char *sender = NULL;
char *view_id = NULL;
+ if (!g_connected) {
+ LOGW("Not connected to autofill service");
+ return 0;
+ }
+
if (!svc_rpc_h) {
- LOGW("Not initialized");
+ LOGW("RPC port for autofill service is not created");
return 0;
}
char *sender = NULL;
char *view_id = NULL;
+ if (!g_connected) {
+ LOGW("Not connected to autofill service");
+ return 0;
+ }
+
if (!svc_rpc_h) {
- LOGW("Not initialized");
+ LOGW("RPC port for autofill service is not created");
return 0;
}
int r = rpc_port_proxy_AutofillSvcPort_invoke_Register(h, auth_info_cb_h, fill_response_received_cb_h, error_info_cb_h);
if (r != 0)
LOGD("Failed to invoke Register");
+
+ g_connected = true;
}
static Eina_Bool connect_timer_cb(void *data)
error_info_cb_h = NULL;
}
+ g_connected = false;
+
// try to connect again
if (!connect_service()) {
if (g_connect_timer)
};
if (svc_rpc_h) {
+ LOGI("connecting..\n");
+ return true;
+ }
+
+ if (g_connected) {
LOGI("already connected\n");
return true;
}
}
if (ret != RPC_PORT_ERROR_NONE) {
- LOGW("Failed to create rpc port. err = %#x", ret);
+ LOGW("Failed to create rpc port. error code: %#x, message: %s", ret, get_error_message(ret));
free(active_autofill_service_id);
return false;
}
free(active_autofill_service_id);
ret = rpc_port_proxy_AutofillSvcPort_connect(svc_rpc_h);
if (ret != RPC_PORT_ERROR_NONE) {
- LOGW("Failed to connect. err = %#x", ret);
+ LOGW("Failed to connect. error code: %#x, message: %s", ret, get_error_message(ret));
return false;
}