BroadbandForum / obuspa

OB-USP-AGENT is a system daemon providing a User Services Platform (USP) Agent. https://github.com/BroadbandForum/obuspa/wiki
BSD 3-Clause "New" or "Revised" License
93 stars 62 forks source link

Compiling without UDS fails #110

Closed anderewrey closed 5 months ago

anderewrey commented 6 months ago

Hello Richard,

Building obuspa without UDS (ENABLE_UDS disabled) is not possible: the kMtpProtocol_UDS enum is not understood and others things....

/home/ajcote/scpp/repos/obuspa/src/core/msg_handler.c:1124:35: error: 'kMtpProtocol_UDS' undeclared (first use in this function); did you mean 'kMtpProtocol_Max'?
 1124 |             if (mtpc->protocol == kMtpProtocol_UDS)
      |                                   ^~~~~~~~~~~~~~~~
      |                                   kMtpProtocol_Max
/home/ajcote/scpp/repos/obuspa/src/core/msg_handler.c:1148:35: error: 'kMtpProtocol_UDS' undeclared (first use in this function); did you mean 'kMtpProtocol_Max'?
 1148 |             if (mtpc->protocol == kMtpProtocol_UDS)
      |                                   ^~~~~~~~~~~~~~~~
      |                                   kMtpProtocol_Max
In file included from /home/ajcote/scpp/repos/obuspa/src/core/common_defs.h:50,
                 from /home/ajcote/scpp/repos/obuspa/src/core/usp_service.c:45:
/home/ajcote/scpp/repos/obuspa/src/core/usp_service.c: In function 'USP_SERVICE_SetBrokerAgent':
/home/ajcote/scpp/repos/obuspa/src/core/usp_service.c:188:38: error: 'kMtpProtocol_UDS' undeclared (first use in this function); did you mean 'kMtpProtocol_Max'?
  188 |     USP_ASSERT(mtp_conn->protocol == kMtpProtocol_UDS);
      |                                      ^~~~~~~~~~~~~~~~
/home/ajcote/scpp/repos/obuspa/src/core/usp_service.c:189:24: error: 'mtp_conn_t' has no member named 'uds'
  189 |     USP_ASSERT(mtp_conn->uds.conn_id != INVALID);

and the uds.c file is not fully #IF guarded

/home/ajcote/scpp/repos/obuspa/src/core/uds.c:2316:30: error: unknown type name 'uds_connection_t'
 2316 | void InitialiseUdsConnection(uds_connection_t *uc)
      |                              ^~~~~~~~~~~~~~~~

Regards, AJC

holme-r commented 5 months ago

Closing as this is fixed in v8.0.4