Skip to content

Commit

Permalink
Fixes based on Michal observations
Browse files Browse the repository at this point in the history
Signed-off-by: Cervenka Dusan <[email protected]>
  • Loading branch information
Hadatko committed Oct 12, 2023
1 parent f1b0bf3 commit eaca7a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion erpcgen/src/CGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,12 @@ string CGenerator::getFunctionServerCall(Function *fn, bool isCCall)
proto += "&";
}
}
proto += getOutputName(it);
std::string paramName = getOutputName(it);
if (paramName.empty())
{
paramName = getOutputName(fn->getParameters().getMembers()[n]);
}
proto += paramName;

if (!isLast)
{
Expand Down
4 changes: 2 additions & 2 deletions erpcgen/src/templates/cpp_client_source.template
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ using namespace std;
return{% if fn.returnValue.type.isNotVoid %} result{% endif -- isNotVoid %};
{% enddef --------------------------------------------------------------------------------- clientShimCode(fn, serverIDName, functionIDName) %}
{% for iface in group.interfaces %}
{% for cb in iface.callbacksInt %}
{% for cb in iface.callbacksInt if (count(cb.callbacks) > 1) %}

// Common function for serializing and deserializing callback functions of same type.
static {$cb.callbacksData.prototype};
{% endfor %}
{% for cb in iface.callbacksInt %}
{% for cb in iface.callbacksInt if (count(cb.callbacks) > 1) %}

// Common function for serializing and deserializing callback functions of same type.
static {$cb.callbacksData.prototype}
Expand Down
4 changes: 2 additions & 2 deletions erpcgen/src/templates/cpp_server_source.template
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ extern bool nestingDetection;
{% endif %}
{% enddef --------------------------------------------------------------------------------- serverShimCode(fn, serverIDName, functionIDName) %}
{% for iface in group.interfaces %}
{% for cb in iface.callbacksInt %}
{% for cb in iface.callbacksInt if (count(cb.callbacks) > 1) %}
// Common function for serializing and deserializing callback functions of same type.
static erpc_status_t {$iface.interfaceClassName}_{$cb.name}_shim({$iface.interfaceClassName} *m_handler, uint32_t serviceID, uint32_t functionID, {$codecClass} * codec, MessageBufferFactory *messageFactory, uint32_t sequence);
{% endfor %}
{% endfor %}
{% for iface in group.interfaces %}
{% for cb in iface.callbacksInt %}
{% for cb in iface.callbacksInt if (count(cb.callbacks) > 1) %}

// Common function for serializing and deserializing callback functions of same type.
static erpc_status_t {$iface.interfaceClassName}_{$cb.name}_shim({$iface.interfaceClassName} *m_handler, uint32_t serviceID, uint32_t functionID, {$codecClass} * codec, MessageBufferFactory *messageFactory, uint32_t sequence)
Expand Down

0 comments on commit eaca7a8

Please sign in to comment.