[gnome-pilot/dbus] Don't pass GNOME_Pilot_SysInfo into pilot-link. Use struct SysInfo. Fixes segfault when using the w
- From: Matthew Charles Davey <mcdavey src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-pilot/dbus] Don't pass GNOME_Pilot_SysInfo into pilot-link. Use struct SysInfo. Fixes segfault when using the w
- Date: Thu, 1 Jul 2010 08:37:25 +0000 (UTC)
commit eba0303760c5a54ec4b984357533041b5f9f979b
Author: Matt Davey <mcdavey mrao cam ac uk>
Date: Thu Jul 1 09:27:44 2010 +0100
Don't pass GNOME_Pilot_SysInfo into pilot-link. Use struct SysInfo.
Fixes segfault when using the wizard.
gpilotd/gnome-pilot-client.gob | 2 +-
gpilotd/gpilot-daemon.c | 18 +++++++++---------
gpilotd/gpilot-daemon.h | 2 +-
gpilotd/manager.c | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gpilotd/gnome-pilot-client.gob b/gpilotd/gnome-pilot-client.gob
index e9b76b5..c640b00 100644
--- a/gpilotd/gnome-pilot-client.gob
+++ b/gpilotd/gnome-pilot-client.gob
@@ -296,7 +296,7 @@ class Gnome:Pilot:Client from Gtk:Object {
user.userID = uid;
user.username = g_strdup (username);
- g_message ("Get signal 'Connected' pilot_id=%s, userid=%d, username=%s", pilot_id, user.userID, user.username);
+ g_message ("Get signal 'Connected' pilot_id=%s, userid=%lu, username=%s", pilot_id, user.userID, user.username);
self_pilot_connect (self, pilot_id, &user);
g_free (user.username);
diff --git a/gpilotd/gpilot-daemon.c b/gpilotd/gpilot-daemon.c
index a390e1f..baa3d83 100644
--- a/gpilotd/gpilot-daemon.c
+++ b/gpilotd/gpilot-daemon.c
@@ -703,7 +703,7 @@ gpilot_attempt_restore (struct PilotUser pu,
GPilotDevice *device,
GPilotContext *context)
{
- GNOME_Pilot_SysInfo sysinfo;
+ struct SysInfo sysinfo;
struct CardInfo cardinfo;
GPilotPilot *pilot = NULL;
GList *iterator;
@@ -818,7 +818,7 @@ do_cradle_events (int pfd,
dbus_notify_completion (&req);
break;
case GREQ_GET_SYSINFO: {
- GNOME_Pilot_SysInfo sysinfo;
+ struct SysInfo sysinfo;
struct CardInfo cardinfo;
dlp_ReadStorageInfo (pfd, 0, &cardinfo);
@@ -1134,7 +1134,7 @@ sync_device (GPilotDevice *device, GPilotContext *context)
GPilotPilot *pilot;
int connect_error;
struct PilotUser pu;
- GNOME_Pilot_SysInfo ps;
+ struct SysInfo ps;
int pfd;
g_assert (context != NULL);
@@ -1761,7 +1761,7 @@ gpilot_daemon_request_install (GpilotDaemon *daemon,
ret = FALSE;
priv = daemon->priv;
- LOG (("request_install(pilot_name=%s (%d),filename=%s,survival=%d,timeout=%d)",
+ LOG (("request_install(pilot_name=%s (%d),filename=%s,survival=%d,timeout=%lu)",
pilot_name,
pilot_id_from_name (pilot_name, priv->gpilotd_context),
filename,
@@ -1826,7 +1826,7 @@ gpilot_daemon_request_restore (GpilotDaemon *daemon,
ret = FALSE;
priv = daemon->priv;
- LOG (("request_restore(pilot_name=%s (%d), directory=%s,survival=%d,timeout=%d)",
+ LOG (("request_restore(pilot_name=%s (%d), directory=%s,survival=%d,timeout=%lu)",
pilot_name,
pilot_id_from_name (pilot_name, priv->gpilotd_context),
directory,
@@ -1981,7 +1981,7 @@ gpilot_daemon_get_system_info (GpilotDaemon *daemon,
ret = FALSE;
priv = daemon->priv;
- LOG (("get_system_info(cradle=%s,survival=%d,timeout=%d)",
+ LOG (("get_system_info(cradle=%s,survival=%d,timeout=%lu)",
cradle, survival, timeout));
req.type = GREQ_GET_SYSINFO;
@@ -1992,7 +1992,7 @@ gpilot_daemon_get_system_info (GpilotDaemon *daemon,
*handle = gpc_queue_store_request (req);
ret = TRUE;
- out:
+
return ret;
}
@@ -2108,7 +2108,7 @@ gpilot_daemon_get_pilot_ids (GpilotDaemon *daemon,
for(i=0; i < g_list_length (l); i++) {
GPilotPilot *pilot = GPILOT_PILOT (g_list_nth (l, i)->data);
- g_ptr_array_add (*pilots, (pilot->pilot_id));
+ g_ptr_array_add (*pilots, GINT_TO_POINTER (pilot->pilot_id));
}
return TRUE;
@@ -2566,7 +2566,7 @@ dbus_notify_userinfo (struct PilotUser user_info,
void
dbus_notify_sysinfo (const gchar *pilot_id,
- GNOME_Pilot_SysInfo sysinfo,
+ struct SysInfo sysinfo,
struct CardInfo cardinfo,
GPilotRequest **req)
{
diff --git a/gpilotd/gpilot-daemon.h b/gpilotd/gpilot-daemon.h
index 0ebe234..777bf21 100644
--- a/gpilotd/gpilot-daemon.h
+++ b/gpilotd/gpilot-daemon.h
@@ -280,7 +280,7 @@ void dbus_notify_completion (GPilotRequest **req);
void dbus_notify_userinfo (struct PilotUser user_info,
GPilotRequest **req);
void dbus_notify_sysinfo (const gchar *pilot_id,
- GNOME_Pilot_SysInfo sysinfo,
+ struct SysInfo sysinfo,
struct CardInfo cardinfo,
GPilotRequest **req);
diff --git a/gpilotd/manager.c b/gpilotd/manager.c
index 60017c9..b7958e6 100644
--- a/gpilotd/manager.c
+++ b/gpilotd/manager.c
@@ -676,7 +676,7 @@ gpilot_load_conduits (GPilotContext *context,
conduit_name = g_key_file_get_string_list (kfile, "General", "conduits", &cnt, NULL);
g_key_file_free (kfile);
- g_message (_("Instantiating %d conduits..."), cnt);
+ g_message (_("Instantiating %d conduits..."), (gint) cnt);
for (i = 0;i<cnt ;i++) {
gint err;
manager = gnome_pilot_conduit_management_new (conduit_name[i], GNOME_PILOT_CONDUIT_MGMT_ID);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]