[haiku-commits] haiku: hrev53308 - src/servers/registrar

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 28 Jul 2019 08:21:31 -0400 (EDT)

hrev53308 adds 1 changeset to branch 'master'
old head: b70baf6c5ef672aca57660448d2e6b6826ee3d30
new head: bed5fd2984066d539932c4c0d03288442750af2f
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=bed5fd298406+%5Eb70baf6c5ef6

----------------------------------------------------------------------------

bed5fd298406: TRoster: fix always false condition, again.
  
  Change-Id: I5f43a9c60c329dbce5ab1344692877a538053af9
  Reviewed-on: https://review.haiku-os.org/c/1653
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53308
Commit:      bed5fd2984066d539932c4c0d03288442750af2f
URL:         https://git.haiku-os.org/haiku/commit/?id=bed5fd298406
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun Jul 28 07:37:25 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun Jul 28 12:21:19 2019 UTC

----------------------------------------------------------------------------

1 file changed, 10 insertions(+), 17 deletions(-)
src/servers/registrar/TRoster.cpp | 27 ++++++++++-----------------

----------------------------------------------------------------------------

diff --git a/src/servers/registrar/TRoster.cpp 
b/src/servers/registrar/TRoster.cpp
index d5a2cba4cb..6aad904ef1 100644
--- a/src/servers/registrar/TRoster.cpp
+++ b/src/servers/registrar/TRoster.cpp
@@ -728,30 +728,23 @@ TRoster::HandleGetAppList(BMessage* request)
 
        BAutolock _(fLock);
 
-       status_t error = B_OK;
        // get the parameters
        const char* signature;
        if (request->FindString("signature", &signature) != B_OK)
                signature = NULL;
 
        // reply to the request
-       if (error == B_OK) {
-               BMessage reply(B_REG_SUCCESS);
-               // get the list
-               for (AppInfoList::Iterator it(fRegisteredApps.It());
-                        RosterAppInfo* info = *it;
-                        ++it) {
-                       if (info->state != APP_STATE_REGISTERED)
-                               continue;
-                       if (!signature || !strcasecmp(signature, 
info->signature))
-                               reply.AddInt32("teams", info->team);
-               }
-               request->SendReply(&reply);
-       } else {
-               BMessage reply(B_REG_ERROR);
-               reply.AddInt32("error", error);
-               request->SendReply(&reply);
+       BMessage reply(B_REG_SUCCESS);
+       // get the list
+       for (AppInfoList::Iterator it(fRegisteredApps.It());
+                RosterAppInfo* info = *it;
+                ++it) {
+               if (info->state != APP_STATE_REGISTERED)
+                       continue;
+               if (signature == NULL || strcasecmp(signature, info->signature) 
== 0)
+                       reply.AddInt32("teams", info->team);
        }
+       request->SendReply(&reply);
 
        FUNCTION_END();
 }


Other related posts:

  • » [haiku-commits] haiku: hrev53308 - src/servers/registrar - waddlesplash