[maemo-commits] [maemo-commits] r15414 - in projects/haf/trunk/maemo-launcher: . launcher
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Apr 16 01:35:33 EEST 2008
- Previous message: [maemo-commits] r15413 - in projects/haf/trunk/maemo-launcher: . launcher
- Next message: [maemo-commits] r15415 - in projects/haf/trunk/maemo-launcher: . launcher
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: guillem Date: 2008-04-16 01:35:32 +0300 (Wed, 16 Apr 2008) New Revision: 15414 Modified: projects/haf/trunk/maemo-launcher/ChangeLog projects/haf/trunk/maemo-launcher/launcher/comm_msg.c projects/haf/trunk/maemo-launcher/launcher/launcher.c Log: Return back status value from called functions Modified: projects/haf/trunk/maemo-launcher/ChangeLog =================================================================== --- projects/haf/trunk/maemo-launcher/ChangeLog 2008-04-15 22:35:30 UTC (rev 15413) +++ projects/haf/trunk/maemo-launcher/ChangeLog 2008-04-15 22:35:32 UTC (rev 15414) @@ -1,5 +1,16 @@ 2008-02-21 Guillem Jover <guillem.jover at nokia.com> + * launcher/launcher.c (invoked_send_pid): Return status value from + invoked_send_action. + (invoked_send_exit): Likewise. + (invoked_send_fake_exit): Return status value from invoked_send_exit. + * launcher/comm_msg.c (comm_msg_pack_int): Return status value from + comm_msg_pack_mem. + (comm_msg_pack_str): Likewise. + (comm_msg_unpack_int): Check return value from comm_msg_unpack_mem. + +2008-02-21 Guillem Jover <guillem.jover at nokia.com> + * launcher/launcher.c (invoked_send_action): New function. (invoked_send_pid): Use invoked_send_action instead of single invoke_send_msg calls. Modified: projects/haf/trunk/maemo-launcher/launcher/comm_msg.c =================================================================== --- projects/haf/trunk/maemo-launcher/launcher/comm_msg.c 2008-04-15 22:35:30 UTC (rev 15413) +++ projects/haf/trunk/maemo-launcher/launcher/comm_msg.c 2008-04-15 22:35:32 UTC (rev 15414) @@ -163,9 +163,7 @@ bool comm_msg_pack_int(comm_msg_t *msg, uint32_t i) { - comm_msg_pack_mem(msg, &i, sizeof(i)); - - return true; + return comm_msg_pack_mem(msg, &i, sizeof(i)); } bool @@ -174,6 +172,10 @@ uint32_t size, *p; p = (uint32_t *)comm_msg_unpack_mem(msg, &size); + if (!p) { + error("retrieving the integer\n"); + return false; + } if (size != sizeof(*i)) return false; @@ -188,9 +190,7 @@ { uint32_t size = strlen(str) + 1; - comm_msg_pack_mem(msg, str, size); - - return true; + return comm_msg_pack_mem(msg, str, size); } bool Modified: projects/haf/trunk/maemo-launcher/launcher/launcher.c =================================================================== --- projects/haf/trunk/maemo-launcher/launcher/launcher.c 2008-04-15 22:35:30 UTC (rev 15413) +++ projects/haf/trunk/maemo-launcher/launcher/launcher.c 2008-04-15 22:35:32 UTC (rev 15414) @@ -307,9 +307,7 @@ static bool invoked_send_pid(int fd, pid_t pid) { - invoked_send_action(fd, INVOKER_MSG_PID, pid); - - return true; + return invoked_send_action(fd, INVOKER_MSG_PID, pid); } static bool @@ -350,18 +348,14 @@ static bool invoked_send_exit(int fd, int status) { - invoked_send_action(fd, INVOKER_MSG_EXIT, status); - - return true; + return invoked_send_action(fd, INVOKER_MSG_EXIT, status); } static bool invoked_send_fake_exit(int fd) { /* Send a fake exit code, so the invoker does not wait for us. */ - invoked_send_exit(fd, 0); - - return true; + return invoked_send_exit(fd, 0); } static void
- Previous message: [maemo-commits] r15413 - in projects/haf/trunk/maemo-launcher: . launcher
- Next message: [maemo-commits] r15415 - in projects/haf/trunk/maemo-launcher: . launcher
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]