Ingore messages with exchange type altered to UNDEFINED in message() hook

This commit is contained in:
Martin Willi
2011-01-05 16:45:42 +01:00
parent 81b213499d
commit c146c3c4e1
+8
View File
@@ -897,6 +897,10 @@ METHOD(task_manager_t, process_message, status_t,
}
}
charon->bus->message(charon->bus, msg, TRUE);
if (msg->get_exchange_type(msg) == EXCHANGE_TYPE_UNDEFINED)
{ /* ignore messages altered to EXCHANGE_TYPE_UNDEFINED */
return SUCCESS;
}
if (process_request(this, msg) != SUCCESS)
{
flush(this);
@@ -938,6 +942,10 @@ METHOD(task_manager_t, process_message, status_t,
}
}
charon->bus->message(charon->bus, msg, TRUE);
if (msg->get_exchange_type(msg) == EXCHANGE_TYPE_UNDEFINED)
{ /* ignore messages altered to EXCHANGE_TYPE_UNDEFINED */
return SUCCESS;
}
if (process_response(this, msg) != SUCCESS)
{
flush(this);