Now the quit command prints the error code, when constructing the messenger to the app failed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@578 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -174,9 +174,10 @@ public:
|
|||||||
// send a B_QUIT_REQUESTED message to each team
|
// send a B_QUIT_REQUESTED message to each team
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
team_id team = (team_id)teamList.ItemAt(i);
|
team_id team = (team_id)teamList.ItemAt(i);
|
||||||
BMessenger messenger(NULL, team);
|
status_t error = B_OK;
|
||||||
|
BMessenger messenger(NULL, team, &error);
|
||||||
if (messenger.IsValid()) {
|
if (messenger.IsValid()) {
|
||||||
status_t error = messenger.SendMessage(B_QUIT_REQUESTED);
|
error = messenger.SendMessage(B_QUIT_REQUESTED);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
printf("quit: failed to deliver the B_QUIT_REQUESTED "
|
printf("quit: failed to deliver the B_QUIT_REQUESTED "
|
||||||
"message to team %ld\n", team);
|
"message to team %ld\n", team);
|
||||||
@@ -185,6 +186,7 @@ public:
|
|||||||
} else {
|
} else {
|
||||||
printf("quit: failed to create a messenger for team %ld\n",
|
printf("quit: failed to create a messenger for team %ld\n",
|
||||||
team);
|
team);
|
||||||
|
printf(" %s\n", strerror(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user