From c6fb861d7159279b6ee4a4dd678d4693ee56bac6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Oct 2012 12:50:40 +0000 Subject: death of old nasty clutch with MS_PROTO_ENUMPROTOCOLS & PROTOACCOUNT::type git-svn-id: http://svn.miranda-ng.org/main/trunk@1799 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CrashDumper/src/dumper.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'plugins/CrashDumper/src') diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 4ff1d4722c..b1539a3658 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -322,24 +322,23 @@ struct ProtoCount static void GetProtocolStrings(bkstring& buffer) { PROTOACCOUNT **accList; - int accCount, protoCount; + int accCount; int i, j; - PROTOCOLDESCRIPTOR **protoList; - if (ProtoEnumAccounts(&accCount, &accList) == CALLSERVICE_NOTFOUND || (accCount > 0 && accList[0]->cbSize == 0)) + ProtoEnumAccounts(&accCount, &accList); + if (accCount > 0) { - CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protoCount, (LPARAM)&protoList); - for (i = 0; i < protoCount; i++) + for (i = 0; i < accCount; i++) { - if (protoList[i]->type != PROTOTYPE_PROTOCOL) continue; - TCHAR* nm; - crsi_a2t(nm, protoList[i]->szName); + crsi_a2t(nm, accList[i]->szModuleName); buffer.appendfmt(TEXT(" 1 - %s\r\n"), nm); } } else { + int protoCount; + PROTOCOLDESCRIPTOR **protoList; CallService(MS_PROTO_ENUMPROTOS, (WPARAM)&protoCount, (LPARAM)&protoList); int protoCountMy = 0; -- cgit v1.2.3