From 8cd7251b7f0da3f82b552b0cf737b6047f8f3a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 30 Apr 2022 21:39:05 +0200 Subject: 0.0.5 --- CHANGELOG | 7 +++++++ Makefile | 2 +- README | 2 +- ircxmpp.c | 4 ++-- ircxmpp.conf | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index dc875aa..5c399c0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +ircxmpp (0.0.5-1) stable; urgency=low + + * Decreased default event loop delay to 10 miliseconds. + * Fixed crash on IRC leave. + + -- Anton Luka Šijanec Sat, 30 Apr 2022 21:40:00 +0200 + ircxmpp (0.0.4-1) stable; urgency=low * Minor change from previous release, as it did not build diff --git a/Makefile b/Makefile index c5970f5..25f6df0 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PROJ = ircxmpp default: $(CC) -c -DIX_LIB $(cflags) $(CFLAGS) $(PROJ).c $(CC) -shared -olib$(PROJ).so $(PROJ).o - $(CC) -L. $(cflags) $(CFLAGS) $(PROJ).c -l$(PROJ) $(ldflags) $(LDFLAGS) -o$(PROJ) + $(CC) -L. $(cflags) $(CFLAGS) $(PROJ).c -l$(PROJ) $(ldflags) -o$(PROJ) install: mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/etc $(DESTDIR)/usr/include $(DESTDIR)/usr/lib cp $(PROJ) $(DESTDIR)/usr/bin/ diff --git a/README b/README index 49963f3..c67fc25 100644 --- a/README +++ b/README @@ -28,7 +28,7 @@ Required environment variables for configuration: Optional environment variables for configuration: - IX_CHPASS set to IRC channel password if channel on IRC is password protected - - IX_LOOPDELAY delay after each event loop cycle in microseconds, defaults to 100 ms. + - IX_LOOPDELAY delay after each event loop cycle in microseconds, defaults to 10 ms. Operation principle: - ircxmpp initiates two control connections, one to XMPP server, one to IRC server, and joins diff --git a/ircxmpp.c b/ircxmpp.c index 302d164..a7b6a44 100644 --- a/ircxmpp.c +++ b/ircxmpp.c @@ -70,7 +70,7 @@ static void free_bridge (struct bridge * bridge, const char * razlog) { if (bridge->conn) xmpp_conn_release(bridge->conn); // graceful disconnect, what is that? if (strcmp(razlog, "free_bridge_from_tdestroy")) - tdelete(bridge, bridge->ircxmpp->bridges, bridge_compare); + tdelete(bridge, &bridge->ircxmpp->bridges, bridge_compare); free(bridge->identifier); for (size_t i = 0; i < bridge->messages_length; i++) free(bridge->messages[i]); @@ -775,7 +775,7 @@ int main (void) { ircxmpp_run_once(handles[i]); struct timespec ts = { .tv_sec = 0, - .tv_nsec = getenv("IX_LOOPDELAY") ? atoi(getenv("IX_LOOPDELAY"))/1000 : 1e8 + .tv_nsec = getenv("IX_LOOPDELAY") ? atoi(getenv("IX_LOOPDELAY"))/1000 : 1e7 }; nanosleep(&ts, NULL); } diff --git a/ircxmpp.conf b/ircxmpp.conf index ae11eef..d389ba1 100644 --- a/ircxmpp.conf +++ b/ircxmpp.conf @@ -17,8 +17,8 @@ ####################### OPTIONAL VARIABLES ####################### ## set to IRC channel password if channel on IRC is password protected # IX_CHPASS=somepassword -## delay after each event loop cycle in microseconds, defaults to 100ms. -# IX_LOOPDELAY=100000 +## delay after each event loop cycle in microseconds, defaults to 10ms. +# IX_LOOPDELAY=10000 ####################### ANOTHER LINK SETUP ######################## ## As many links as you'd like can be setup. Append a number, starting with 2, to every setting. # IX_JID2=v@lu.e -- cgit v1.2.3