libosdp 3.0.4__tar.gz → 3.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. {libosdp-3.0.4 → libosdp-3.0.6}/PKG-INFO +1 -1
  2. {libosdp-3.0.4 → libosdp-3.0.6}/libosdp.egg-info/PKG-INFO +1 -1
  3. {libosdp-3.0.4 → libosdp-3.0.6}/setup.py +1 -1
  4. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/include/osdp.h +64 -29
  5. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_common.c +7 -2
  6. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_config.h +4 -4
  7. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_pd.c +4 -4
  8. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_phy.c +3 -2
  9. {libosdp-3.0.4 → libosdp-3.0.6}/MANIFEST.in +0 -0
  10. {libosdp-3.0.4 → libosdp-3.0.6}/README.md +0 -0
  11. {libosdp-3.0.4 → libosdp-3.0.6}/libosdp.egg-info/SOURCES.txt +0 -0
  12. {libosdp-3.0.4 → libosdp-3.0.6}/libosdp.egg-info/dependency_links.txt +0 -0
  13. {libosdp-3.0.4 → libosdp-3.0.6}/libosdp.egg-info/top_level.txt +0 -0
  14. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/__init__.py +0 -0
  15. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/channel.py +0 -0
  16. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/constants.py +0 -0
  17. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/control_panel.py +0 -0
  18. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/helpers.py +0 -0
  19. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/key_store.py +0 -0
  20. {libosdp-3.0.4 → libosdp-3.0.6}/osdp/peripheral_device.py +0 -0
  21. {libosdp-3.0.4 → libosdp-3.0.6}/pyproject.toml +0 -0
  22. {libosdp-3.0.4 → libosdp-3.0.6}/setup.cfg +0 -0
  23. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/base.c +0 -0
  24. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/cp.c +0 -0
  25. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/data.c +0 -0
  26. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/module.c +0 -0
  27. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/module.h +0 -0
  28. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/pd.c +0 -0
  29. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/python/osdp_sys/utils.c +0 -0
  30. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/crypto/tinyaes.c +0 -0
  31. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/crypto/tinyaes_src.c +0 -0
  32. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/crypto/tinyaes_src.h +0 -0
  33. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_common.h +0 -0
  34. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_cp.c +0 -0
  35. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_export.h +0 -0
  36. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_file.c +0 -0
  37. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_file.h +0 -0
  38. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_pcap.c +0 -0
  39. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_pcap.h +0 -0
  40. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/src/osdp_sc.c +0 -0
  41. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/assert.h +0 -0
  42. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/disjoint_set.h +0 -0
  43. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/list.h +0 -0
  44. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/logger.h +0 -0
  45. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/pcap_gen.h +0 -0
  46. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/queue.h +0 -0
  47. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/slab.h +0 -0
  48. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/include/utils/utils.h +0 -0
  49. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/disjoint_set.c +0 -0
  50. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/list.c +0 -0
  51. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/logger.c +0 -0
  52. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/pcap_gen.c +0 -0
  53. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/queue.c +0 -0
  54. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/slab.c +0 -0
  55. {libosdp-3.0.4 → libosdp-3.0.6}/vendor/utils/src/utils.c +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libosdp
3
- Version: 3.0.4
3
+ Version: 3.0.6
4
4
  Summary: Library implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol)
5
5
  Home-page: https://github.com/goToMain/libosdp
6
6
  Author: Siddharth Chandrasekaran
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: libosdp
3
- Version: 3.0.4
3
+ Version: 3.0.6
4
4
  Summary: Library implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol)
5
5
  Home-page: https://github.com/goToMain/libosdp
6
6
  Author: Siddharth Chandrasekaran
@@ -11,7 +11,7 @@ import shutil
11
11
  import subprocess
12
12
 
13
13
  project_name = "libosdp"
14
- project_version = "3.0.4"
14
+ project_version = "3.0.6"
15
15
  current_dir = os.path.dirname(os.path.realpath(__file__))
16
16
  repo_root = os.path.realpath(os.path.join(current_dir, ".."))
17
17
 
@@ -14,6 +14,7 @@
14
14
 
15
15
  #include <stdint.h>
16
16
  #include <stdbool.h>
17
+ #include <osdp_export.h>
17
18
 
18
19
  #ifdef __cplusplus
19
20
  extern "C" {
@@ -368,14 +369,19 @@ enum osdp_status_report_type {
368
369
  *
369
370
  * This can is used by the PD to indicate various status change reports. Upto a
370
371
  * maximum of 32 statuses can be reported using this API.
371
- *
372
- * @param type The kind of event to report see `enum osdp_event_status_type_e`
373
- * @param nr_entries Number of valid bits in `status`
374
- * @param status Status bit mask
375
372
  */
376
373
  struct osdp_status_report {
374
+ /**
375
+ * The kind of event to report see `enum osdp_event_status_type_e`
376
+ */
377
377
  enum osdp_status_report_type type;
378
+ /**
379
+ * Number of valid bits in `status`
380
+ */
378
381
  int nr_entries;
382
+ /**
383
+ * Status bit mask
384
+ */
379
385
  uint32_t mask;
380
386
  };
381
387
 
@@ -391,21 +397,26 @@ struct osdp_status_report {
391
397
 
392
398
  /**
393
399
  * @brief Command sent from CP to Control digital output of PD.
394
- *
395
- * @param output_no 0 = First Output, 1 = Second Output, etc.
396
- * @param control_code One of the following:
397
- * 0 - NOP – do not alter this output
398
- * 1 - set the permanent state to OFF, abort timed operation (if any)
399
- * 2 - set the permanent state to ON, abort timed operation (if any)
400
- * 3 - set the permanent state to OFF, allow timed operation to complete
401
- * 4 - set the permanent state to ON, allow timed operation to complete
402
- * 5 - set the temporary state to ON, resume perm state on timeout
403
- * 6 - set the temporary state to OFF, resume permanent state on timeout
404
- * @param timer_count Time in units of 100 ms
405
400
  */
406
401
  struct osdp_cmd_output {
402
+ /**
403
+ * 0 = First Output, 1 = Second Output, etc.
404
+ */
407
405
  uint8_t output_no;
406
+ /**
407
+ * One of the following:
408
+ * 0 - NOP – do not alter this output
409
+ * 1 - set the permanent state to OFF, abort timed operation (if any)
410
+ * 2 - set the permanent state to ON, abort timed operation (if any)
411
+ * 3 - set the permanent state to OFF, allow timed operation to complete
412
+ * 4 - set the permanent state to ON, allow timed operation to complete
413
+ * 5 - set the temporary state to ON, resume perm state on timeout
414
+ * 6 - set the temporary state to OFF, resume permanent state on timeout
415
+ */
408
416
  uint8_t control_code;
417
+ /**
418
+ * Time in units of 100 ms
419
+ */
409
420
  uint16_t timer_count;
410
421
  };
411
422
 
@@ -573,11 +584,6 @@ struct osdp_cmd_comset {
573
584
 
574
585
  /**
575
586
  * @brief This command transfers an encryption key from the CP to a PD.
576
- *
577
- * @param type Type of keys:
578
- * - 0x01 – Secure Channel Base Key
579
- * @param length Number of bytes of key data - (Key Length in bits + 7) / 8
580
- * @param data Key data
581
587
  */
582
588
  struct osdp_cmd_keyset {
583
589
  /**
@@ -597,17 +603,23 @@ struct osdp_cmd_keyset {
597
603
 
598
604
  /**
599
605
  * @brief Manufacturer Specific Commands
600
- *
601
- * @param vendor_code 3-byte IEEE assigned OUI. Most Significant 8-bits are
602
- * unused.
603
- * @param command 1-byte manufacturer defined osdp command
604
- * @param length Length of command data (optional)
605
- * @param data Command data (optional)
606
606
  */
607
607
  struct osdp_cmd_mfg {
608
+ /**
609
+ * 3-byte IEEE assigned OUI. Most Significant 8-bits are unused
610
+ */
608
611
  uint32_t vendor_code;
612
+ /**
613
+ * 1-byte manufacturer defined osdp command
614
+ */
609
615
  uint8_t command;
616
+ /**
617
+ * length Length of command data (optional)
618
+ */
610
619
  uint8_t length;
620
+ /**
621
+ * Command data (optional)
622
+ */
611
623
  uint8_t data[OSDP_CMD_MFG_MAX_DATALEN];
612
624
  };
613
625
 
@@ -842,6 +854,7 @@ typedef int (*cp_event_callback_t)(void *arg, int pd, struct osdp_event *ev);
842
854
  * @retval OSDP Context on success
843
855
  * @retval NULL on errors
844
856
  */
857
+ OSDP_EXPORT
845
858
  osdp_t *osdp_pd_setup(const osdp_pd_info_t *info);
846
859
 
847
860
  /**
@@ -850,6 +863,7 @@ osdp_t *osdp_pd_setup(const osdp_pd_info_t *info);
850
863
  *
851
864
  * @param ctx OSDP context
852
865
  */
866
+ OSDP_EXPORT
853
867
  void osdp_pd_refresh(osdp_t *ctx);
854
868
 
855
869
  /**
@@ -858,6 +872,7 @@ void osdp_pd_refresh(osdp_t *ctx);
858
872
  *
859
873
  * @param ctx OSDP context
860
874
  */
875
+ OSDP_EXPORT
861
876
  void osdp_pd_teardown(osdp_t *ctx);
862
877
 
863
878
  /**
@@ -867,6 +882,7 @@ void osdp_pd_teardown(osdp_t *ctx);
867
882
  * @param cap pointer to array of cap (`struct osdp_pd_cap`) terminated by a
868
883
  * capability with cap->function_code set to 0.
869
884
  */
885
+ OSDP_EXPORT
870
886
  void osdp_pd_set_capabilities(osdp_t *ctx, const struct osdp_pd_cap *cap);
871
887
 
872
888
  /**
@@ -877,6 +893,7 @@ void osdp_pd_set_capabilities(osdp_t *ctx, const struct osdp_pd_cap *cap);
877
893
  * @param cb The callback function's pointer
878
894
  * @param arg A pointer that will be passed as the first argument of `cb`
879
895
  */
896
+ OSDP_EXPORT
880
897
  void osdp_pd_set_command_callback(osdp_t *ctx, pd_command_callback_t cb,
881
898
  void *arg);
882
899
 
@@ -890,6 +907,7 @@ void osdp_pd_set_command_callback(osdp_t *ctx, pd_command_callback_t cb,
890
907
  * @retval 0 on success
891
908
  * @retval -1 on failure
892
909
  */
910
+ OSDP_EXPORT
893
911
  int osdp_pd_notify_event(osdp_t *ctx, const struct osdp_event *event);
894
912
 
895
913
  /**
@@ -898,6 +916,7 @@ int osdp_pd_notify_event(osdp_t *ctx, const struct osdp_event *event);
898
916
  * @param ctx OSDP context
899
917
  * @return int Count of events dequeued.
900
918
  */
919
+ OSDP_EXPORT
901
920
  int osdp_pd_flush_events(osdp_t *ctx);
902
921
 
903
922
  /* ------------------------------- */
@@ -916,6 +935,7 @@ int osdp_pd_flush_events(osdp_t *ctx);
916
935
  * @retval OSDP Context on success
917
936
  * @retval NULL on errors
918
937
  */
938
+ OSDP_EXPORT
919
939
  osdp_t *osdp_cp_setup(int num_pd, const osdp_pd_info_t *info);
920
940
 
921
941
  /**
@@ -924,6 +944,7 @@ osdp_t *osdp_cp_setup(int num_pd, const osdp_pd_info_t *info);
924
944
  *
925
945
  * @param ctx OSDP context
926
946
  */
947
+ OSDP_EXPORT
927
948
  void osdp_cp_refresh(osdp_t *ctx);
928
949
 
929
950
  /**
@@ -932,6 +953,7 @@ void osdp_cp_refresh(osdp_t *ctx);
932
953
  *
933
954
  * @param ctx OSDP context
934
955
  */
956
+ OSDP_EXPORT
935
957
  void osdp_cp_teardown(osdp_t *ctx);
936
958
 
937
959
  /**
@@ -948,6 +970,7 @@ void osdp_cp_teardown(osdp_t *ctx);
948
970
  * @note This method only adds the command on to a particular PD's command
949
971
  * queue. The command itself can fail due to various reasons.
950
972
  */
973
+ OSDP_EXPORT
951
974
  int osdp_cp_send_command(osdp_t *ctx, int pd, const struct osdp_cmd *cmd);
952
975
 
953
976
  /**
@@ -958,6 +981,7 @@ int osdp_cp_send_command(osdp_t *ctx, int pd, const struct osdp_cmd *cmd);
958
981
  * osdp_cp_setup()
959
982
  * @return int Count of events dequeued
960
983
  */
984
+ OSDP_EXPORT
961
985
  int osdp_cp_flush_commands(osdp_t *ctx, int pd);
962
986
 
963
987
  /**
@@ -974,6 +998,7 @@ int osdp_cp_flush_commands(osdp_t *ctx, int pd);
974
998
  * @retval 0 on success
975
999
  * @retval -1 on failure
976
1000
  */
1001
+ OSDP_EXPORT
977
1002
  int osdp_cp_get_pd_id(const osdp_t *ctx, int pd, struct osdp_pd_id *id);
978
1003
 
979
1004
  /**
@@ -990,6 +1015,7 @@ int osdp_cp_get_pd_id(const osdp_t *ctx, int pd, struct osdp_pd_id *id);
990
1015
  * @retval 0 on success
991
1016
  * @retval -1 on failure
992
1017
  */
1018
+ OSDP_EXPORT
993
1019
  int osdp_cp_get_capability(const osdp_t *ctx, int pd, struct osdp_pd_cap *cap);
994
1020
 
995
1021
  /**
@@ -1000,6 +1026,7 @@ int osdp_cp_get_capability(const osdp_t *ctx, int pd, struct osdp_pd_cap *cap);
1000
1026
  * @param cb The callback function's pointer
1001
1027
  * @param arg A pointer that will be passed as the first argument of `cb`
1002
1028
  */
1029
+ OSDP_EXPORT
1003
1030
  void osdp_cp_set_event_callback(osdp_t *ctx, cp_event_callback_t cb, void *arg);
1004
1031
 
1005
1032
  /**
@@ -1018,6 +1045,7 @@ void osdp_cp_set_event_callback(osdp_t *ctx, cp_event_callback_t cb, void *arg);
1018
1045
  * @note It doesn't make sense to call some initialization time flags during
1019
1046
  * runtime. This method is for dynamic flags that can be turned on/off at runtime.
1020
1047
  */
1048
+ OSDP_EXPORT
1021
1049
  int osdp_cp_modify_flag(osdp_t *ctx, int pd, uint32_t flags, bool do_set);
1022
1050
 
1023
1051
  /* ------------------------------- */
@@ -1075,6 +1103,7 @@ typedef void (*osdp_log_callback_fn_t)(int log_level, const char *file,
1075
1103
  * Note: This function has to be called before osdp_{cp,pd}_setup(). Otherwise
1076
1104
  * it will be ignored.
1077
1105
  */
1106
+ OSDP_EXPORT
1078
1107
  void osdp_logger_init(const char *name, int log_level,
1079
1108
  osdp_log_puts_fn_t puts_fn);
1080
1109
 
@@ -1090,6 +1119,7 @@ void osdp_logger_init(const char *name, int log_level,
1090
1119
  * @note This function has to be called before osdp_{cp,pd}_setup(). Otherwise
1091
1120
  * it will be ignored.
1092
1121
  */
1122
+ OSDP_EXPORT
1093
1123
  void osdp_set_log_callback(osdp_log_callback_fn_t cb);
1094
1124
 
1095
1125
  /**
@@ -1097,6 +1127,7 @@ void osdp_set_log_callback(osdp_log_callback_fn_t cb);
1097
1127
  *
1098
1128
  * @retval version string
1099
1129
  */
1130
+ OSDP_EXPORT
1100
1131
  const char *osdp_get_version();
1101
1132
 
1102
1133
  /**
@@ -1106,6 +1137,7 @@ const char *osdp_get_version();
1106
1137
  *
1107
1138
  * @retval source identifier string
1108
1139
  */
1140
+ OSDP_EXPORT
1109
1141
  const char *osdp_get_source_info();
1110
1142
 
1111
1143
  /**
@@ -1115,6 +1147,7 @@ const char *osdp_get_source_info();
1115
1147
  * @param bitmask pointer to an array of bytes. must be as large as
1116
1148
  * (num_pds + 7 / 8).
1117
1149
  */
1150
+ OSDP_EXPORT
1118
1151
  void osdp_get_status_mask(const osdp_t *ctx, uint8_t *bitmask);
1119
1152
 
1120
1153
  /**
@@ -1125,6 +1158,7 @@ void osdp_get_status_mask(const osdp_t *ctx, uint8_t *bitmask);
1125
1158
  * @param bitmask pointer to an array of bytes. must be as large as
1126
1159
  * (num_pds + 7 / 8).
1127
1160
  */
1161
+ OSDP_EXPORT
1128
1162
  void osdp_get_sc_status_mask(const osdp_t *ctx, uint8_t *bitmask);
1129
1163
 
1130
1164
  /**
@@ -1219,7 +1253,8 @@ struct osdp_file_ops {
1219
1253
  *
1220
1254
  * @retval 0 on success. -1 on errors.
1221
1255
  */
1222
- int osdp_file_register_ops(osdp_t *ctx, int pd_idx,
1256
+ OSDP_EXPORT
1257
+ int osdp_file_register_ops(osdp_t *ctx, int pd,
1223
1258
  const struct osdp_file_ops *ops);
1224
1259
 
1225
1260
  /**
@@ -1232,8 +1267,8 @@ int osdp_file_register_ops(osdp_t *ctx, int pd_idx,
1232
1267
  * @param offset Offset into the file that has been sent/received (CP/PD)
1233
1268
  * @retval 0 on success. -1 on errors.
1234
1269
  */
1235
- int osdp_get_file_tx_status(const osdp_t *ctx, int pd_idx,
1236
- int *size, int *offset);
1270
+ OSDP_EXPORT
1271
+ int osdp_get_file_tx_status(const osdp_t *ctx, int pd, int *size, int *offset);
1237
1272
 
1238
1273
  #ifdef __cplusplus
1239
1274
  }
@@ -3,6 +3,11 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+
7
+ #ifndef _GNU_SOURCE
8
+ #define _GNU_SOURCE /* See feature_test_macros(7) */
9
+ #endif
10
+
6
11
  #include <stdarg.h>
7
12
  #include <stdlib.h>
8
13
  #ifndef CONFIG_DISABLE_PRETTY_LOGGING
@@ -218,9 +223,9 @@ const char *osdp_get_version()
218
223
  OSDP_EXPORT
219
224
  const char *osdp_get_source_info()
220
225
  {
221
- if (strnlen(GIT_TAG, 8) > 0) {
226
+ if (strlen(GIT_TAG) > 0) {
222
227
  return GIT_BRANCH " (" GIT_TAG ")";
223
- } else if (strnlen(GIT_REV, 8) > 0) {
228
+ } else if (strlen(GIT_REV) > 0) {
224
229
  return GIT_BRANCH " (" GIT_REV GIT_DIFF ")";
225
230
  } else {
226
231
  return GIT_BRANCH;
@@ -11,11 +11,11 @@
11
11
  * @brief The following macros are defined defined from the variable in cmake
12
12
  * files. All @XXX@ are replaced by the value of XXX as resolved by cmake.
13
13
  */
14
- #define PROJECT_VERSION "3.0.4"
14
+ #define PROJECT_VERSION "3.0.6"
15
15
  #define PROJECT_NAME "libosdp"
16
- #define GIT_BRANCH "HEAD"
17
- #define GIT_REV "ca56683"
18
- #define GIT_TAG "v3.0.4"
16
+ #define GIT_BRANCH "master"
17
+ #define GIT_REV "cf675a0"
18
+ #define GIT_TAG ""
19
19
  #define GIT_DIFF ""
20
20
  #define REPO_ROOT "/home/runner/work/libosdp/libosdp"
21
21
 
@@ -305,7 +305,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
305
305
  }
306
306
  cmd.id = OSDP_CMD_STATUS;
307
307
  cmd.status.type = OSDP_STATUS_REPORT_LOCAL;
308
- if (do_command_callback(pd, &cmd)) {
308
+ if (!do_command_callback(pd, &cmd)) {
309
309
  break;
310
310
  }
311
311
  event = (struct osdp_event *)pd->ephemeral_data;
@@ -324,7 +324,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
324
324
  }
325
325
  cmd.id = OSDP_CMD_STATUS;
326
326
  cmd.status.type = OSDP_STATUS_REPORT_INPUT;
327
- if (do_command_callback(pd, &cmd)) {
327
+ if (!do_command_callback(pd, &cmd)) {
328
328
  break;
329
329
  }
330
330
  event = (struct osdp_event *)pd->ephemeral_data;
@@ -343,7 +343,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
343
343
  }
344
344
  cmd.id = OSDP_CMD_STATUS;
345
345
  cmd.status.type = OSDP_STATUS_REPORT_OUTPUT;
346
- if (do_command_callback(pd, &cmd)) {
346
+ if (!do_command_callback(pd, &cmd)) {
347
347
  break;
348
348
  }
349
349
  event = (struct osdp_event *)pd->ephemeral_data;
@@ -358,7 +358,7 @@ static int pd_decode_command(struct osdp_pd *pd, uint8_t *buf, int len)
358
358
  }
359
359
  cmd.id = OSDP_CMD_STATUS;
360
360
  cmd.status.type = OSDP_STATUS_REPORT_REMOTE;
361
- if (do_command_callback(pd, &cmd)) {
361
+ if (!do_command_callback(pd, &cmd)) {
362
362
  break;
363
363
  }
364
364
  event = (struct osdp_event *)pd->ephemeral_data;
@@ -518,8 +518,9 @@ int osdp_phy_check_packet(struct osdp_pd *pd)
518
518
  }
519
519
  pd->packet_len = ret;
520
520
  if (pd->packet_scan_skip) {
521
- LOG_WRN("Packet scan skipped %u bytes before SoM",
522
- pd->packet_scan_skip);
521
+ LOG_WRN("Packet scan skipped:%u mark:%d",
522
+ pd->packet_scan_skip,
523
+ ISSET_FLAG(pd, PD_FLAG_PKT_HAS_MARK));
523
524
  pd->packet_scan_skip = 0;
524
525
  }
525
526
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes