mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
syslog: take the review notes on the state flag and the header length
The enabled flag is a flag, so say bool. The header length no longer needs to live in xdata: it was put there when a local would not link, and there is room for it here. The overview names the row after the JSON key, so the syslog row said "syslog_server_ip" while carrying only an address. It now says "syslog_server" and carries the port with it.
This commit is contained in:
1 parent
e50d3c6950
commit
40ce742d04
3 files changed
+6
-8
No files matched your search
@@ -12,11 +12,6 @@ __xdata char logbuf[LOGBUF_SIZE];
|
||||
__xdata struct syslog_state syslog_state;
|
||||
__xdata uip_ipaddr_t server_ip;
|
||||
|
||||
/* Header length, in xdata rather than on the stack: syslog_callback() is
|
||||
* __banked, so a local here takes a byte of internal RAM nobody can overlay,
|
||||
* and the two it costs are enough to stop the image from linking. */
|
||||
__xdata uint16_t syslog_hdr;
|
||||
|
||||
#define state syslog_state
|
||||
|
||||
void syslog_init(void) __banked
|
||||
@@ -64,6 +59,7 @@ void syslog_stop(void) __banked
|
||||
|
||||
void syslog_callback(uint16_t lport) __banked
|
||||
{
|
||||
uint16_t syslog_hdr;
|
||||
if (lport != state.syslog_conn->lport)
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user