ec_message_addref

March 26, 2020 Contributors

Name

ec_message_addref — Create a reference to an existing message

Synopsis

#include "ec_message.h"

| ec_message * **ec_message_addref** ( | sm); |   |

ec_message * <var class="pdparam">sm</var>;

Description

Create a reference to an existing message.

Intended to be used when performing async processing where part of the processing would otherwise free the message while it is still in use.

Parameters

sm

A pointer to an ec_message struct (the source message). For documentation of this data structure see “ec_message”

Return Values

An ec_message pointer (the source message). You are responsible for releasing the reference via ec_message_free when you no longer need it.

Threading

It is legal to call this function in any thread.

See Also

ec_message_free