diff --git a/connection.cpp b/connection.cpp index 47310a5..5118fd8 100644 --- a/connection.cpp +++ b/connection.cpp @@ -998,7 +998,7 @@ int connection__iq_handler(xmpp_conn_t *conn, xmpp_stanza_t *stanza, void *userd children[0] = stanza__iq_pubsub(account->context, NULL, children, with_noop("http://jabber.org/protocol/pubsub")); children[0] = stanza__iq(account->context, NULL, children, NULL, - strdup("fetch2"), to.size() ? strdup(to.data()) : NULL, + strdup("fetch2"), to ? strdup(to) : NULL, binding.from ? strdup(binding.from->bare.data()) : NULL, strdup("get")); xmpp_send(conn, children[0]); xmpp_stanza_release(children[0]); diff --git a/makefile b/makefile index ad0d6bd..0cab009 100644 --- a/makefile +++ b/makefile @@ -3,8 +3,10 @@ ifdef DEBUG DBGLDFLAGS=-lasan -lrt -lasan #-lubsan -llsan endif -RM=rm -f -FIND=find +RM ?= rm -f +FIND ?= find +CC = $(if $(shell which gcc-12.0.1),gcc-12.0.1,cc) +CXX = $(if $(shell which g++-12.0.1),g++-12.0.1,c++) INCLUDES=-Ilibstrophe -Ideps -Ideps/fmt/include \ $(shell xml2-config --cflags) \