rpc: track RPC port numbers from info announcements Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: add support for announcement tracking of uint16_t values This will be used for the RPC port number. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: don't leak str/val references passed into announce_publish_info The code is meant to consume the references. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: move tracked announcement addresses into struct instance_info This way, they can be used by announcement callbacks. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: don't publish QSO announcements when saving announced entries Otherwise we'll flood the network with packets as the instances re-announce each other's announcements ad infinitum. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: start supplying announcement sources when saving logged entries Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: add qso announcement source to qso announcements Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
wsjtx: try to clean up the setting of struct qso members The error checking also added to the bloat. This commit hides the error check in a macro. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
wsjtx: base logged contacts on the contest template This is the same thing as what the UI does. In general, the value from the template is used but wsjtx packet values override whatever may be in the template. It is therefore important for wsjxt to *not* include values that are not meant to override the template. For example, wsjtx should *not* provide an operator callsign as that will override the callsign from the template. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
hlog: move startup-stats iteration into lua It's silly to have the loop in C when we can write it in lua - yielding fewer lines of code, more readable code, etc. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: pass wsjtx contacts to qso-done script event handler Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: split wsjtx listener from other listeners Even though the wsjtx code listens for network packets, it isn't just another listener - it's the second method for contact entry. Therefore, let's move the wsjtx_start call right next to the UI start code where it makes better sense. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: separate out generic contest logic from ui code In a way, this demotes the UI from the central point of the contest binary to being just one of potentially many ways to input entries into the system. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
xlua: add locking support to struct xlua_state Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
xlua: wrap lua_State pointer in struct xlua_state This will allow us to associate additional fiels with the lua state. Since the wrapper structure (struct xlua_state) is a different type than lua_State, the compiler will catch any usage errors - i.e., passing xlua_state to a function that expects a lua_State and vice versa. This wrapper nicely delineates C functions that are called by C code and C functions called (possibly indirectly) by lua. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Add a LICENSE file Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: add a window with summary of other instances on the network This window has some limitations. For example, it is fixed size so only the first 5 instances will ever be displayed, instances that disappear forever will take up one of the 5 lines, etc. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
contest: print a message for each QSO announcement Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: add 'all announcements' callback function This will be useful for the network status window and similar usecases. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
rpc: dedup qso announcements We may receive more than one copy of the same announcement because we may share the same multiple subnets as the sending instance, or we may have more than one IP on a subnet. Either way, we don't want to spam the callbacks with duplicate QSO announcements. So, we keep a small circular buffer of last NUM_QSO_DEDUP uuids that we received for each instance. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>