Skip to content

Commit

Permalink
unit-test: Fix broken build due to old API drop changes
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Nov 4, 2023
1 parent b572272 commit f7a913e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doc/api/control-panel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Device lifecycle management
.. doxygenstruct:: osdp_pd_info_t
:members:

.. doxygenfunction:: osdp_cp_setup2
.. doxygenfunction:: osdp_cp_setup

.. doxygenfunction:: osdp_cp_refresh

Expand Down
2 changes: 1 addition & 1 deletion doc/api/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Miscellaneous
Debugging and Diagnostics
-------------------------

.. doxygenfunction:: osdp_logger_init3
.. doxygenfunction:: osdp_logger_init

.. doxygenfunction:: osdp_get_version

Expand Down
4 changes: 2 additions & 2 deletions doc/libosdp/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ Log Level
LibOSDP supports different logging levels with ``LOG_DEBUG`` being the most
verbose mode. When asking for help, please set the log level to ``LOG_DEBUG``.

This can be done by calling osdp_logger_init3() BEFORE calling osdp_cp/pd_setup()
This can be done by calling osdp_logger_init() BEFORE calling osdp_cp/pd_setup()
as,

.. code:: c
osdp_logger_init3("osdp::cp", LOG_DEBUG, uart_puts);
osdp_logger_init("osdp::cp", LOG_DEBUG, uart_puts);
Packet Trace Builds
-------------------
Expand Down
4 changes: 2 additions & 2 deletions osdpctl/archive/cmd_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ int cmd_handler_start(int argc, char *argv[], void *data)
info->scbk = NULL;
}

osdp_logger_init3("osdp::cp", c->log_level, NULL);
osdp_logger_init("osdp::cp", c->log_level, NULL);

if (c->mode == CONFIG_MODE_CP) {
c->cp_ctx = osdp_cp_setup2(c->num_pd, info_arr);
c->cp_ctx = osdp_cp_setup(c->num_pd, info_arr);
if (c->cp_ctx == NULL) {
printf("Failed to setup CP context\n");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit-tests/test-cp-fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ int test_cp_fsm_setup(struct test *t)
.channel.flush = NULL,
.scbk = NULL,
};
osdp_logger_init3("osdp::cp", t->loglevel, NULL);
struct osdp *ctx = (struct osdp *)osdp_cp_setup2(1, &info);
osdp_logger_init("osdp::cp", t->loglevel, NULL);
struct osdp *ctx = (struct osdp *)osdp_cp_setup(1, &info);
if (ctx == NULL) {
printf(" init failed!\n");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit-tests/test-cp-phy-fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ int test_cp_phy_fsm_setup(struct test *t)
.channel.flush = NULL,
.scbk = NULL,
};
osdp_logger_init3("osdp::cp", t->loglevel, NULL);
struct osdp *ctx = (struct osdp *)osdp_cp_setup2(1, &info);
osdp_logger_init("osdp::cp", t->loglevel, NULL);
struct osdp *ctx = (struct osdp *)osdp_cp_setup(1, &info);
if (ctx == NULL) {
printf(" init failed!\n");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit-tests/test-cp-phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ int test_cp_phy_setup(struct test *t)
.channel.flush = NULL,
.scbk = NULL,
};
osdp_logger_init3("osdp::cp", t->loglevel, NULL);
struct osdp *ctx = (struct osdp *)osdp_cp_setup2(1, &info);
osdp_logger_init("osdp::cp", t->loglevel, NULL);
struct osdp *ctx = (struct osdp *)osdp_cp_setup(1, &info);
if (ctx == NULL) {
printf(SUB_1 "init failed!\n");
return -1;
Expand Down
4 changes: 2 additions & 2 deletions tests/unit-tests/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ int test_mock_pd_receive(void *data, uint8_t *buf, int len)

int test_setup_devices(struct test *t, osdp_t **cp, osdp_t **pd)
{
osdp_logger_init3("osdp", t->loglevel, NULL);
osdp_logger_init("osdp", t->loglevel, NULL);

uint8_t scbk[16] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
Expand All @@ -213,7 +213,7 @@ int test_setup_devices(struct test *t, osdp_t **cp, osdp_t **pd)
.scbk = scbk,
};

*cp = osdp_cp_setup2(1, &info_cp);
*cp = osdp_cp_setup(1, &info_cp);
if (*cp == NULL) {
printf(" cp init failed!\n");
return -1;
Expand Down

0 comments on commit f7a913e

Please sign in to comment.