Skip to content

Commit

Permalink
Merge pull request #462 from meganz/develop
Browse files Browse the repository at this point in the history
Last changes ready for master
  • Loading branch information
javiserrano authored Nov 9, 2016
2 parents 5b0b785 + 8721327 commit 0877a11
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
22 changes: 15 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ AC_ARG_WITH(sodium,
sodium=false
;;
yes)
AC_CHECK_HEADERS([sodium/core.h],, [
AC_MSG_ERROR([sodium/core.h header not found or not usable])
AC_CHECK_HEADERS([sodium.h],, [
AC_MSG_ERROR([sodium.h header not found or not usable])
])
AC_CHECK_LIB(sodium, [sodium_init], [SODIUM_LIBS="-lsodium"],[
AC_MSG_ERROR([Could not find libsodium])
Expand All @@ -379,7 +379,7 @@ AC_ARG_WITH(sodium,
CXXFLAGS="-I$with_sodium/include $CXXFLAGS"
CPPFLAGS="-I$with_sodium/include $CPPFLAGS"
AC_CHECK_HEADERS(sodium/core.h,
AC_CHECK_HEADERS(sodium.h,
SODIUM_CXXFLAGS="-I$with_sodium/include"
SODIUM_CPPFLAGS="-I$with_sodium/include"
SODIUM_LDFLAGS="-L$with_sodium/lib",
Expand All @@ -391,11 +391,11 @@ AC_ARG_WITH(sodium,
CXXFLAGS="-I$with_sodium/src/libsodium/include $CXXFLAGS"
CPPFLAGS="-I$with_sodium/src/libsodium/include $CPPFLAGS"
AC_CHECK_HEADERS(sodium/core.h,
AC_CHECK_HEADERS(sodium.h,
SODIUM_CXXFLAGS="-I$with_sodium/src/libsodium/include"
SODIUM_CPPFLAGS="-I$with_sodium/src/libsodium/include"
SODIUM_LDFLAGS="-L$with_sodium/src/libsodium/.libs",
AC_MSG_ERROR([sodium/core.h header not found or not usable])
AC_MSG_ERROR([sodium.h header not found or not usable])
)
fi
Expand All @@ -413,8 +413,16 @@ AC_ARG_WITH(sodium,
esac
],
[AC_MSG_RESULT([--with-sodium not specified])
AC_CHECK_HEADERS([sodium/core.h], [sodium=true], [])
AC_CHECK_LIB(sodium, [sodium_init], [SODIUM_LIBS="-lsodium"],[])
AC_CHECK_HEADERS([sodium.h], [sodium=true], [
if test "x$enable_chat" = "xyes" ; then
AC_MSG_ERROR([sodium.h header not found or not usable])
fi
])
AC_CHECK_LIB(sodium, [sodium_init], [SODIUM_LIBS="-lsodium"],[
if test "x$enable_chat" = "xyes" ; then
AC_MSG_ERROR([Could not find libsodium])
fi
])
]
)
AC_SUBST(SODIUM_CXXFLAGS)
Expand Down
1 change: 1 addition & 0 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ nobase_libmegainclude_HEADERS = \
mega/waiter.h \
mega/proxy.h \
mega/pendingcontactrequest.h \
mega/version.h \
mega/crypto/cryptopp.h \
mega/crypto/sodium.h \
mega/db/sqlite.h \
Expand Down
2 changes: 1 addition & 1 deletion src/megaapi_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13169,7 +13169,7 @@ void MegaApiImpl::sendPendingRequests()
}

// if 1:1 chat, peer is enforced to be moderator too
if (!group && userpriv->at(1).second != PRIV_MODERATOR)
if (!group && userpriv->at(0).second != PRIV_MODERATOR)
{
((MegaTextChatPeerListPrivate*)chatPeers)->setPeerPrivilege(userpriv->at(1).first, PRIV_MODERATOR);
}
Expand Down

0 comments on commit 0877a11

Please sign in to comment.