* Changed the return value in HandleCompleteRegistration() in case of

not found or already completely registered applications from
  B_REG_APP_NOT_REGISTERED to B_REG_APP_NOT_PRE_REGISTERED.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-07-28 13:42:03 +00:00
parent 2ad75c74f9
commit d744dd13ab
1 changed files with 7 additions and 6 deletions

View File

@ -233,12 +233,13 @@ TRoster::HandleCompleteRegistration(BMessage *request)
if (error == B_OK) { if (error == B_OK) {
if (team >= 0) { if (team >= 0) {
// everything is fine -- set the values // everything is fine -- set the values
if (RosterAppInfo *info = fRegisteredApps.InfoFor(team)) { RosterAppInfo *info = fRegisteredApps.InfoFor(team);
if (info && info->state == APP_STATE_PRE_REGISTERED) {
info->thread = thread; info->thread = thread;
info->port = port; info->port = port;
info->state = APP_STATE_REGISTERED; info->state = APP_STATE_REGISTERED;
} else } else
SET_ERROR(error, B_REG_APP_NOT_REGISTERED); SET_ERROR(error, B_REG_APP_NOT_PRE_REGISTERED);
} else } else
SET_ERROR(error, B_BAD_VALUE); SET_ERROR(error, B_BAD_VALUE);
} }
@ -534,9 +535,9 @@ TRoster::HandleGetAppList(BMessage *request)
if (error == B_OK) { if (error == B_OK) {
BMessage reply(B_REG_SUCCESS); BMessage reply(B_REG_SUCCESS);
// get the list // get the list
for (int32 i = 0; for (AppInfoList::Iterator it(fRegisteredApps.It());
RosterAppInfo *info = fRegisteredApps.InfoAt(i); RosterAppInfo *info = *it;
i++) { ++it) {
if (!signature || !strcmp(signature, info->signature)) if (!signature || !strcmp(signature, info->signature))
reply.AddInt32("teams", info->team); reply.AddInt32("teams", info->team);
} }
@ -766,7 +767,7 @@ TRoster::_ReplyToIAPRRequest(BMessage *request, const RosterAppInfo *info)
case APP_STATE_PRE_REGISTERED: case APP_STATE_PRE_REGISTERED:
preRegistered = true; preRegistered = true;
break; break;
case APP_STATE_INVALID: case APP_STATE_UNREGISTERED:
case APP_STATE_REGISTERED: case APP_STATE_REGISTERED:
preRegistered = false; preRegistered = false;
break; break;