On 06/23/2010 11:13 AM, Nikola Pajkovsky wrote:
On 06/23/2010 11:02 AM, Karel Klic wrote:
> On 06/22/2010 10:27 PM, Jiri Moskovcak wrote:
>> This patch hopefully fixes rhbz#606917, run tested.
>>
>> Please review,
>> Jirka
>>
>
> > + /*try to find analyzer:component first*/
> > + /* +2 because of \0 and ':' */
> > + char *analyzer_component =
> (char*)xzalloc(strlen(pAnalyzer)+strlen(pComponent)+2);
> > + strcat(analyzer_component,pAnalyzer);
> > + analyzer_component[strlen(analyzer_component)] = ':';
> > + strcat(analyzer_component,pComponent);
> > + map_analyzer_actions_and_reporters_t::iterator analyzer = >
> s_mapAnalyzerActionsAndReporters.find(analyzer_component);
>
> We use package name instead of component name for the same purpose on
> other places (in CLI, in Report function in MiddleWare.cpp, in GUI).
>
> The component name is the name of SRPM, whereas the package name is the
> name of the RPM.
you're right, changed to use the package name
instead of this machinery
+ char *analyzer_component =
(char*)xzalloc(strlen(pAnalyzer)+strlen(pComponent)+2);
+ strcat(analyzer_component,pAnalyzer);
+ analyzer_component[strlen(analyzer_component)] = ':';
+ strcat(analyzer_component,pComponent);
use
char *analyzer_component = xasprintf("%s:%s", pAnalyzer, pComponent);
fixed
J.