def _createMockServerCallFunction(self, proto, var_name):
      body = C.block(innerIndent=innerIndentDefault)
      body.append(C.line('if (%s != 0)'%(var_name)))
      inner = C.block(innerIndent=innerIndentDefault)
      fcall = C.fcall(var_name)
      for arg in proto.args:
         fcall.add_param(arg.name)
      if proto.typename != 'void':
         inner.append(C.statement('return %s'%str(fcall)))
      else:
         inner.append(C.statement(fcall))
      body.append(inner)
      if proto.typename != 'void':
         body.append(C.statement('return RTE_E_OK'))
      return body