Remove multicast from rig_state structure as it breaks backwards compability on DLL with WSJT-X

This is due to the callbacks structure being realigned as the state structure expanded
https://github.com/Hamlib/Hamlib/issues/1299
pull/1330/head
Mike Black W9MDB 2023-05-26 17:11:43 -05:00
rodzic 81dd39319b
commit 77d9d11f92
4 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -2629,7 +2629,7 @@ struct rig_state {
char client_version[32]; /*!<! Allow client to report version for compatibility checks/capability */
freq_t offset_vfoa; /*!< Offset to apply to VFOA/Main set_freq */
freq_t offset_vfob; /*!< Offset to apply to VFOB/Sub set_freq */
struct multicast_s *multicast; /*!< Pointer to multicast server data */
// struct multicast_s *multicast; /*!< Pointer to multicast server data */
};
//! @cond Doxygen_Suppress

Wyświetl plik

@ -13,6 +13,7 @@
#endif
#include "hamlib/rig.h"
#include "misc.h"
#if 0
#include "multicast.h"
#define RIG_MULTICAST_ADDR "224.0.0.1"
@ -524,3 +525,4 @@ int main(int argc, char *argv[])
return 0;
}
#endif
#endif

Wyświetl plik

@ -7599,6 +7599,7 @@ HAMLIB_EXPORT(void) sync_callback(int lock)
void rig_lock(RIG *rig, int lock)
{
#ifdef HAVE_PTHREAD
#if 0 //MULTICAST disabled as it breaks the DLL backwards compatibility
if (rig->state.multicast == NULL) { return; } // not initialized yet
@ -7620,6 +7621,7 @@ void rig_lock(RIG *rig, int lock)
}
#endif
#endif
}

Wyświetl plik

@ -31,9 +31,9 @@ int main(int argc, char *argv[])
#endif
rig->state.rigport.parm.serial.rate = 38400;
rig_open(rig);
multicast_init(rig, "224.0.0.1", 4532);
printf("threadid=%lld\n", (long long)rig->state.multicast->threadid);
pthread_join(rig->state.multicast->threadid, NULL);
// multicast_init(rig, "224.0.0.1", 4532);
//printf("threadid=%lld\n", (long long)rig->state.multicast->threadid);
//pthread_join(rig->state.multicast->threadid, NULL);
pthread_exit(NULL);
return 0;
}