mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
- Remove SSL certificate patch (merged upstream) - Add patch to allow adding StanzaExtensions to outgoing MUC messages - Add patch to fix loading bookmarks without name
148 lines
4.9 KiB
Plaintext
148 lines
4.9 KiB
Plaintext
From d18dc2f6032970e03a440208d4effa7b3290892d Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sat, 28 Mar 2020 10:17:16 +0100
|
|
Subject: Search for network functions in libnetwork
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 261a78c..2d1c210 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -330,7 +330,7 @@ AC_ARG_ENABLE( getaddrinfo,
|
|
[do not use getaddrinfo for dns lookups [default use getaddrinfo]])],
|
|
[getaddrinfo="no"])
|
|
if test "x$getaddrinfo" = "xyes"; then
|
|
- AC_CHECK_FUNCS(getaddrinfo,,getaddrinfo="no")
|
|
+ AC_SEARCH_LIBS(getaddrinfo,network,,getaddrinfo="no")
|
|
fi
|
|
AC_MSG_CHECKING([whether to use getaddrinfo])
|
|
AC_MSG_RESULT($getaddrinfo)
|
|
@@ -339,6 +339,7 @@ dnl Checks for header files.
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(unistd.h strings.h errno.h arpa/nameser.h)
|
|
AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(socket,setsockopt)])
|
|
+AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(network,setsockopt)])
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 735c2d5e13b7412c2cc93edac11cabada62ac1b1 Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Sat, 28 Mar 2020 13:10:43 +0100
|
|
Subject: Hack for detecting libnetwork internal functions
|
|
|
|
These functions are found indirectly through #defines in the headers.
|
|
So a normal AC_SEARCH_LIBS does not work.
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 2d1c210..cc03de2 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -220,7 +220,7 @@ else
|
|
else
|
|
AC_MSG_CHECKING([for res_querydomain in -lresolv (alternate version)])
|
|
save_libs="$LIBS"
|
|
- LIBS="-lresolv $LIBS"
|
|
+ LIBS="-lnetwork $LIBS"
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_querydomain(0,0,0,0,0,0)]])],
|
|
[AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_RES_QUERYDOMAIN)
|
|
@@ -248,7 +248,7 @@ else
|
|
else
|
|
AC_MSG_CHECKING([for dn_skipname in -lresolv (alternate version)])
|
|
save_libs="$LIBS"
|
|
- LIBS="-lresolv $LIBS"
|
|
+ LIBS="-lnetwork $LIBS"
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
|
|
#include <resolv.h>]], [[dn_skipname(0,0)]])],
|
|
[AC_MSG_RESULT(yes)
|
|
@@ -277,7 +277,7 @@ else
|
|
else
|
|
AC_MSG_CHECKING([for res_query in -lresolv (alternate version)])
|
|
save_libs="$LIBS"
|
|
- LIBS="-lresolv $LIBS"
|
|
+ LIBS="-lnetwork $LIBS"
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_query(0,0,0,0,0)]])],
|
|
[AC_MSG_RESULT(yes)
|
|
AC_DEFINE(HAVE_RES_QUERY)
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From caf6cb2ff803b9e4e670ebaf05d6f6803b6f45fb Mon Sep 17 00:00:00 2001
|
|
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
|
Date: Tue, 4 Apr 2023 13:03:27 +0200
|
|
Subject: Add a way to send a message to a MUC Room with stanza extensions
|
|
|
|
This is not possible otherwise because the internal mucmessagesession is
|
|
not available to the client.
|
|
|
|
diff --git a/src/mucroom.cpp b/src/mucroom.cpp
|
|
index 2a06485..7b9950d 100644
|
|
--- a/src/mucroom.cpp
|
|
+++ b/src/mucroom.cpp
|
|
@@ -702,6 +702,12 @@ namespace gloox
|
|
m_session->send( message );
|
|
}
|
|
|
|
+ void MUCRoom::send( const std::string& message, const std::string& subject, const StanzaExtensionList& sel )
|
|
+ {
|
|
+ if( m_session && m_joined )
|
|
+ m_session->send( message, subject, sel );
|
|
+ }
|
|
+
|
|
void MUCRoom::setSubject( const std::string& subject )
|
|
{
|
|
if( m_session && m_joined )
|
|
diff --git a/src/mucroom.h b/src/mucroom.h
|
|
index 73b8c93..4509d94 100644
|
|
--- a/src/mucroom.h
|
|
+++ b/src/mucroom.h
|
|
@@ -411,6 +411,7 @@ namespace gloox
|
|
* @param message The message to send.
|
|
*/
|
|
void send( const std::string& message );
|
|
+ void send( const std::string& message, const std::string& subject, const StanzaExtensionList& sel = StanzaExtensionList() );
|
|
|
|
/**
|
|
* Sets the subject of the room to the given string.
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From a2a0fd3431deba7ed8f2ce6c2b36dc3cdfbb3313 Mon Sep 17 00:00:00 2001
|
|
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
|
Date: Tue, 4 Apr 2023 13:42:40 +0200
|
|
Subject: Bookmark storage: allow empty bookmarks
|
|
|
|
XEP-0048 says the name is RECOMMENDED. So it's allowed to not have one.
|
|
|
|
diff --git a/src/bookmarkstorage.cpp b/src/bookmarkstorage.cpp
|
|
index 91ca58e..397443e 100644
|
|
--- a/src/bookmarkstorage.cpp
|
|
+++ b/src/bookmarkstorage.cpp
|
|
@@ -76,7 +76,7 @@ namespace gloox
|
|
const std::string& url = (*it)->findAttribute( "url" );
|
|
const std::string& name = (*it)->findAttribute( "name" );
|
|
|
|
- if( !url.empty() && !name.empty() )
|
|
+ if( !url.empty() )
|
|
{
|
|
BookmarkListItem item;
|
|
item.url = url;
|
|
@@ -89,7 +89,7 @@ namespace gloox
|
|
const std::string& jid = (*it)->findAttribute( "jid" );
|
|
const std::string& name = (*it)->findAttribute( "name" );
|
|
|
|
- if( !jid.empty() && !name.empty() )
|
|
+ if( !jid.empty() )
|
|
{
|
|
const std::string& join = (*it)->findAttribute( "autojoin" );
|
|
ConferenceListItem item;
|
|
--
|
|
2.37.3
|
|
|