~ubuntu-branches/ubuntu/precise/suricata/precise-proposed

« back to all changes in this revision

Viewing changes to src/detect-classtype.c

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2010-06-19 17:39:14 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100619173914-5vkjfgz24mbia29z
Tags: 0.9.2-1
ImportedĀ UpstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
static inline SCClassConfClasstype *DetectClasstypeGetClasstypeInfo(const char *ct_name,
132
132
                                                                    DetectEngineCtx *de_ctx)
133
133
{
134
 
    SCClassConfClasstype *ct_info = SCClassConfAllocClasstype(ct_name, NULL,
 
134
    SCClassConfClasstype *ct_info = SCClassConfAllocClasstype(0, ct_name, NULL,
135
135
                                                              0);
136
136
    SCClassConfClasstype *lookup_ct_info = HashTableLookup(de_ctx->class_conf_ht,
137
137
                                                           ct_info, 0);
171
171
 
172
172
    /* if we have retrieved the classtype, assign the message to be displayed
173
173
     * for this Signature by fast.log, if a Packet matches this Signature */
 
174
    s->class = ct->classtype_id;
174
175
    s->class_msg = ct->classtype_desc;
175
176
 
176
177
    /* if a priority keyword has appeared before the classtype, s->prio would
179
180
    if (s->prio == -1)
180
181
        s->prio = ct->priority;
181
182
 
 
183
    pcre_free_substring(parsed_ct_name);
182
184
    return 0;
183
185
 
184
186
 error:
 
187
    if (parsed_ct_name != NULL) pcre_free_substring(parsed_ct_name);
185
188
    return -1;
186
189
}
187
190