• src/sbbs3/js_mqtt.c

    From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Fri May 26 19:31:14 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/0655a1fff673771dfe0d01f2
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    New MQTT properties: error, error_str, library

    A little more visiblity into the MQTT library (version, function return values)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sat May 27 12:47:08 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/45ac901687848c9012e129a5
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    Add subscribe support

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Sat May 27 12:47:08 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/dec455488c7c24727d45ddc8
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    Fix memory leak on destruction when all received messages were not read

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows)@VERT to Git commit to main/sbbs/master on Sat May 27 16:39:57 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/8bc1a5b6aedb7373c9d0cced
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    mosquitto_loop_stop() can block even when force=true

    Contrary to https://mosquitto.org/api/files/mosquitto-h.html#mosquitto_loop_stop, passing force=true is not enough for the mosquitto network thread to end, mosquitto_disconnect() must be called.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Wed May 31 19:45:13 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/c85e735955e7d8403e2b9784
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    Report (via exception) more potential failures in MQTT constructor

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Wed May 31 19:45:13 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/d8454a483f56d10b65a7c4e9
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    Add subscibe_qos property (exposes/overrides default subscribe QoS)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Wed May 31 20:48:55 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/10993a6fd461e6094b830db9
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    We need to pass force=false to mosquitto_loop_stop()

    ... or else any pending published messages aren't sent.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sun Feb 11 21:47:47 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/3a389c0ca6d2b8db6ce07a2b
    Modified Files:
    src/sbbs3/js_mqtt.c
    Log Message:
    Fix heap corruption in Windows builds

    This bug caused crashes in the Windows build of sbbs when using the ;spy
    sysop command with MQTT enabled.

    Memory that is allocated in one DLL (e.g. sbbs.dll) must be freed in that same DLL (e.g. sbbs.dll, not mosquitto.dll).

    mosquitto_message_free() here frees the msg pointer, but we didn't allocate
    it in mosquitto.dll in the first place, so that's wrong. The proper mosquitto function to use in this case is mosquitto_message_free_contents().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net