From bb00e2687c402f77b45ced67a392e81f8f42d92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 18 Jul 2005 07:06:21 +0000 Subject: [PATCH] MIME types and signatures are case insensitive. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13730 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/registrar/AppInfoList.cpp | 4 ++-- src/servers/registrar/RecentEntries.cpp | 4 ++-- src/servers/registrar/TRoster.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/servers/registrar/AppInfoList.cpp b/src/servers/registrar/AppInfoList.cpp index 9e6a56550e..4386a3bde4 100644 --- a/src/servers/registrar/AppInfoList.cpp +++ b/src/servers/registrar/AppInfoList.cpp @@ -1,5 +1,5 @@ //------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS +// Copyright (c) 2001-2005, Haiku // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -250,7 +250,7 @@ AppInfoList::IndexOf(const char *signature) const { if (signature) { for (int32 i = 0; RosterAppInfo *info = InfoAt(i); i++) { - if (!strcmp(info->signature, signature)) + if (!strcasecmp(info->signature, signature)) return i; } } diff --git a/src/servers/registrar/RecentEntries.cpp b/src/servers/registrar/RecentEntries.cpp index 7fd2121d00..991d653c4a 100644 --- a/src/servers/registrar/RecentEntries.cpp +++ b/src/servers/registrar/RecentEntries.cpp @@ -1,5 +1,5 @@ //------------------------------------------------------------------------------ -// Copyright (c) 2001-2002, OpenBeOS +// Copyright (c) 2001-2005, Haiku // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -199,7 +199,7 @@ RecentEntries::Get(int32 maxCount, const char *fileTypes[], int32 fileTypesCount char type[B_MIME_TYPE_LENGTH]; if (GetTypeForRef(&(*item)->ref, type) == B_OK) { for (int i = 0; i < fileTypesCount; i++) { - if (strcmp(type, fileTypes[i]) == 0) { + if (strcasecmp(type, fileTypes[i]) == 0) { match = true; break; } diff --git a/src/servers/registrar/TRoster.cpp b/src/servers/registrar/TRoster.cpp index 9e55af01aa..7ab17bdfa0 100644 --- a/src/servers/registrar/TRoster.cpp +++ b/src/servers/registrar/TRoster.cpp @@ -678,7 +678,7 @@ TRoster::HandleGetAppList(BMessage *request) for (AppInfoList::Iterator it(fRegisteredApps.It()); RosterAppInfo *info = *it; ++it) { - if (!signature || !strcmp(signature, info->signature)) + if (!signature || !strcasecmp(signature, info->signature)) reply.AddInt32("teams", info->team); } request->SendReply(&reply);