Merge branch 'master' into tunnel-names
@ -24,7 +24,7 @@ before_install:
|
||||
#Fix for opencv and numpy already installed by system
|
||||
- if [ $TRAVIS_OS_NAME == osx ]; then rm '/usr/local/bin/f2py'; fi
|
||||
- if [ $TRAVIS_OS_NAME == osx ]; then rm -r '/usr/local/lib/python2.7/site-packages/numpy'; fi
|
||||
- if [ $TRAVIS_OS_NAME == osx ]; then brew install homebrew/science/opencv; fi
|
||||
- if [ $TRAVIS_OS_NAME == osx ]; then brew install opencv; fi
|
||||
|
||||
# FIX: Now openssl is not linked in /usr/local/include and lib
|
||||
- if [ $TRAVIS_OS_NAME == osx ]; then ln -s /usr/local/opt/openssl/include/* /usr/local/include/; fi
|
||||
|
@ -89,4 +89,4 @@ You can now compile RS into Qt Creator or with terminal
|
||||
|
||||
You can change Target and SDK in *./retroshare.pri:82* changing value of QMAKE_MACOSX_DEPLOYMENT_TARGET and QMAKE_MAC_SDK
|
||||
|
||||
You can find compiled application on *./retroshare/retroshare-gui/src/RetroShare06.app*
|
||||
You can find compiled application on *./retroshare/retroshare-gui/src/retroshare.app*
|
||||
|
@ -3,14 +3,28 @@ Compile Retroshare for Android
|
||||
|
||||
== Introduction
|
||||
|
||||
Compiling an application for Android is not as easy as one would imagine, expecially one like RetroShare that has a big codebase and is not well documented. This document is aimed to empower the reader so she can hopefully succed or at least have a significant help in compiling her own RetroShare APK package installable on Android.
|
||||
Compiling an application for Android is not as easy as one would imagine,
|
||||
expecially one like RetroShare that has a big codebase and is not well
|
||||
documented.
|
||||
This document is aimed to empower the reader so she can hopefully succed or at
|
||||
least have a significant help in compiling her own RetroShare APK package
|
||||
installable on Android.
|
||||
|
||||
== Preparing The Environement
|
||||
|
||||
First of all setup your Qt for Android development environement following the guide on the link:http://doc.qt.io/qt-5/androidgs.html[Qt for android web site].
|
||||
At this point you should have Android SDK, Android NDK, and Qt for Android working fine, and you should be capable of executing on an Android emulator or on your Android phone Qt for Android examples.
|
||||
First of all setup your Qt for Android development environement following the
|
||||
guide on the link:http://doc.qt.io/qt-5/androidgs.html[Qt for android web site].
|
||||
At this point you should have Android SDK, Android NDK, and Qt for Android
|
||||
working fine, and you should be capable of executing on an Android emulator or
|
||||
on your Android phone Qt for Android examples.
|
||||
|
||||
But RetroShare is not as simple to compile as those examples. In particular, the Android NDK precompiled toolchain is limited and doesn't support the full C++ specification, and it is missing some part that is needed to build RetroShare. The good news is that Android NDK ships all the necessary to build a custom toolchain that is suitable to build RetroShare. In order to build the toolchain with needed library RetroShare provides the +android-prepare-toolchain.sh+ script; before you execute it you should define some variables the script cannot determine in an easy and reliable manner by itself in your terminal.
|
||||
But RetroShare is not as simple to compile as those examples. The good news is
|
||||
that Android NDK ships all the necessary to build a custom toolchain that is
|
||||
suitable to build RetroShare.
|
||||
In order to build the toolchain with needed library RetroShare provides the
|
||||
+android-prepare-toolchain.sh+ script; before you execute it you should define
|
||||
some variables the script cannot determine in an easy and reliable manner by
|
||||
itself in your terminal.
|
||||
|
||||
[source,bash]
|
||||
-------------------------------------------------------------------------------
|
||||
@ -27,56 +41,56 @@ export ANDROID_NDK_ARCH="arm"
|
||||
## The Android API level the Android device you want to target
|
||||
export ANDROID_PLATFORM_VER="19"
|
||||
|
||||
## The number of core that yout host CPU have (just to speed up compilation) set it to 1 if unsure
|
||||
## The number of core that yout host CPU have (just to speed up compilation) set
|
||||
## it to 1 if unsure
|
||||
export HOST_NUM_CPU=1
|
||||
|
||||
./android-prepare-toolchain.sh
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Now is time for the bad news: as of today Qt assumes you use the NDK precompiled toolchain and doesn't have an option to use the custom toolchain you just generated, so you need to tweak Qt internals a little to make usage of the custom toolchain. First of all you need to determine your Qt for Android installation path -in my case it is +/opt/Qt5.7.0/+ - then find the +mkspecs+ directory -in my case it is +/opt/Qt5.7.0/5.7/android_armv7/mkspecs+ - and then modify qmake configuration for the android target according to your toolchain, in my case I have done it with the following commands (in the same shell I used before, to take advantage of the already set variables):
|
||||
|
||||
WARNING: This may need a slight modification if you have a different Qt version.
|
||||
|
||||
[source,bash]
|
||||
-------------------------------------------------------------------------------
|
||||
export QT_PATH="/opt/Qt5.7.0/"
|
||||
export QT_MAJOR_VERSION="5.7"
|
||||
|
||||
cd ${QT_PATH}/${QT_MAJOR_VERSION}/android_armv7/mkspecs
|
||||
sudo --preserve-env -s
|
||||
cp -r android-g++ android-g++-backup
|
||||
cd android-g++
|
||||
sed -i "s|^NDK_TOOLCHAIN_PATH =.*|NDK_TOOLCHAIN_PATH = ${NDK_TOOLCHAIN_PATH}|" qmake.conf
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
== Preparing Qt Creator
|
||||
|
||||
Now that your environement is set up you should configure Qt Creator for Android following the link:http://doc.qt.io/qtcreator/creator-developing-android.html[official guide]. At the end of this step your Qt Creator should recognize the Android compiler and the Qt for Android kit. As we use a custom toolchain one more step is needed.
|
||||
Now that your environement is set up you should configure Qt Creator for Android
|
||||
following the
|
||||
link:http://doc.qt.io/qtcreator/creator-developing-android.html[official guide].
|
||||
At the end of this step your Qt Creator should recognize the Android compiler
|
||||
and the Qt for Android kit.
|
||||
|
||||
From the top menu click
|
||||
_Tools -> Options... -> Build & Run -> Compilers -> Android GCC (arm-4.9) -> Clone_
|
||||
Your Kit is now ready to use. Now you can open RetroShare as a Qt Creator
|
||||
project and in the Projects left menu add the newly created kit if not already
|
||||
present, so you can select it on the build type selection button down on the
|
||||
left.
|
||||
|
||||
Now a new compiler (usually named +Clone of Android GCC (arm-4.9)+) should have appeared on your compilers list. Select that compiler and press the Browse button to look for your custom toolchain compiler. You should find it at +$NDK_TOOLCHAIN_PATH/bin/arm-linux-androideabi-gcc+. Select it, then press Apply.
|
||||
As we use a custom toolchain one more step is needed +
|
||||
|
||||
Now go to the Kits tab, select +Android for armeabi-v7a (GCC 4.9, Qt 5.7.0)+ and press the Clone button. A new kit is created (usually named +Clone of Android for armeabi-v7a (GCC 4.9, Qt 5.7.0)+). Now select the new kit and change the compiler to the one you have just created.
|
||||
_Qt Creator left pane -> Projects -> Build and Run -> Android SOMESTUFF kit ->
|
||||
Build Environement -> Add
|
||||
|
||||
Your Kit is now ready to use. Now you can open RetroShare as a Qt Creator project and in the Projects left menu add the newly created kit if not already present, so you can select it on the build type selection button down on the left.
|
||||
Variable: +NATIVE_LIBS_TOOLCHAIN_PATH+
|
||||
Value: +Same value as NDK_TOOLCHAIN_PATH in Preparing The Environement step+
|
||||
|
||||
Some of RetroShare modules like +retroshare-gui+, +WebUI+ and +sqlcipher+ are not supported yet on Android so to be able to compile RetroShare without errors you will have to go to +
|
||||
Some of RetroShare modules like +retroshare-gui+ and +WebUI+ are not available
|
||||
on Android so to be able to compile RetroShare without errors you will have to
|
||||
go to +
|
||||
|
||||
_Qt Creator left pane -> Projects -> Build and Run -> Android SOMESTUFF kit -> Build Steps -> qmake -> Additional arguments_
|
||||
_Qt Creator left pane -> Projects -> Build and Run -> Android SOMESTUFF kit ->
|
||||
Build Steps -> qmake -> Additional arguments_
|
||||
|
||||
and add the following configurations
|
||||
|
||||
[source,makefile]
|
||||
-------------------------------------------------------------------------------
|
||||
CONFIG+=no_retroshare_gui CONFIG+=no_retroshare_nogui CONFIG+=no_retroshare_plugins CONFIG+=retroshare_android_service CONFIG+=libresapilocalserver CONFIG+=no_libresapihttpserver CONFIG+=no_sqlcipher CONFIG+=retroshare_qml_app
|
||||
CONFIG+=no_retroshare_gui CONFIG+=no_retroshare_nogui CONFIG+=no_retroshare_plugins CONFIG+=retroshare_android_service CONFIG+=libresapilocalserver CONFIG+=no_libresapihttpserver CONFIG+=retroshare_qml_app
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
WARNING: SQLCipher is not supported yet on RetroShare for Android. This poses a major security concern, we are working to fix this ASAP.
|
||||
WARNING: SQLCipher is not supported yet on RetroShare for Android. This poses a
|
||||
major security concern, we are working to fix this ASAP.
|
||||
|
||||
WARNING: Some versions of QtCreator try to find the Android SDK in +/opt/android/sdk+. A workaround to this is to make a symbolic link there pointing to your SDK installation path, like +mkdir -p /opt/android/sdk && ln -s /home/user/android-sdk-linux /opt/android/sdk+
|
||||
WARNING: Some versions of QtCreator try to find the Android SDK in
|
||||
+/opt/android/sdk+. A workaround to this is to make a symbolic link there
|
||||
pointing to your SDK installation path, like
|
||||
+mkdir -p /opt/android/sdk && ln -s /home/user/android-sdk-linux
|
||||
/opt/android/sdk+
|
||||
|
||||
== Quircks
|
||||
|
||||
|
@ -68,8 +68,8 @@ Compilation on Linux
|
||||
|
||||
The executables produced will be:
|
||||
|
||||
/usr/bin/RetroShare06
|
||||
/usr/bin/RetroShare06-nogui
|
||||
/usr/bin/retroshare
|
||||
/usr/bin/retroshare-nogui
|
||||
|
||||
5. Uninstall:
|
||||
```bash
|
||||
@ -124,7 +124,7 @@ Using retroshare-nogui & webUI
|
||||
The webUI needs to be enabled as a parameter option in retroshare-nogui:
|
||||
|
||||
```bash
|
||||
./retroshare-nogui --webinterface 9090 --docroot /usr/share/RetroShare06/webui/
|
||||
./retroshare-nogui --webinterface 9090 --docroot /usr/share/retroshare/webui/
|
||||
```
|
||||
|
||||
The webUI is only accessible on localhost:9090. It is advised to keep it that way so that your RS
|
||||
|
@ -34,15 +34,26 @@ retroshare_nogui {
|
||||
retroshare_android_service {
|
||||
SUBDIRS += retroshare_android_service
|
||||
retroshare_android_service.file = retroshare-android-service/src/retroshare-android-service.pro
|
||||
retroshare_android_service.depends = libretroshare libresapi
|
||||
retroshare_android_service.depends = libresapi
|
||||
retroshare_android_service.target = retroshare_android_service
|
||||
}
|
||||
|
||||
retroshare_android_notify_service {
|
||||
SUBDIRS += retroshare_android_notify_service
|
||||
retroshare_android_notify_service.file = retroshare-android-notify-service/src/retroshare-android-notify-service.pro
|
||||
retroshare_android_notify_service.depends = retroshare_android_service
|
||||
retroshare_android_notify_service.target = retroshare_android_notify_service
|
||||
}
|
||||
|
||||
retroshare_qml_app {
|
||||
SUBDIRS += retroshare_qml_app
|
||||
retroshare_qml_app.file = retroshare-qml-app/src/retroshare-qml-app.pro
|
||||
retroshare_qml_app.depends = libretroshare retroshare_android_service
|
||||
retroshare_qml_app.depends = retroshare_android_service
|
||||
retroshare_qml_app.target = retroshare_qml_app
|
||||
|
||||
android-g++ {
|
||||
retroshare_qml_app.depends += retroshare_android_notify_service
|
||||
}
|
||||
}
|
||||
|
||||
retroshare_plugins {
|
||||
|
@ -4,8 +4,8 @@ set RSPATH=.\retroshare-gui\src\debug
|
||||
|
||||
set PATH=%QTDIR%\bin;%LIBS%\bin;%PATH%
|
||||
|
||||
If not exist %RSPATH%\RetroShare06.exe (
|
||||
If not exist %RSPATH%\retroshare.exe (
|
||||
build-all-mingw32make.bat
|
||||
)
|
||||
|
||||
%RSPATH%\RetroShare06.exe
|
||||
%RSPATH%\retroshare.exe
|
||||
|
@ -97,6 +97,7 @@ install:
|
||||
# Install toolchain
|
||||
#- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain" #Already installed
|
||||
# Install other binutils
|
||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-curl mingw-w64-x86_64-curl"
|
||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-miniupnpc mingw-w64-x86_64-miniupnpc"
|
||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-sqlite3 mingw-w64-x86_64-sqlite3"
|
||||
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-speex mingw-w64-x86_64-speex"
|
||||
@ -114,7 +115,7 @@ install:
|
||||
- copy C:\msys64\mingw64\x86_64-w64-mingw32\bin\ranlib.exe C:\msys64\mingw64\bin\x86_64-w64-mingw32-ranlib.exe
|
||||
- copy C:\msys64\mingw64\bin\windres.exe C:\msys64\mingw64\bin\x86_64-w64-mingw32-windres.exe
|
||||
# Build missing Libs
|
||||
- C:\msys64\mingw32.exe -lc "cd /c/projects/RetroShare/msys2_build_libs/ && make"
|
||||
#- C:\msys64\mingw32.exe -lc "cd /c/projects/RetroShare/msys2_build_libs/ && make"
|
||||
# Clone RetroShare
|
||||
#- git clone -q --branch={branch} https://github.com/RetroShare/RetroShare.git C:\projects\RetroShare
|
||||
|
||||
@ -151,7 +152,7 @@ after_build:
|
||||
# to run your custom scripts instead of automatic MSBuild
|
||||
build_script:
|
||||
- cd C:\projects\RetroShare
|
||||
- qmake
|
||||
- qmake CONFIG+=no_sqlcipher
|
||||
- make
|
||||
|
||||
# to disable automatic builds
|
||||
|
10
build_scripts/AppImage/README.txt
Normal file
@ -0,0 +1,10 @@
|
||||
In order to generate the appImage, just run makeAppImage.sh
|
||||
|
||||
This app image recipe has been obtained from
|
||||
|
||||
https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages
|
||||
|
||||
... using method 1.
|
||||
|
||||
The script Recipe is https://raw.githubusercontent.com/probonopd/AppImages/master/recipes/meta/Recipe from https://github.com/probonopd/AppImages/blob/master/recipes/meta/RetroShare.yml which as been adapted to the newest naming conventions
|
||||
|
418
build_scripts/AppImage/Recipe
Executable file
@ -0,0 +1,418 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
usage() {
|
||||
echo "usage:"
|
||||
echo " $0 [--no-di] META-NAME|YAMLFILE"
|
||||
echo ""
|
||||
echo "options:"
|
||||
echo " --no-di disable desktop integration"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] || [ "x${!#}" = "x--no-di" ] ; then
|
||||
usage
|
||||
fi
|
||||
if [ $# -eq 2 ] && [ "x$1" != "x--no-di" ] ; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ "x$1" = "x--no-di" ] ; then
|
||||
ENABLE_DI="no"
|
||||
else
|
||||
ENABLE_DI="yes"
|
||||
fi
|
||||
|
||||
# Halt on errors
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Check dependencies
|
||||
which wget >/dev/null 2>&1 || ( echo wget missing && exit 1 )
|
||||
which grep >/dev/null 2>&1 || ( echo grep missing && exit 1 )
|
||||
which sed >/dev/null 2>&1 || ( echo sed missing && exit 1 )
|
||||
which cut >/dev/null 2>&1 || ( echo cut missing && exit 1 )
|
||||
|
||||
# If the yaml file doesn't exist locally, get it from GitHub
|
||||
if [ ! -f "${!#}" ] ; then
|
||||
YAMLFILE=/tmp/_recipe.yml
|
||||
rm -f "$YAMLFILE"
|
||||
wget -q "https://github.com/probonopd/AppImages/raw/master/recipes/meta/${!#}.yml" -O "$YAMLFILE"
|
||||
else
|
||||
YAMLFILE=$(readlink -f "${!#}")
|
||||
fi
|
||||
|
||||
# Lightweight bash-only dpkg-scanpackages replacement
|
||||
scanpackages() {
|
||||
for deb in *.deb ; do
|
||||
dpkg -I $deb | sed 's/^ *//g' | grep -i -E '(package|version|installed-size|architecture|depends|priority):'
|
||||
echo "Filename: $(readlink -f $deb)"
|
||||
echo "MD5sum: $(md5sum -b $deb | cut -d' ' -f1)"
|
||||
echo "SHA1: $(sha1sum -b $deb | cut -d' ' -f1)"
|
||||
echo "SHA256: $(sha256sum -b $deb | cut -d' ' -f1)"
|
||||
echo
|
||||
done
|
||||
}
|
||||
|
||||
# Function to parse yaml
|
||||
# https://gist.github.com/epiloque/8cf512c6d64641bde388
|
||||
# based on https://gist.github.com/pkuczynski/8665367
|
||||
parse_yaml() {
|
||||
local prefix=$2
|
||||
local s
|
||||
local w
|
||||
local fs
|
||||
s='[[:space:]]*'
|
||||
w='[a-zA-Z0-9_]*'
|
||||
fs="$(echo @|tr @ '\034')"
|
||||
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
|
||||
-e "s|^\($s\)\($w\)$s[:-]$s\(.*\)$s\$|\1$fs\2$fs\3|p" "$1" |
|
||||
awk -F"$fs" '{
|
||||
indent = length($1)/2;
|
||||
vname[indent] = $2;
|
||||
for (i in vname) {if (i > indent) {delete vname[i]}}
|
||||
if (length($3) > 0) {
|
||||
vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")}
|
||||
printf("%s%s%s=(\"%s\")\n", "'"$prefix"'",vn, $2, $3);
|
||||
}
|
||||
}' | sed 's/_=/+=/g'
|
||||
}
|
||||
|
||||
# Read yaml file
|
||||
parse_yaml $YAMLFILE "_"
|
||||
eval $(parse_yaml $YAMLFILE "_")
|
||||
|
||||
# Execute multiple script lines together as one
|
||||
# shell_execute filename key_of_group_of_commands
|
||||
shell_execute() {
|
||||
if [ -f /tmp/recipe_script ] ; then
|
||||
rm /tmp/recipe_script
|
||||
fi
|
||||
parse_yaml $YAMLFILE "_" | grep "^$2+=" > /tmp/recipe_script
|
||||
sed -i -e 's|^'$2'+=("||g' /tmp/recipe_script
|
||||
sed -i -e 's|")$||g' /tmp/recipe_script
|
||||
bash -ex /tmp/recipe_script
|
||||
rm /tmp/recipe_script
|
||||
}
|
||||
|
||||
APP=$_app
|
||||
LOWERAPP=${APP,,}
|
||||
if [ ! -z $_lowerapp ] ; then
|
||||
LOWERAPP=$_lowerapp
|
||||
fi
|
||||
|
||||
mkdir -p ./$APP/$APP.AppDir/usr/lib
|
||||
cd ./$APP/
|
||||
|
||||
if [ -d "./$APP.AppDir/" ] ; then
|
||||
rm -rf ./$APP.AppDir/
|
||||
fi
|
||||
|
||||
# Source a user-provided functions.sh if the environment
|
||||
# variable FUNCTIONS_SH was set and the file exists
|
||||
if [ -z "$FUNCTIONS_SH" ] ; then
|
||||
if [ ! -e functions.sh ] ; then
|
||||
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
|
||||
fi
|
||||
. ./functions.sh
|
||||
else
|
||||
if [ -e "$FUNCTIONS_SH" ] ; then
|
||||
. "$FUNCTIONS_SH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If there is an ARCH environment variable, then use that
|
||||
# architecture to for apt-get. Not that for the AppImage to be
|
||||
# operable, we also need to embed a matching AppImage runtime
|
||||
# and ingredients of that architecture. Debian packages
|
||||
# should be available for most architectures, e.g., oldstable
|
||||
# has "armhf"
|
||||
if [ ! -z $ARCH] ; then
|
||||
OPTIONS="$OPTIONS -o APT::Architecture=$ARCH"
|
||||
fi
|
||||
|
||||
if [ ! -z "${_ingredients_ghreleases[0]}" ] ; then
|
||||
for GHREPO in "${_ingredients_ghreleases[@]}" ; do
|
||||
wget -q "https://github.com/${GHREPO}/releases/" -O /tmp/gh-release.html
|
||||
DEB=$(cat /tmp/gh-release.html | grep ".deb" | grep x86_64 | head -n 1 | cut -d '"' -f 2)
|
||||
if [ -z "$DEB" ] ; then
|
||||
DEB=$(cat /tmp/gh-release.html | grep ".deb" | grep amd64 | head -n 1 | cut -d '"' -f 2)
|
||||
fi
|
||||
if [ -z "$DEB" ] ; then
|
||||
DEB=$(cat /tmp/gh-release.html | grep ".deb" | grep x64 | head -n 1 | cut -d '"' -f 2)
|
||||
fi
|
||||
if [ -z "$DEB" ] ; then
|
||||
DEB=$(cat /tmp/gh-release.html | grep ".deb" | grep linux64 | head -n 1 | cut -d '"' -f 2)
|
||||
fi
|
||||
rm /tmp/gh-release.html
|
||||
wget -c "https://github.com/${DEB}"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -z "${_ingredients_dist}" ] ; then
|
||||
rm status 2>/dev/null || true
|
||||
generate_status
|
||||
|
||||
# Some packages depend on packages which we do not want to bundle,
|
||||
# in addition to the global excludes defined in excludedeblist.
|
||||
# Use
|
||||
# ingredients:
|
||||
# exclude:
|
||||
# - packagename
|
||||
if [ ! -z "${_ingredients_exclude[0]}" ] ; then
|
||||
for PACKAGE in "${_ingredients_exclude[@]}" ; do
|
||||
printf "Package: $PACKAGE\nStatus: install ok installed\nArchitecture: all\nVersion: 9:999.999.999\n\n" >> status
|
||||
done
|
||||
fi
|
||||
|
||||
# Some packages depend on an exact version of a dependency to be installed.
|
||||
# Use
|
||||
# ingredients:
|
||||
# pretend:
|
||||
# - packagename version_to_be_pretended
|
||||
if [ ! -z "${_ingredients_pretend[0]}" ] ; then
|
||||
for PRETEND in "${_ingredients_pretend[@]}" ; do
|
||||
P_PKG=$(echo "$PRETEND" | cut -d " " -f 1)
|
||||
P_VER=$(echo "$PRETEND" | cut -d " " -f 2)
|
||||
cat status | tr '\n' '@' | sed -e 's|@@|\n\n|g' | sed -e 's|Package: '"$P_PKG"'@Status: install ok installed@Architecture: all@Version: 9:999.999.999|Package: '"$P_PKG"'@Status: install ok installed@Architecture: all@Version: '"$P_VER"'|g' | sed -e 's|@|\n|g' > status.temp
|
||||
mv status.temp status
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -e sources.list ] ; then
|
||||
rm sources.list
|
||||
fi
|
||||
for SOURCE in "${_ingredients_sources[@]}" ; do
|
||||
echo "${SOURCE}" >> sources.list
|
||||
done
|
||||
for PPA in "${_ingredients_ppas[@]}" ; do
|
||||
echo "deb http://ppa.launchpad.net/${PPA}/ubuntu ${_ingredients_dist} main" >> sources.list
|
||||
done
|
||||
# Use libcurl-slim to reduce AppImage size, thanks darealshinji
|
||||
# Not really compiled on xenial but CentOS 6, https://github.com/AppImage/AppImages/issues/187
|
||||
echo "deb http://ppa.launchpad.net/djcj/libcurl-slim/ubuntu xenial main" >> sources.list
|
||||
fi
|
||||
|
||||
if [ ! -z "${_ingredients_script[0]}" ] ; then
|
||||
# Execute extra steps defined in recipe
|
||||
shell_execute $YAMLFILE _ingredients_script
|
||||
fi
|
||||
|
||||
if [ ! -z "${_ingredients_dist}" ] ; then
|
||||
# Some projects provide raw .deb files without a repository
|
||||
# hence we create our own local repository as part of
|
||||
# the AppImage creation process in order to "install"
|
||||
# the package using apt-get as normal
|
||||
if [ ! -z "${_ingredients_debs[0]}" ] ; then
|
||||
for DEB in "${_ingredients_debs[@]}" ; do
|
||||
if [ ! -f $(basename "$DEB") ] ; then
|
||||
wget -c $DEB
|
||||
fi
|
||||
done
|
||||
fi
|
||||
scanpackages | gzip -9c > Packages.gz
|
||||
echo "deb file:$(readlink -e $PWD) ./" >> sources.list
|
||||
|
||||
INSTALL=$LOWERAPP
|
||||
if [ ! -z "${_ingredients_package}" ] ; then
|
||||
INSTALL="${_ingredients_package}"
|
||||
fi
|
||||
if [ ! -z "${_ingredients_packages}" ] ; then
|
||||
INSTALL=""
|
||||
fi
|
||||
|
||||
# If packages are specifically listed, only install these, not a package with the name of the app
|
||||
if [ ! -z "${_ingredients_packages[0]}" ] ; then
|
||||
INSTALL=${_ingredients_packages[@]}
|
||||
fi
|
||||
|
||||
apt-get $OPTIONS update || true
|
||||
URLS=$(apt-get $OPTIONS -y install --print-uris $INSTALL | cut -d "'" -f 2 | grep -e "^http")
|
||||
if which aria2c &>/dev/null; then
|
||||
dltool=aria2c
|
||||
else
|
||||
dltool=wget
|
||||
fi
|
||||
|
||||
$dltool -c -i- <<<"$URLS"
|
||||
fi
|
||||
|
||||
mkdir -p ./$APP.AppDir/
|
||||
cd ./$APP.AppDir/
|
||||
|
||||
mkdir -p usr/bin usr/lib
|
||||
find ../*.deb -exec dpkg -x {} . \; || true
|
||||
|
||||
# Try to copy icons to standard locations where appimaged can pick them up
|
||||
mkdir -p usr/share/icons/hicolor/{22x22,24x24,32x32,48x48,64x64,128x128,256x256,512x512}/apps/
|
||||
find . -path *icons* -path *22* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/22x22/apps/ \; || true
|
||||
find . -path *icons* -path *24* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/24x24/apps/ \; || true
|
||||
find . -path *icons* -path *32* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/32x32/apps/ \; || true
|
||||
find . -path *icons* -path *48* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/48x48/apps/ \; || true
|
||||
find . -path *icons* -path *64* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/64x64/apps/ \; || true
|
||||
find . -path *icons* -path *128* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/128x128/apps/ \; || true
|
||||
find . -path *icons* -path *256* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/256x256/apps/ \; || true
|
||||
find . -path *icons* -path *512* -name "*$LOWERAPP*" -exec cp {} usr/share/icons/hicolor/512x512/apps/ \; || true
|
||||
|
||||
get_icon
|
||||
|
||||
if [ -z "${_union}" ] ; then
|
||||
get_apprun
|
||||
else
|
||||
cat > AppRun <<\EOF
|
||||
#!/bin/sh
|
||||
HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
export UNION_PRELOAD="${HERE}"
|
||||
export LD_PRELOAD="${HERE}/libunionpreload.so"
|
||||
export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
|
||||
export LD_LIBRARY_PATH="${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/usr/lib32/:"${HERE}"/usr/lib64/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${HERE}"/lib32/:"${HERE}"/lib64/:"${LD_LIBRARY_PATH}"
|
||||
export PYTHONPATH="${HERE}"/usr/share/pyshared/:"${PYTHONPATH}"
|
||||
export PYTHONHOME="${HERE}"/usr/
|
||||
export XDG_DATA_DIRS="${HERE}"/usr/share/:"${XDG_DATA_DIRS}"
|
||||
export PERLLIB="${HERE}"/usr/share/perl5/:"${HERE}"/usr/lib/perl5/:"${PERLLIB}"
|
||||
export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
|
||||
export QT_PLUGIN_PATH="${HERE}"/usr/lib/qt4/plugins/:"${HERE}"/usr/lib/i386-linux-gnu/qt4/plugins/:"${HERE}"/usr/lib/x86_64-linux-gnu/qt4/plugins/:"${HERE}"/usr/lib32/qt4/plugins/:"${HERE}"/usr/lib64/qt4/plugins/:"${HERE}"/usr/lib/qt5/plugins/:"${HERE}"/usr/lib/i386-linux-gnu/qt5/plugins/:"${HERE}"/usr/lib/x86_64-linux-gnu/qt5/plugins/:"${HERE}"/usr/lib32/qt5/plugins/:"${HERE}"/usr/lib64/qt5/plugins/:"${QT_PLUGIN_PATH}"
|
||||
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
|
||||
exec ${EXEC} $@
|
||||
EOF
|
||||
chmod a+x AppRun
|
||||
fi
|
||||
|
||||
get_desktop
|
||||
|
||||
# Prevent Qt from loading plugins from the system
|
||||
unset QTPATH
|
||||
QTPATH=$(find usr/lib -type d -name qt4 -or -name qt5 | sed -e 's|usr/|../|g')
|
||||
if [ ! -z $QTPATH ] ; then
|
||||
cat > usr/bin/qt.conf <<EOF
|
||||
[Paths]
|
||||
Prefix = $QTPATH
|
||||
EOF
|
||||
fi
|
||||
|
||||
# http://www.mono-project.com/docs/advanced/assemblies-and-the-gac/
|
||||
# At runtime, Mono looks in three places for assemblies necessary
|
||||
# to run a program. It first searches the location of the executing assembly.
|
||||
# For this to work without setting $MONO_PATH, we need to move the
|
||||
# main *.exe to usr/lib/mono/exe, because we move all "assemblies" (sic)
|
||||
# there in this script
|
||||
|
||||
if [ -e usr/lib/mono ] ; then
|
||||
# Force all so files referenced in config files into LD_LIBRARY_PATH
|
||||
find . -name "*.dll.config" -exec cat {} > temp \;
|
||||
# Remove all absolute paths
|
||||
sed -i -E 's|target=\"\/(.*\/)([a-z0-9].*?)>|target=\"\2>|g' temp
|
||||
SONAMES=$(cat temp | cut -d '"' -f 4 | grep ".so")
|
||||
for SONAME in $SONAMES; do
|
||||
find . -name "$SONAME" -exec mv {} usr/lib \;
|
||||
done
|
||||
rm temp
|
||||
PATH_OF_THE_EXE="usr/lib/mono/exe"
|
||||
mkdir -p "PATH_OF_THE_EXE"
|
||||
# Force all dll files into PATH_OF_THE_EXE (or MONO_PATH which we would have to set)
|
||||
find . -name "*.dll" -and -not -name "mscorlib.dll" -exec mv {} "$PATH_OF_THE_EXE" \;
|
||||
# Edit all config files in place to remove absolute paths
|
||||
find . -name "*.dll.config" -exec sed -i -E 's|target=\"\/(.*\/)([a-z0-9].*?)>|target=\"\2>|g' {} \;
|
||||
# Force all config files into the PATH_OF_THE_EXE (or MONO_PATH which we would have to set)
|
||||
find . -name "*.dll.config" -exec mv {} "$PATH_OF_THE_EXE" \;
|
||||
# Remove gac, we are not using it since it is convoluted
|
||||
rm -rf usr/lib/mono/gac/
|
||||
fi
|
||||
|
||||
if [ -d "./usr/lib/x86_64-linux-gnu/gstreamer-1.0/" ] ; then
|
||||
mv ./usr/lib/x86_64-linux-gnu/gstreamer-1.0/* ./usr/lib/x86_64-linux-gnu/
|
||||
rm -r ./usr/lib/x86_64-linux-gnu/gstreamer-1.0
|
||||
fi
|
||||
|
||||
if [ -d "./usr/lib/x86_64-linux-gnu/pulseaudio/" ] ; then
|
||||
mv ./usr/lib/x86_64-linux-gnu/pulseaudio/* ./usr/lib/x86_64-linux-gnu/
|
||||
rm -r ./usr/lib/x86_64-linux-gnu/pulseaudio
|
||||
fi
|
||||
|
||||
# Execute extra steps defined in recipe
|
||||
if [ ! -z "${_script}" ] ; then
|
||||
shell_execute $YAMLFILE _script
|
||||
fi
|
||||
|
||||
DESKTOP=$(find . -name '*.desktop' | sort | head -n 1)
|
||||
|
||||
# desktop-file-validate complains about missing trailing semicolons for some
|
||||
# keys although the format definition says that they are optional
|
||||
fix_desktop "$DESKTOP"
|
||||
|
||||
# Some non-distribution provided applications have an absolute
|
||||
# path in the Exec= line which we remove for relocateability
|
||||
if [ -z "$DESKTOP" ] ; then
|
||||
echo "desktop file not found, aborting"
|
||||
exit 1
|
||||
else
|
||||
desktop-file-validate "$DESKTOP" || exit 1
|
||||
ORIG=$(grep -o "^Exec=.*$" "${DESKTOP}" | head -n 1| cut -d " " -f 1)
|
||||
REPL=$(basename $(grep -o "^Exec=.*$" "${DESKTOP}" | head -n 1 | cut -d " " -f 1 | sed -e 's|Exec=||g'))
|
||||
sed -i -e 's|'"${ORIG}"'|Exec='"${REPL}"'|g' "${DESKTOP}"
|
||||
fi
|
||||
|
||||
# Compile GLib schemas if the subdirectory is present in the AppImage
|
||||
# AppRun has to export GSETTINGS_SCHEMA_DIR for this to work
|
||||
if [ -d usr/share/glib-2.0/schemas/ ] ; then
|
||||
( cd usr/share/glib-2.0/schemas/ ; glib-compile-schemas . )
|
||||
fi
|
||||
|
||||
if [ -f ../VERSION ] ; then
|
||||
VERSION=$(cat ../VERSION)
|
||||
else
|
||||
get_version || true
|
||||
fi
|
||||
|
||||
# patch_usr
|
||||
# Patching only the executable files seems not to be enough for some apps
|
||||
if [ ! -z "${_binpatch}" ] ; then
|
||||
find usr/ -type f -exec sed -i -e 's|/usr|././|g' {} \;
|
||||
find usr/ -type f -exec sed -i -e 's@././/bin/env@/usr/bin/env@g' {} \;
|
||||
fi
|
||||
|
||||
# Don't suffer from NIH; use LD_PRELOAD to override calls to /usr paths
|
||||
if [ ! -z "${_union}" ] ; then
|
||||
mkdir -p usr/src/
|
||||
wget -q "https://raw.githubusercontent.com/mikix/deb2snap/master/src/preload.c" -O - | \
|
||||
sed -e 's|SNAPPY|UNION|g' | sed -e 's|SNAPP|UNION|g' | sed -e 's|SNAP|UNION|g' | \
|
||||
sed -e 's|snappy|union|g' > usr/src/libunionpreload.c
|
||||
gcc -shared -fPIC usr/src/libunionpreload.c -o libunionpreload.so -ldl -DUNION_LIBNAME=\"libunionpreload.so\"
|
||||
strip libunionpreload.so
|
||||
fi
|
||||
|
||||
delete_blacklisted
|
||||
|
||||
if [ "$ENABLE_DI" = "yes" ] ; then
|
||||
get_desktopintegration $LOWERAPP
|
||||
fi
|
||||
|
||||
# Fix desktop files that have file endings for icons
|
||||
sed -i -e 's|\.png||g' *.desktop || true
|
||||
sed -i -e 's|\.svg||g' *.desktop || true
|
||||
sed -i -e 's|\.svgz||g' *.desktop || true
|
||||
sed -i -e 's|\.xpm||g' *.desktop || true
|
||||
|
||||
# Setting PYTHONHOME instead
|
||||
# Fix Python imports,
|
||||
# https://github.com/probonopd/AppImages/issues/172
|
||||
# SITECUSTOMIZEFILES=$(find . -name "sitecustomize.py")
|
||||
# for SITECUSTOMIZEFILE in $SITECUSTOMIZEFILES ; do
|
||||
# rm $SITECUSTOMIZEFILE # Remove symlinks, replace by files
|
||||
# cat > $SITECUSTOMIZEFILE <<\EOF
|
||||
# import sys,os
|
||||
# if sys.version_info[0] < 3:
|
||||
# prefix = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(sys.path[0]))))
|
||||
# sys.path = [ prefix+s for s in sys.path if not s.startswith(prefix) ]
|
||||
# EOF
|
||||
# done
|
||||
|
||||
# Execute extra steps defined in recipe
|
||||
if [ ! -z "${_post}" ] ; then
|
||||
shell_execute $YAMLFILE _post
|
||||
fi
|
||||
|
||||
# Go out of AppImage
|
||||
cd ..
|
||||
|
||||
generate_type2_appimage
|
||||
ls -lh ../out/*.AppImage
|
6
build_scripts/AppImage/clean.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -rf ./out
|
||||
rm *~
|
||||
rm -rf ./retroshare
|
||||
|
3
build_scripts/AppImage/makeAppImage.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
./Recipe retroshare.yml
|
||||
|
18
build_scripts/AppImage/retroshare.yml
Normal file
@ -0,0 +1,18 @@
|
||||
app: retroshare
|
||||
union: true
|
||||
|
||||
ingredients:
|
||||
dist: trusty
|
||||
sources:
|
||||
- deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
|
||||
- deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
|
||||
ppas:
|
||||
- retroshare/unstable
|
||||
packages:
|
||||
- libqt4-svg
|
||||
- retroshare
|
||||
|
||||
script:
|
||||
- rm -rf usr/share/glib-2.0/schemas/
|
||||
- sed -i -e 's|/usr/share/pixmaps/||g' retroshare.desktop
|
||||
- sed -i -e 's|/usr/bin/||g' retroshare.desktop
|
@ -34,10 +34,10 @@ How do I create a source package?
|
||||
You should get as many source packages as wanted distributions. For each
|
||||
of them you get (example here for wheezy):
|
||||
|
||||
retroshare06_0.6.0-0.7829~wheezy.dsc
|
||||
retroshare06_0.6.0-0.7829~wheezy_source.build
|
||||
retroshare06_0.6.0-0.7829~wheezy_source.changes
|
||||
retroshare06_0.6.0-0.7829~wheezy.tar.gz
|
||||
retroshare_0.6.0-0.7829~wheezy.dsc
|
||||
retroshare_0.6.0-0.7829~wheezy_source.build
|
||||
retroshare_0.6.0-0.7829~wheezy_source.changes
|
||||
retroshare_0.6.0-0.7829~wheezy.tar.gz
|
||||
|
||||
How do I create a binary package?
|
||||
=================================
|
||||
@ -69,7 +69,7 @@ How do I create a binary package?
|
||||
|
||||
*Package compilation*
|
||||
|
||||
> pbuilder-dist wheezy build retroshare06_0.6.0~7856~wheezy.dsc
|
||||
> pbuilder-dist wheezy build retroshare_0.6.0~7856~wheezy.dsc
|
||||
|
||||
The generated compiled binary packages (including all package plugins etc)
|
||||
will be in ~/pbuilder/wheezy_result/
|
||||
|
@ -1,4 +1,969 @@
|
||||
retroshare06 (0.6.2-1.XXXXXX~YYYYYY) YYYYYY; urgency=low
|
||||
retroshare (0.6.3-1.XXXXXX~YYYYYY) YYYYYY; urgency=low
|
||||
|
||||
46d26bf csoler Tue, 12 Sep 2017 21:05:59 +0200 updated ubuntu packagign script
|
||||
f3c627d csoler Sat, 16 Sep 2017 22:13:53 +0200 Merge pull request #1042 from csoler/v0.6-FT
|
||||
8189d66 csoler Sat, 16 Sep 2017 22:13:15 +0200 fixed bug causing anon FT to not resume when restarting RS when the server enforces encryption
|
||||
195127f Gioacc Fri, 15 Sep 2017 16:23:38 +0200 Merge pull request #965 from PhenomRetroShare/Fix_GccWarning
|
||||
6ad2306 Gioacc Fri, 15 Sep 2017 16:19:48 +0200 Merge pull request #1039 from PhenomRetroShare/Fix_WinCompil
|
||||
f416686 Phenom Fri, 15 Sep 2017 15:04:43 +0200 Fix Windows Build
|
||||
62eefa4 Gioacc Fri, 15 Sep 2017 09:33:01 +0200 Remove cruft from PeersHandler::handleGetInactiveUsers
|
||||
341c94e Gioacc Fri, 15 Sep 2017 09:03:50 +0200 PeersHandler::handleRemoveNode only remove location
|
||||
7888ec6 Gioacc Fri, 15 Sep 2017 08:56:54 +0200 Remove extra cruft
|
||||
016cafd Gioacc Fri, 15 Sep 2017 08:25:30 +0200 Merge branch 'master' of https://github.com/myfingerhurt/RetroShare into myfingerhurt-webui-PR1014
|
||||
331cdd0 csoler Thu, 14 Sep 2017 22:10:25 +0200 Merge pull request #1031 from PhenomRetroShare/Fix_UninitializedStatusInPeersHandler
|
||||
d5eac2c csoler Thu, 14 Sep 2017 22:06:01 +0200 Merge pull request #1033 from PhenomRetroShare/Add_UploadExpColAll
|
||||
d7dae0e csoler Thu, 14 Sep 2017 22:02:39 +0200 Merge pull request #1034 from csoler/v0.6-FT
|
||||
1d231e6 csoler Thu, 14 Sep 2017 22:01:52 +0200 fixed bug causing file lists to not refresh/show until a friend makes a change
|
||||
5511a0b csoler Thu, 14 Sep 2017 21:28:34 +0200 added tooltip for file ignore list
|
||||
dff0d50 Phenom Thu, 14 Sep 2017 19:22:37 +0200 Add Expand/Collapse All in Upload List
|
||||
a0ebddb Phenom Fri, 28 Jul 2017 20:00:29 +0200 Fic Gcc warnings:
|
||||
4b1161d csoler Tue, 12 Sep 2017 21:03:44 +0200 updated changelog
|
||||
762d025 csoler Tue, 12 Sep 2017 17:40:54 +0200 Merge pull request #1027 from PhenomRetroShare/Fix_UninitializedPeerMaxRates
|
||||
8884a32 Phenom Mon, 11 Sep 2017 20:18:06 +0200 Fix Uninitilized Peer Max Rates.
|
||||
66bf188 csoler Mon, 11 Sep 2017 22:20:27 +0200 Merge pull request #1029 from PhenomRetroShare/Fix_UninitValueInLocalDirUpd
|
||||
cf90867 Phenom Mon, 11 Sep 2017 21:50:08 +0200 Fix unitialized value in LocalDirectoryUpdater.
|
||||
3b7809a csoler Mon, 11 Sep 2017 20:49:11 +0200 Merge pull request #1028 from csoler/v0.6-FT
|
||||
551ef63 csoler Mon, 11 Sep 2017 19:36:06 +0200 added default ignore list on linux
|
||||
c5f91e3 csoler Mon, 11 Sep 2017 19:05:19 +0200 Merge pull request #1026 from csoler/v0.6-FT
|
||||
0ca0b72 csoler Mon, 11 Sep 2017 19:02:07 +0200 moved file ignore test to a more appropriate place
|
||||
eff5c5d csoler Sun, 10 Sep 2017 22:07:36 +0200 added pause to file hashing
|
||||
ea25d4b csoler Sun, 10 Sep 2017 20:22:17 +0200 improved update of ignore list
|
||||
884b3a6 csoler Sun, 10 Sep 2017 19:58:57 +0200 added infrastructure to add a ignore list in shared files
|
||||
b3e1597 csoler Sat, 9 Sep 2017 18:34:25 +0200 Merge pull request #1025 from Ppjet6/master
|
||||
c85664e Maxime Sat, 9 Sep 2017 13:54:30 +0100 Typo in GenCertDialog
|
||||
1e2a227 csoler Sat, 9 Sep 2017 14:48:35 +0200 Merge pull request #1023 from Ppjet6/master
|
||||
1bc9ef6 csoler Sat, 9 Sep 2017 14:48:02 +0200 Merge pull request #1022 from PhenomRetroShare/Fix_MoveSharedFilesDialog
|
||||
64d0290 Maxime Sat, 9 Sep 2017 03:47:38 +0100 Typo in GenCertDialog
|
||||
4336a4a Phenom Thu, 7 Sep 2017 19:37:53 +0200 Move SharedFilesDialog to /gui/FileTransfer/
|
||||
54ee650 csoler Thu, 7 Sep 2017 18:54:04 +0200 Merge pull request #1021 from PhenomRetroShare/Fix_ProgressSorting
|
||||
d81f9a3 Phenom Thu, 7 Sep 2017 18:09:21 +0200 Fix File Transfert Progress Sorting.
|
||||
1dc6bef csoler Thu, 7 Sep 2017 18:08:34 +0200 Merge pull request #1019 from PhenomRetroShare/Add_GroupedUpLoadItem
|
||||
3b4e84c Phenom Wed, 6 Sep 2017 19:57:33 +0200 Regroup Upload Items by file in TransfersDialog.
|
||||
f9102e5 csoler Tue, 5 Sep 2017 20:59:16 +0200 Merge pull request #1001 from PhenomRetroShare/Add_OnlyHiddenNodeCF
|
||||
9ceba80 csoler Tue, 5 Sep 2017 20:46:33 +0200 Merge pull request #1015 from PhenomRetroShare/Fix_TravisCI_MacOS
|
||||
671b418 csoler Tue, 5 Sep 2017 20:46:05 +0200 Merge pull request #1008 from PhenomRetroShare/Add_FilterInDownloadList
|
||||
32888f0 Phenom Tue, 5 Sep 2017 16:18:47 +0200 Fix Travis CI build for MacOS
|
||||
bc6ea65 csoler Mon, 4 Sep 2017 16:52:59 +0200 Merge pull request #1000 from PhenomRetroShare/Fix_RemovePngPng
|
||||
c6ffe07 csoler Mon, 4 Sep 2017 16:48:17 +0200 Merge pull request #1009 from csoler/v0.6-FT
|
||||
160ab7b csoler Sun, 3 Sep 2017 23:32:48 +0200 added missing code for remote search by hash, fixing the bug of direct sources not added
|
||||
8d14603 csoler Sun, 3 Sep 2017 22:52:31 +0200 fixed bug preventing search by hash to be called on own files
|
||||
063783a csoler Sun, 3 Sep 2017 14:59:14 +0200 Merge pull request #1004 from digitigrafo/master
|
||||
a73ea43 Phenom Sat, 2 Sep 2017 17:57:04 +0200 Add a filter to DownLoad list
|
||||
e1e1fb4 cri Thu, 24 Aug 2017 15:31:17 +0200 revert build orange skin
|
||||
4fc91be cri Thu, 24 Aug 2017 15:08:29 +0200 rwd style
|
||||
d845a3e cri Thu, 24 Aug 2017 14:32:22 +0200 orange css skin >48em
|
||||
ea4495f cri Wed, 23 Aug 2017 11:16:26 +0200 added new orange skin
|
||||
7f8386f csoler Sun, 20 Aug 2017 21:17:19 +0200 Merge pull request #998 from myfingerhurt/master
|
||||
5d59d56 Phenom Sun, 20 Aug 2017 13:17:28 +0200 Add Only Hidden Node configure flag
|
||||
cb7cfb4 Phenom Sat, 19 Aug 2017 23:55:39 +0200 Remove *.png.png duplicated Files
|
||||
130099f ben Fri, 18 Aug 2017 16:27:30 +0900 add new keys for WebUI api peers handling, distinguishable hidden node and clear node when examining certificate
|
||||
32f43b9 Gioacc Fri, 18 Aug 2017 01:37:39 +0200 Merge branch 'GSoC2017-evaluation-final'
|
||||
106f03d csoler Wed, 16 Aug 2017 22:26:48 +0200 Merge pull request #993 from PhenomRetroShare/Fix_OpenMessageForAllFile
|
||||
526d8e7 csoler Wed, 16 Aug 2017 22:26:13 +0200 Merge pull request #990 from PhenomRetroShare/Fix_RelaySettingLayoutMargin
|
||||
06158a9 csoler Wed, 16 Aug 2017 22:25:41 +0200 Merge pull request #992 from PhenomRetroShare/Fix_MailFromText
|
||||
291bddb csoler Wed, 16 Aug 2017 22:24:17 +0200 Merge pull request #995 from PhenomRetroShare/Fix_AppVeyor
|
||||
2a0b9ee csoler Wed, 16 Aug 2017 22:23:15 +0200 Merge pull request #991 from PhenomRetroShare/Fix_TravisMacCompil
|
||||
79f09f1 Angela Wed, 16 Aug 2017 14:09:38 +0200 Merge branch 'qml_app_ui_improvements' into GSoC2017-evaluation-final
|
||||
18f7733 Angela Wed, 16 Aug 2017 14:09:26 +0200 Merge branch 'qml_app_face_generator' into GSoC2017-evaluation-final
|
||||
73a6fee Phenom Sun, 13 Aug 2017 14:34:28 +0200 Fix AppVeyor build by disabling SQLCipher
|
||||
a87c31f Angela Sun, 13 Aug 2017 13:04:54 +0200 Fix canvas face displaced down
|
||||
5a1a84f Angela Sun, 13 Aug 2017 13:02:49 +0200 Refactor use better variable names
|
||||
16856ca csoler Sat, 12 Aug 2017 22:32:46 +0200 fixed yml script for AppImage
|
||||
041447b Phenom Sat, 12 Aug 2017 15:10:07 +0200 Add "No to All" for RSLink Open message.
|
||||
6b2bc7d Phenom Sat, 12 Aug 2017 13:40:28 +0200 Fix From text in Mail
|
||||
5a1c316 Phenom Sat, 12 Aug 2017 11:49:33 +0200 Fix Travis MacOs Compilation
|
||||
55bb105 Phenom Sat, 12 Aug 2017 11:21:14 +0200 Fix Relay Setting Layout Margin
|
||||
03d6751 csoler Fri, 11 Aug 2017 19:33:23 +0200 fixed branching problem in makeSOurcePackage.sh
|
||||
c3460c3 csoler Fri, 11 Aug 2017 19:27:49 +0200 merged previsous revisions
|
||||
b8a556a csoler Fri, 11 Aug 2017 19:00:15 +0200 added qt-svg as a dependency
|
||||
c331f66 csoler Fri, 11 Aug 2017 11:07:59 +0200 added appImage generation system
|
||||
545bcde csoler Thu, 10 Aug 2017 10:36:30 +0200 added info for building/packaging on debian stretch
|
||||
3ae85db thunde Sun, 6 Aug 2017 14:10:23 +0200 Fixed version number in rsversion.in
|
||||
529eabe Gioacc Sun, 6 Aug 2017 11:47:57 +0200 Merge pull request #986 from ngleb/fix-cpp-comment
|
||||
b686771 Gleb N Sun, 6 Aug 2017 14:27:26 +0700 fix C++ comment to avoid compilation error
|
||||
52dbd91 thunde Wed, 2 Aug 2017 10:18:58 +0200 Removed Windows specific hack to get commandline arguments.
|
||||
ee86768 thunde Sat, 5 Aug 2017 14:19:49 +0200 Fixed name of executable for autostart in Windows Installer
|
||||
3e25d96 csoler Fri, 4 Aug 2017 21:38:44 +0200 fixed unix -> linux-* target in .pri, as qt4 doesnt seem to recognise unix
|
||||
27ee9ca csoler Thu, 3 Aug 2017 22:55:27 +0200 Merge pull request #982 from csoler/v0.6.3
|
||||
11832e3 csoler Thu, 3 Aug 2017 22:51:40 +0200 updated version number
|
||||
4e02c5f csoler Thu, 3 Aug 2017 21:29:52 +0200 Merge pull request #979 from PhenomRetroShare/Fix_LobbyAutoSubscribe
|
||||
4b820a0 csoler Thu, 3 Aug 2017 21:08:54 +0200 Merge pull request #981 from csoler/v0.6.3
|
||||
84b32f0 csoler Thu, 3 Aug 2017 20:09:48 +0200 removed newline that comes with debug info
|
||||
c0f28f5 Angela Thu, 3 Aug 2017 18:31:05 +0200 Set transparent background color
|
||||
785bd65 Angela Thu, 3 Aug 2017 18:20:14 +0200 Add shadow to the toolbar
|
||||
9f52ffb Angela Thu, 3 Aug 2017 17:29:18 +0200 Increase toolbar size
|
||||
c790a5b Angela Thu, 3 Aug 2017 16:48:47 +0200 Merge branch 'qml_app_ui_improvements' into GSoC2017-evaluation-II
|
||||
83f8860 Angela Thu, 3 Aug 2017 16:48:37 +0200 Merge branch 'qml_app_emoji_font' into GSoC2017-evaluation-II
|
||||
d70293c Angela Thu, 3 Aug 2017 16:48:27 +0200 Merge branch 'qml_app_notify_unread' into GSoC2017-evaluation-II
|
||||
54c8e26 Angela Wed, 2 Aug 2017 18:09:40 +0200 Set emoji font declaration global for all app
|
||||
0a5b350 Angela Wed, 2 Aug 2017 17:34:29 +0200 Set RS emoji font as default if no emoji native font is detected
|
||||
1cdb3db Angela Wed, 2 Aug 2017 16:51:29 +0200 Add OpenSansEmoji font
|
||||
beed9be Angela Wed, 2 Aug 2017 15:16:15 +0200 Set bigger row height
|
||||
e6a3b35 Angela Wed, 2 Aug 2017 12:46:58 +0200 Set image PreserveAspectFit
|
||||
bf3a230 Angela Wed, 2 Aug 2017 12:34:19 +0200 Fix partially bug: incomplete toDataURL
|
||||
6190efe Angela Tue, 1 Aug 2017 16:59:15 +0200 Improve code
|
||||
27bedf8 Phenom Tue, 1 Aug 2017 10:15:42 +0200 Fix Lobby auto-subscribe.
|
||||
7d5f601 csoler Mon, 31 Jul 2017 19:22:15 +0200 Merge pull request #978 from G10h4ck/cxx11_comp
|
||||
541b1ea Gioacc Mon, 31 Jul 2017 18:26:51 +0200 Introduce C++11 compatibility macro for gcc < 4.6
|
||||
e39b310 Angela Mon, 31 Jul 2017 17:42:45 +0200 Open chat when click notification of one chat new message
|
||||
c86b7c7 Angela Mon, 31 Jul 2017 16:52:03 +0200 Open contacts view on click unread notification
|
||||
93d778a Angela Mon, 31 Jul 2017 16:11:21 +0200 Show info from message sender when is in only one conversation
|
||||
c6f562b Angela Mon, 31 Jul 2017 15:34:29 +0200 Fix reset text area with a preedit text message
|
||||
a041584 csoler Mon, 31 Jul 2017 01:10:35 +0200 Merge pull request #976 from csoler/v0.6.3
|
||||
7ad0ec1 csoler Mon, 31 Jul 2017 01:10:01 +0200 reduced size of GenCertDialog window (guess) and fixed username
|
||||
0636142 csoler Sun, 30 Jul 2017 21:29:37 +0200 Merge pull request #973 from PhenomRetroShare/Fix_DontShowAnonIconWhenImageDisabled
|
||||
2588068 csoler Sun, 30 Jul 2017 21:29:14 +0200 Merge pull request #953 from PhenomRetroShare/Fix_NewWindowForPassword
|
||||
39436f3 csoler Sun, 30 Jul 2017 18:45:56 +0200 Merge pull request #974 from PhenomRetroShare/Fix_WebUI_SettingSaving
|
||||
c2a3e46 Phenom Sun, 30 Jul 2017 18:29:03 +0200 Fix WebUI Setting Saving.
|
||||
eb75946 Phenom Sun, 30 Jul 2017 15:30:56 +0200 Fix Don't show Anonymous Icon when Images are disabled in ChatWidget
|
||||
a2f8b5e csoler Sun, 30 Jul 2017 14:42:28 +0200 Merge pull request #972 from csoler/v0.6.3
|
||||
c5fc8f8 csoler Sun, 30 Jul 2017 14:40:53 +0200 replaced images in homepage with the logo without flares
|
||||
cd6c9cf csoler Sun, 30 Jul 2017 14:38:17 +0200 simplified text on homepage
|
||||
e82b6fc csoler Sun, 30 Jul 2017 14:31:52 +0200 improved GenCertDialog with small indicator text, and hide location by default
|
||||
5dc25e3 Phenom Wed, 19 Jul 2017 19:39:21 +0200 Fix Ask Password in new window if wrong in StartDialog.
|
||||
b387f15 csoler Sun, 30 Jul 2017 10:36:44 +0200 fixed compilation on qt5
|
||||
f5c4561 csoler Sat, 29 Jul 2017 23:41:45 +0200 Merge pull request #968 from csoler/v0.6.3
|
||||
2e1bd2d csoler Sat, 29 Jul 2017 23:39:48 +0200 improved text on cert creation button
|
||||
09faa60 csoler Sat, 29 Jul 2017 23:16:47 +0200 Merge pull request #967 from csoler/v0.6.3
|
||||
e8415c4 csoler Sat, 29 Jul 2017 23:12:56 +0200 made RS not to ask for plugin confirmation on first load
|
||||
345f24e csoler Sat, 29 Jul 2017 22:37:14 +0200 fixed clearing of PGP passphrase after creation of default identity
|
||||
6f7e656 csoler Sat, 29 Jul 2017 21:48:12 +0200 Defautl GXS nickname was built from location. Changed it to use profile name
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Tue, 12 Sep 2017 22:00:00 +0100
|
||||
|
||||
retroshare (0.6.3-1.20170811.03d67515~trusty) trusty; urgency=low
|
||||
|
||||
a16220e csoler Sat, 29 Jul 2017 20:24:13 +0200 switched to RC2
|
||||
d10dbf1 csoler Sat, 29 Jul 2017 20:20:53 +0200 Merge pull request #966 from csoler/v0.6.3
|
||||
b8260e5 csoler Fri, 28 Jul 2017 18:41:34 +0200 fixed wording in GenCertDialog
|
||||
4fdbf39 csoler Fri, 28 Jul 2017 18:32:47 +0200 fixed image replication in profile creation window
|
||||
c6b6835 csoler Thu, 27 Jul 2017 20:43:08 +0200 exclude own friends from key removal pre-selection
|
||||
e861f87 csoler Wed, 26 Jul 2017 21:44:24 +0200 removed unused msg item class that caused aliasing warnings (serialisation of time_t as uint32_t)
|
||||
286e7e0 csoler Wed, 26 Jul 2017 14:01:28 +0200 Merge pull request #961 from csoler/v0.6.3
|
||||
34ddf71 csoler Wed, 26 Jul 2017 13:54:44 +0200 Merge pull request #957 from PhenomRetroShare/Fix_CppCheckerError
|
||||
1792273 csoler Wed, 26 Jul 2017 13:50:21 +0200 Merge pull request #946 from PhenomRetroShare/Fix_GuiAutoLogin
|
||||
ea72c58 csoler Wed, 26 Jul 2017 12:27:38 +0200 fixed unnecessary ()
|
||||
b0483a0 csoler Wed, 26 Jul 2017 10:23:18 +0200 fixed bug in removeDeleteExistingMsgs()
|
||||
3ba0256 csoler Tue, 25 Jul 2017 22:23:09 +0200 Merge pull request #955 from PhenomRetroShare/Fix_CopyRSLinkWhenOnlyPlainTextInLobby
|
||||
7820c1e csoler Tue, 25 Jul 2017 22:10:20 +0200 Merge pull request #960 from PhenomRetroShare/Add_ConfigFlagMacOSVersion
|
||||
9881b61 csoler Tue, 25 Jul 2017 22:06:18 +0200 cleanup code in RsGenExchange
|
||||
181a824 csoler Tue, 25 Jul 2017 21:56:20 +0200 fixed memory leak in BWGraphSource due to missing destructor
|
||||
a382a0f csoler Tue, 25 Jul 2017 21:52:09 +0200 fixed memory leak in p3peermgr config load
|
||||
041f989 csoler Tue, 25 Jul 2017 21:21:24 +0200 rewrote processRecvdMessages() and processRecvdGroups() in RsGenExchange. Removed mReceivedGrps and mReceivedMsgs, cleaned-up terrible branching and memory management
|
||||
cbec818 Phenom Tue, 25 Jul 2017 18:08:37 +0200 Add qmake CONFIG flag for MacOS version.
|
||||
461ccf3 csoler Tue, 25 Jul 2017 00:07:53 +0200 removed aliasing in storeMessages/storeGroups, removed several memory leaks in unittests, improved auto-delete structures in rsgxsutil, added deletion for members of RsGenExchange, removed shared pointers from unittests (they cause a memory leak and are only used in unittests)
|
||||
ef24459 csoler Mon, 24 Jul 2017 18:48:13 +0200 fixed memory leak in gxssecurity test
|
||||
79779b8 csoler Mon, 24 Jul 2017 18:45:24 +0200 fixed memory leaks in GxsSecurity
|
||||
70f72db csoler Mon, 24 Jul 2017 18:20:21 +0200 fixed memory leak in GxsSecurity
|
||||
bcaafc2 csoler Mon, 24 Jul 2017 14:29:30 +0200 improved template class naming for temporary Gxs grp data structures
|
||||
df691bd csoler Mon, 24 Jul 2017 12:16:06 +0200 improved tests to avoid memory leak
|
||||
3b1606c Gioacc Mon, 24 Jul 2017 11:52:23 +0200 Remove misguiding if
|
||||
03cc2e6 Gioacc Mon, 24 Jul 2017 10:16:24 +0200 Remove miguiding if before delete
|
||||
764fadf csoler Sun, 23 Jul 2017 22:58:01 +0200 suppressed memory leak in serialisation test code
|
||||
880eb58 csoler Sun, 23 Jul 2017 22:56:27 +0200 suppressed memory leak in serialisation test code
|
||||
0242424 csoler Sat, 22 Jul 2017 12:08:28 +0200 reverting last commit that causes crashes
|
||||
9e2241a csoler Fri, 21 Jul 2017 23:15:50 +0200 attempt to fix memory leak in RsGenExchange. To be tested.
|
||||
8ce10ea Phenom Fri, 21 Jul 2017 15:31:53 +0200 Fix past commit for p3idservice.cc
|
||||
733f812 Phenom Fri, 21 Jul 2017 15:20:04 +0200 Fix CppCheck Error in utility_functions.c
|
||||
36e3772 Phenom Fri, 21 Jul 2017 15:19:17 +0200 Fix CppCheck Error in advancedsearchdialog.cpp
|
||||
145ce6b Phenom Fri, 21 Jul 2017 15:11:55 +0200 Fix CppCheck Error in ChatPage.cpp
|
||||
2afc1bf Phenom Fri, 21 Jul 2017 15:04:10 +0200 Fix CppCheck Error in contentvalue.cc
|
||||
e576743 Phenom Fri, 21 Jul 2017 14:57:43 +0200 Fix CppCheck Error in p3idservice.cc
|
||||
8d82640 Phenom Fri, 21 Jul 2017 10:58:19 +0200 Fix copy of RSLink when on Only plain text mode in chat lobby. (sss find)
|
||||
aa471e5 csoler Fri, 21 Jul 2017 10:25:20 +0200 fixed uninitialized memory read in GxsTrans
|
||||
f370f59 csoler Thu, 20 Jul 2017 22:12:57 +0200 fixed typo in ppa upload script
|
||||
581c11d csoler Thu, 20 Jul 2017 22:11:35 +0200 fixed various problems with 06 suppression in package control files
|
||||
baac33d csoler Thu, 20 Jul 2017 21:18:07 +0200 updated revision number
|
||||
f9d6a78 csoler Thu, 20 Jul 2017 18:19:10 +0200 Merge pull request #954 from PhenomRetroShare/Fix_ShowAuthorInPeopleTabAtStartUp
|
||||
5b86f44 Phenom Thu, 20 Jul 2017 14:29:31 +0200 Fix Show Author In People Tab at startup
|
||||
d60bb78 csoler Wed, 19 Jul 2017 18:37:23 +0200 Merge pull request #952 from PhenomRetroShare/Fix_LobbyAutoSubscribe
|
||||
cbbc392 Phenom Wed, 19 Jul 2017 13:38:26 +0200 Fix Lobby auto-subscribe.
|
||||
0d681b1 csoler Wed, 19 Jul 2017 18:26:32 +0200 Merge pull request #924 from PhenomRetroShare/Fix_retroshare06_case
|
||||
71810e8 csoler Wed, 19 Jul 2017 18:18:32 +0200 Merge pull request #950 from PhenomRetroShare/Add_ChatServerFlag
|
||||
833787e csoler Tue, 18 Jul 2017 23:02:54 +0200 Merge pull request #949 from PhenomRetroShare/Add_AnonIconBeforeName
|
||||
bb8f93e csoler Tue, 18 Jul 2017 21:19:38 +0200 Merge pull request #951 from PhenomRetroShare/Fix_BadServMntorRegister
|
||||
5bbb99a Phenom Tue, 18 Jul 2017 19:24:32 +0200 Fix Bad Service Monitor registering.
|
||||
3a6bcf5 Phenom Tue, 18 Jul 2017 16:34:56 +0200 Add flag for ChatServer
|
||||
b8f742d Phenom Tue, 18 Jul 2017 14:30:31 +0200 Add :/icons/anonymous_blue_128.png before name for unsigned GxsId
|
||||
e56340e csoler Mon, 17 Jul 2017 23:12:06 +0200 Merge pull request #386 from PhenomRetroShare/Add_AbilityToChangeOpModeInCmdLine
|
||||
d39b05c csoler Mon, 17 Jul 2017 22:49:44 +0200 Merge pull request #948 from PhenomRetroShare/Add_FilterIdInFriendList
|
||||
f4aec11 csoler Mon, 17 Jul 2017 22:48:12 +0200 suppressed warning in p3dhtmgr.cc
|
||||
4374264 Phenom Sat, 15 Jul 2017 15:07:05 +0200 Fix clang warning: unused variable 'pqiservicezone'
|
||||
1f39789 Phenom Sat, 15 Jul 2017 18:32:53 +0200 Fix clang warning: 'RSGraphWidget::sizeHint' hides overloaded virtual function
|
||||
3003598 Phenom Mon, 17 Jul 2017 11:48:08 +0200 Fix clang warning: 'p3ChatService' defined as a struct here but previously declared as a class
|
||||
91c526f Phenom Mon, 17 Jul 2017 11:43:41 +0200 Fix clang warning: 'p3MsgService' defined as a struct here but previously declared as a class
|
||||
896ed3e Phenom Mon, 17 Jul 2017 11:38:53 +0200 Fix clang warning: class 'p3Config' was previously declared as a struct
|
||||
8dbb0d6 Phenom Sat, 15 Jul 2017 10:57:05 +0200 Fix warning: this statement may fall through
|
||||
7d8b379 csoler Mon, 17 Jul 2017 22:18:53 +0200 Merge pull request #941 from PhenomRetroShare/Add_UnsignedInChatName
|
||||
b6731ed Gioacc Mon, 17 Jul 2017 16:04:52 +0200 Better naming and doc for warning suppression CONFIG
|
||||
f888913 Phenom Sat, 13 Aug 2016 14:34:31 +0200 Set Operating Mode in RsInit::InitRetroShare so noGUI could use it.
|
||||
8563957 Phenom Mon, 16 May 2016 12:10:04 +0200 Add the ability to change OpMode in command line.
|
||||
c74c865 Phenom Mon, 17 Jul 2017 14:10:26 +0200 Add new Filter by ID in FriendList.
|
||||
1491a05 csoler Mon, 17 Jul 2017 11:16:48 +0200 fixed deadlock situation in FT causing multiple bugs: lock when DLing from a file list a file that is already being downloaded, and lock when a FT module find a direct source among friends
|
||||
5bf056c Phenom Mon, 17 Jul 2017 10:44:27 +0200 Rename retroshare06 to retroshare
|
||||
b12fd11 Phenom Wed, 5 Jul 2017 18:11:52 +0200 Change RetroShare06 to lower case
|
||||
65326d9 csoler Sun, 16 Jul 2017 22:08:07 +0200 removed DEPRECATED warnings by default
|
||||
e2fa57d Phenom Sat, 15 Jul 2017 19:03:17 +0200 Fix clang warning: unused variable 'INTERVAL_BETWEEN_DEBUG_DUMP'
|
||||
a50c4ca Phenom Sat, 15 Jul 2017 18:54:21 +0200 Fix clang warning: unused variable 'kRecognTagClass_DEVELOPMENT'
|
||||
f2fb05d Phenom Sat, 15 Jul 2017 18:50:32 +0200 Fix clang warning: unused variables 'PARTIAL_VIEW_SIZE', ...
|
||||
6ee65bc Phenom Sat, 15 Jul 2017 18:42:19 +0200 Fix clang warning: using floating point absolute value function 'fabsf' when argument is of integer type
|
||||
a0ac6b7 Phenom Sat, 15 Jul 2017 18:40:03 +0200 Fix clang warning: unused variable 'MAX_TUNNEL_REQUESTS_DISPLAY'
|
||||
64899e4 Phenom Sat, 15 Jul 2017 18:36:14 +0200 Fix clang warning: unused variable 'SFI_DEFAULT_PERIOD'
|
||||
b31c812 Phenom Sat, 15 Jul 2017 18:35:11 +0200 Fix clang warning: unused variable 'NEWSFEED_CHANNELMSGLIST'
|
||||
69060f8 Phenom Sat, 15 Jul 2017 18:24:55 +0200 Modify #warning to get author and date.
|
||||
26397d7 Phenom Sat, 15 Jul 2017 18:22:16 +0200 Fix clang warning: unused variables 'LOWER_LIMIT', ...
|
||||
903f875 Phenom Sat, 15 Jul 2017 18:17:00 +0200 Fix clang warning: unused variable 'MAX_SERIALIZED_ARRAY_SIZE'
|
||||
d83a962 Phenom Sat, 15 Jul 2017 16:45:19 +0200 Fix clang warning: unused variables 'GIXS_CUT_OFF', ...
|
||||
51fa7a5 Phenom Sat, 15 Jul 2017 16:39:24 +0200 Fix clang warning: unused variable 'p3facestartupzone'
|
||||
13220ec Phenom Sat, 15 Jul 2017 16:33:04 +0200 Fix clang warning: unused variable 'MAX_TIME_KEEP_LOCATION_WITHOUT_CONTACT'
|
||||
fea1b83 Phenom Sat, 15 Jul 2017 16:32:11 +0200 Fix clang warning: unused variable 'p3facemsgzone'
|
||||
5a64996 Phenom Sat, 15 Jul 2017 15:04:56 +0200 Fix clang warning: unused variables 'RS_NET_NEEDS_RESET', ...
|
||||
4152a46 Phenom Sat, 15 Jul 2017 14:58:55 +0200 Fix clang warning: unused variable 'P3CONNMGR_UDP_DEFAULT_DELAY'
|
||||
5b1323e Phenom Sat, 15 Jul 2017 14:53:04 +0200 Fix clang warning: unused variables 'PQI_HANDLER_NB_PRIORITY_LEVELS', ...
|
||||
9148fa6 Phenom Sat, 15 Jul 2017 14:38:17 +0200 Fix clang warning: unused variables 'RS_NET_DOWN', ...
|
||||
e4616c0 Phenom Sat, 15 Jul 2017 14:31:21 +0200 Fix clang warning: unused variable 'STORE_KEY_TIMEOUT'
|
||||
0479ec0 Phenom Sat, 15 Jul 2017 14:30:06 +0200 Fix clang warning: unused variable 'MAX_MESSAGES_PER_SECONDS_NUMBER'
|
||||
80ea4de Phenom Sat, 15 Jul 2017 14:28:29 +0200 Fix clang warning: unused variable 'ftserverzone'
|
||||
8a270af Phenom Sat, 15 Jul 2017 14:27:19 +0200 fixed merging problem
|
||||
35186c4 Phenom Sat, 15 Jul 2017 14:22:48 +0200 Fix clang warning: unused variable 'res'
|
||||
7f1e230 Phenom Sat, 15 Jul 2017 14:21:53 +0200 Fix clang warning: unused variable 'FT_TM_CRC_MAP_MAX_WAIT_PER_GIG', ...
|
||||
8b99c80 Phenom Sat, 15 Jul 2017 14:04:56 +0200 Fix clang warning: 'p3GxsTrans' defined as a class here but previously declared as a struct
|
||||
fd24ef5 Phenom Sat, 15 Jul 2017 13:35:50 +0200 Fix warning: comparison between signed and unsigned integer expressions and misleading-indentation
|
||||
431b564 Phenom Sat, 15 Jul 2017 13:32:04 +0200 Fix warning: unused variable ‘popLimit’
|
||||
2444e6e Phenom Sat, 15 Jul 2017 13:29:33 +0200 Fix warning: this statement may fall through
|
||||
dcb8a35 Phenom Sat, 15 Jul 2017 13:28:05 +0200 Fix warning: unused variable ‘self’ and misleading-indentation
|
||||
ca9357c Phenom Sat, 15 Jul 2017 13:25:14 +0200 Fix warning: this ‘if’ clause does not guard...
|
||||
b5c503a Phenom Sat, 15 Jul 2017 13:24:07 +0200 Fix warning: unused variable ‘prev_index’
|
||||
3a22c6d Phenom Sat, 15 Jul 2017 13:20:46 +0200 Fix warning: comparison between signed and unsigned integer expressions
|
||||
6fd0308 Phenom Sat, 15 Jul 2017 13:19:08 +0200 Fix warning: this statement may fall through
|
||||
f27ce82 Phenom Sat, 15 Jul 2017 13:18:00 +0200 Fix warning: comparison between signed and unsigned integer expressions , misleading-indentation and unused-variable
|
||||
15bc9c1 Phenom Sat, 15 Jul 2017 13:10:41 +0200 Fix warning: this statement may fall through
|
||||
f23c84f Phenom Sat, 15 Jul 2017 13:06:19 +0200 Fix warning: this statement may fall through
|
||||
9a4ed80 Phenom Sat, 15 Jul 2017 13:01:39 +0200 Fix warning: comparison between signed and unsigned integer expressions and unused variables
|
||||
8455adf Phenom Sat, 15 Jul 2017 12:50:50 +0200 Fix warning: unused parameter ‘type’ and ‘req’
|
||||
c866bf9 Phenom Sat, 15 Jul 2017 12:49:27 +0200 Fix warning: unused parameter ‘req’ and ‘resp’
|
||||
9d4967c Phenom Sat, 15 Jul 2017 12:48:04 +0200 Fix warning: unused parameter ‘req’
|
||||
c97269b Phenom Sat, 15 Jul 2017 12:44:55 +0200 Fix warning: this statement may fall through
|
||||
1813948 Phenom Sat, 15 Jul 2017 11:48:37 +0200 Fix warning: unused parameter ‘grpItem’ and unused debug variables
|
||||
e1ea92d Phenom Sat, 15 Jul 2017 11:42:02 +0200 Fix warning: unused parameter ‘n’
|
||||
f193af2 Phenom Sat, 15 Jul 2017 11:40:38 +0200 Fix warning: unused parameter ‘size’
|
||||
d8b0b52 Phenom Sat, 15 Jul 2017 11:39:03 +0200 Fix warning: variable ‘it’ set but not used
|
||||
b11022a Phenom Sat, 15 Jul 2017 11:35:18 +0200 Fix warning: this statement may fall through
|
||||
0e302e2 Phenom Sat, 15 Jul 2017 11:30:08 +0200 Fix warning: this statement may fall through
|
||||
7b4d3c5 Phenom Sat, 15 Jul 2017 11:25:54 +0200 Fix warning: this statement may fall through
|
||||
476b581 Phenom Sat, 15 Jul 2017 11:23:51 +0200 Fix warning: this statement may fall through
|
||||
7bd7c57 Phenom Sat, 15 Jul 2017 11:21:36 +0200 Fix warning: variable ‘pgpNameFound’ set but not used
|
||||
a0506c1 Phenom Sat, 15 Jul 2017 11:19:28 +0200 Fix warning: this statement may fall through
|
||||
b9d4651 Phenom Sat, 15 Jul 2017 11:17:02 +0200 Fix warning: this statement may fall through
|
||||
e12f51b Phenom Sat, 15 Jul 2017 11:14:53 +0200 Fix warning: variable ‘peerIt1’ set but not used
|
||||
78cfde9 Phenom Sat, 15 Jul 2017 11:11:51 +0200 Fix warning: this statement may fall through
|
||||
3a6ad82 Phenom Sat, 15 Jul 2017 11:03:58 +0200 Fix warning: this statement may fall through
|
||||
635246c Phenom Sat, 15 Jul 2017 11:01:16 +0200 Fix warning: this statement may fall through
|
||||
e718070 Phenom Sat, 15 Jul 2017 10:51:17 +0200 Fix warning: this statement may fall through
|
||||
714f9bb Phenom Sat, 15 Jul 2017 10:46:32 +0200 Fix warning: this statement may fall through
|
||||
987c105 csoler Sun, 16 Jul 2017 20:16:31 +0200 Merge pull request #945 from PhenomRetroShare/Add_RSLinkCreateAsStatic
|
||||
e40dbe8 csoler Sun, 16 Jul 2017 17:03:37 +0200 Merge pull request #947 from csoler/v0.6-ImprovedGUI
|
||||
1e98de7 csoler Sun, 16 Jul 2017 16:56:23 +0200 fixed filtering for channels when loading items on the fly
|
||||
82addce Phenom Sun, 16 Jul 2017 13:11:47 +0200 Change RetroShareLink creation methodes as static
|
||||
2d5e1d6 csoler Sun, 16 Jul 2017 10:08:33 +0200 fixed last update missing commits
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Wed, 20 Jul 2017 22:00:00 +0100
|
||||
|
||||
retroshare06 (0.6.2-1.20170716.2d5e1d63~zesty) zesty; urgency=low
|
||||
|
||||
4718125 csoler Sun, 16 Jul 2017 10:05:33 +0200 updated changelog
|
||||
991049d csoler Sat, 15 Jul 2017 22:20:43 +0200 Merge pull request #944 from csoler/v0.6-ImprovedGUI
|
||||
08faa3f csoler Sat, 15 Jul 2017 22:16:45 +0200 fixed p3Gxstunnel so that it sends the data packets in the same order it received them. This fixes the bug in distant chat causing images to not transfer correctly in some cases
|
||||
9c391cb csoler Sat, 15 Jul 2017 22:15:51 +0200 added an additional param to BinToHex so as to limit the size of the output
|
||||
6a8b74c csoler Sat, 15 Jul 2017 22:00:35 +0200 fixed compilation for computers where qreal is a float
|
||||
5ffb549 csoler Thu, 13 Jul 2017 21:49:47 +0200 Merge pull request #930 from myfingerhurt/master
|
||||
3912118 csoler Thu, 13 Jul 2017 21:42:05 +0200 Merge pull request #925 from PhenomRetroShare/Fix_ChannelCommentLineWrap
|
||||
98b0585 csoler Thu, 13 Jul 2017 21:23:14 +0200 Merge pull request #937 from csoler/v0.6-ImprovedNoGUI
|
||||
69aa5b6 Gioacc Thu, 13 Jul 2017 13:00:32 +0200 Clean some garbage from the code
|
||||
fd452af csoler Wed, 12 Jul 2017 23:03:17 +0200 removed some debut output that perturbated the passwd command line
|
||||
00c1a9a csoler Wed, 12 Jul 2017 22:53:35 +0200 fixed autologin
|
||||
66268c8 csoler Wed, 12 Jul 2017 18:48:06 +0200 fixed variable shadowing a parameter
|
||||
1cdb971 csoler Tue, 11 Jul 2017 23:47:51 +0200 fixed compilation pb due to qtcreator bug
|
||||
4cfdef5 csoler Tue, 11 Jul 2017 23:39:04 +0200 do not display auto-login option when software is compiled without autologin
|
||||
a5e0b1c csoler Tue, 11 Jul 2017 23:32:22 +0200 fixed -U option in rs-nogui. Removed debug output that would ruin the terminal interface
|
||||
3e3ee1a csoler Sun, 9 Jul 2017 22:12:01 +0200 little improvement to command line help display
|
||||
2c6f11e csoler Sun, 9 Jul 2017 21:59:02 +0200 restored terminal output control class
|
||||
5465e11 csoler Sun, 9 Jul 2017 21:37:39 +0200 fixed debug output
|
||||
5dfbce7 csoler Sun, 9 Jul 2017 21:16:41 +0200 fixed Terminal Api Client logic
|
||||
decbd35 csoler Sat, 8 Jul 2017 17:38:09 +0200 improved the login in the interaction between terminal api client and main
|
||||
7ee527e csoler Sat, 8 Jul 2017 17:35:34 +0200 removed comments
|
||||
b5976e1 csoler Sat, 8 Jul 2017 16:48:24 +0200 fixed message when passphrase is empty
|
||||
4f887ff csoler Sat, 8 Jul 2017 16:47:50 +0200 commented out unused line
|
||||
36a2053 NeverE Sat, 8 Jul 2017 00:20:09 +0900 add new functions to chat
|
||||
75c8b71 NeverE Sat, 8 Jul 2017 00:18:51 +0900 add new functions for chat
|
||||
fcec555 Gioacc Fri, 7 Jul 2017 11:57:17 +0200 Merge pull request #927 from Emotyco/libresapi_lobbies_invitation
|
||||
fc396dd Gioacc Fri, 7 Jul 2017 11:56:12 +0200 Merge pull request #929 from Emotyco/libresapi_empty_cert
|
||||
e46d91e Gioacc Fri, 7 Jul 2017 11:35:16 +0200 Merge branch 'android_share_intent'
|
||||
f5912a3 csoler Thu, 6 Jul 2017 22:52:30 +0200 Merge pull request #928 from PhenomRetroShare/Fix_MultiDownload
|
||||
f0ad687 Konrad Thu, 6 Jul 2017 22:44:45 +0200 Fixed: Libresapi was throwing exception when requested to add new cert which was empty
|
||||
54047cd Phenom Thu, 6 Jul 2017 22:35:54 +0200 Fix multi download of same file.
|
||||
42bf6b2 csoler Thu, 6 Jul 2017 20:57:38 +0200 improved display of password request
|
||||
a778128 csoler Thu, 6 Jul 2017 20:50:59 +0200 fixed multi-digit numbers in terminal account selection
|
||||
c630f1f Gioacc Thu, 6 Jul 2017 16:28:59 +0200 Fix unused warning in gxstokenqueue
|
||||
b935bac Gioacc Thu, 6 Jul 2017 16:28:00 +0200 Add missing break in p3IdService::handleResponse
|
||||
11d02f4 Konrad Thu, 6 Jul 2017 14:08:50 +0200 Added: Handling requests to answer invitation to lobby
|
||||
c9bfe4b Konrad Thu, 6 Jul 2017 14:07:33 +0200 Added: Handling requests to get lobbies invitations
|
||||
aca6233 Konrad Thu, 6 Jul 2017 14:05:48 +0200 Added: Handling requests to invite peers to lobby
|
||||
dad6abd Phenom Wed, 5 Jul 2017 19:30:31 +0200 Fix channel comments line wrap
|
||||
8e62a8b csoler Wed, 5 Jul 2017 22:32:54 +0200 updated tooltip for opinion in People
|
||||
141277b csoler Wed, 5 Jul 2017 22:16:14 +0200 removed debug info
|
||||
c1e18c7 csoler Wed, 5 Jul 2017 22:12:56 +0200 fixed bug causing an infinite subscribe/unsubscribe loop in GxsTrans
|
||||
370d50b csoler Wed, 5 Jul 2017 21:36:00 +0200 cleaned a bit the code in rsinit.cc
|
||||
7ee0b45 csoler Tue, 4 Jul 2017 23:27:43 +0200 Merge pull request #922 from csoler/v0.6-ImprovedGUI
|
||||
5f7df7c csoler Tue, 4 Jul 2017 23:26:57 +0200 update call to notifySettingsChanged() when changing the thread loading of channels
|
||||
2aac675 csoler Tue, 4 Jul 2017 23:15:09 +0200 merged upstream/master into v0.6-ImprovedGUI
|
||||
931ddae csoler Tue, 4 Jul 2017 23:13:03 +0200 set load thread to false for channels on default. Fixed missing () in connect
|
||||
dafaa56 Gioacc Tue, 4 Jul 2017 16:27:12 +0200 Qml App: better Android interaction on URL export
|
||||
a97ba80 Gioacc Tue, 4 Jul 2017 16:41:14 +0200 Fix missing include
|
||||
5b1def1 csoler Tue, 4 Jul 2017 10:25:40 +0200 Merge pull request #912 from Emotyco/libresapi_avatar_handlers
|
||||
3274852 csoler Tue, 4 Jul 2017 10:24:43 +0200 Merge pull request #913 from Emotyco/libresapi_participants_refresh
|
||||
ee25722 csoler Tue, 4 Jul 2017 10:24:05 +0200 Merge pull request #915 from PhenomRetroShare/Add_AlwaysAllowFriendTimeOffsetFeed
|
||||
d7f0141 csoler Tue, 4 Jul 2017 10:23:30 +0200 Merge pull request #916 from PhenomRetroShare/Add_WarningToDirectDonwloadCheckBox
|
||||
d876bb7 csoler Mon, 3 Jul 2017 23:21:31 +0200 fixing async loading of channels. To be tested.
|
||||
1dea00d csoler Mon, 3 Jul 2017 23:09:17 +0200 attempt to fix channel post auto-size by limiting the number of lines from message to display in summary depending on available size
|
||||
719b414 csoler Mon, 3 Jul 2017 22:32:08 +0200 fixed merging of comments in channel post with async-ed loading system
|
||||
f0ed0dd csoler Mon, 3 Jul 2017 22:07:23 +0200 Merge pull request #918 from RetroShare/revert-917-v0.6-ImprovedGUI
|
||||
9a5e46d csoler Mon, 3 Jul 2017 22:07:06 +0200 Revert "attempt to delay channel post loading on demand when displayed"
|
||||
f5abf54 csoler Mon, 3 Jul 2017 21:54:22 +0200 Merge pull request #917 from csoler/v0.6-ImprovedGUI
|
||||
b6d5c55 csoler Mon, 3 Jul 2017 21:48:17 +0200 attempt to delay channel post loading on demand when displayed
|
||||
3987f75 Phenom Mon, 3 Jul 2017 17:14:16 +0200 Always allow Friend Time Offset Feed item.
|
||||
2192a43 Phenom Mon, 3 Jul 2017 18:36:47 +0200 Add a warning to Direct download checkbox depends general setting.
|
||||
f413433 csoler Mon, 3 Jul 2017 11:25:12 +0200 removed zeroing of preferred group causing a bug in GxsTrans
|
||||
e9f9856 csoler Sun, 2 Jul 2017 10:42:22 +0200 fixed naming in friend groups in GroupChooser
|
||||
77b064b csoler Sat, 1 Jul 2017 17:24:58 +0200 fixed translation of built-in group names in GxsGroupDialog
|
||||
c61536e csoler Sat, 1 Jul 2017 16:21:22 +0200 fixed RsGraphWidget by adding an extra data point in the lower right corner, and fixed typo that caused an invalid point to be drawn
|
||||
f136210 csoler Sat, 1 Jul 2017 16:20:39 +0200 fixed layout in GxsTrans stats
|
||||
1323a97 csoler Sat, 1 Jul 2017 15:38:57 +0200 updated changelog
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Sun, 16 Jul 2017 12:00:00 +0100
|
||||
|
||||
retroshare06 (0.6.2-1.20170716.1323a974~trusty) trusty; urgency=low
|
||||
|
||||
244e8a8 csoler Sat, 1 Jul 2017 15:29:48 +0200 fixed display of GxsTrans statistics
|
||||
27774ba csoler Thu, 29 Jun 2017 22:13:04 +0200 Merge pull request #911 from csoler/v0.6-GxsTransport
|
||||
b294b4b csoler Thu, 29 Jun 2017 22:11:44 +0200 changed sorting of popular forums w.r.t. time of last post rather than number of supplier friends
|
||||
a864cf7 csoler Thu, 29 Jun 2017 21:12:42 +0200 Merge pull request #910 from csoler/v0.6-GxsTransport
|
||||
4b94b2e csoler Thu, 29 Jun 2017 21:12:02 +0200 improved display of GxsTrans statistics
|
||||
1b4e8a4 csoler Thu, 29 Jun 2017 18:38:10 +0200 Merge pull request #909 from csoler/v0.6-GxsTransport
|
||||
64e3fc9 csoler Thu, 29 Jun 2017 18:37:39 +0200 fixed bug preventing correct subscribe in GxsTrans
|
||||
700d114 csoler Thu, 29 Jun 2017 18:27:00 +0200 fixed bug causing failure of group autosubscribe in GxsTrans
|
||||
cb31a92 csoler Thu, 29 Jun 2017 18:03:31 +0200 Merge pull request #907 from PhenomRetroShare/Add_GeneralDirectDLSetting
|
||||
b4071d1 Phenom Mon, 26 Jun 2017 23:35:01 +0200 Add General Direct Download setting.
|
||||
a3e8b96 csoler Thu, 29 Jun 2017 13:50:41 +0200 Merge pull request #908 from csoler/v0.6-GxsTransport
|
||||
37edcc1 csoler Thu, 29 Jun 2017 13:44:40 +0200 fixed subscribe policy to GxsTrans groups as a function of last available post and group usage
|
||||
dc605c0 csoler Thu, 29 Jun 2017 13:15:39 +0200 added a last modif TS in GrpNetworkStats, that is inited from network Grp statistics, and used to provide a value for unsubscribed groups
|
||||
533e2a8 csoler Wed, 28 Jun 2017 23:23:27 +0200 added check to fix existing wrong storage time value in GxsTrans
|
||||
f37ba83 csoler Wed, 28 Jun 2017 23:12:33 +0200 moved msg keep period settings to netService and made the initialisation obei the default settings of the service
|
||||
b96effb csoler Wed, 28 Jun 2017 22:37:50 +0200 Merge pull request #895 from PhenomRetroShare/Add_HelpInRelayTab
|
||||
3550971 csoler Wed, 28 Jun 2017 22:37:05 +0200 Merge pull request #902 from Emotyco/libresapi_avatar_handlers
|
||||
12b5628 csoler Tue, 27 Jun 2017 22:21:35 +0200 added more debug info in GxsUtil
|
||||
51c7e18 csoler Tue, 27 Jun 2017 19:56:21 +0200 added last msg time in GxsTrans stats. Added mutex to protect non atomic mPreferredGroup
|
||||
579c944 csoler Sun, 25 Jun 2017 21:50:51 +0200 Merge pull request #903 from sehraf/improve-server-page
|
||||
3c54beb sehraf Sun, 25 Jun 2017 19:19:07 +0200 hide hidden service port for I2P instead of just disabling it (it's not used for I2P)
|
||||
e128fcb Konrad Sun, 25 Jun 2017 15:35:23 +0200 Added: Creating identity with avatar in libresapi
|
||||
54166ce Konrad Sun, 25 Jun 2017 14:30:38 +0200 Added: Handling requests to set and get identity avatar
|
||||
c3a78ce csoler Sat, 24 Jun 2017 13:14:24 +0200 Merge pull request #900 from csoler/v0.6-GxsTransport
|
||||
8c4396c csoler Sat, 24 Jun 2017 12:54:06 +0200 Merge pull request #899 from Emotyco/libresapi_wrong_password_notification
|
||||
66a9dad Konrad Sat, 24 Jun 2017 12:05:32 +0200 Fixed: Information about wrong password
|
||||
2aac999 Konrad Sat, 24 Jun 2017 12:02:28 +0200 Fixed: Duplication of handler declaration
|
||||
332fedd csoler Sat, 24 Jun 2017 11:38:48 +0200 fixed mismatched free/delete[] in AvatarDefs
|
||||
2bb49f6 csoler Fri, 23 Jun 2017 21:58:54 +0200 Merge pull request #898 from csoler/v0.6-GxsTransport
|
||||
0f99647 csoler Fri, 23 Jun 2017 21:58:17 +0200 fixed memory leak in GxsTrans
|
||||
25a71c9 csoler Fri, 23 Jun 2017 21:24:37 +0200 Merge pull request #897 from PhenomRetroShare/Fix_ChannelPostButton
|
||||
adfc594 Phenom Fri, 23 Jun 2017 20:33:43 +0200 Fix GxsChannelPostItem button, like "download" or "Play" never shown.
|
||||
c415e11 Phenom Thu, 22 Jun 2017 18:52:03 +0200 Add help in Relay setting tab.
|
||||
07ecbec csoler Thu, 22 Jun 2017 18:05:39 +0200 fixed bug in makeSourcePackage which would always grab the release branch
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Sat, 01 Jul 2017 16:00:00 +0100
|
||||
|
||||
retroshare06 (0.6.2-1.20170623.07ecbec6~precise) precise; urgency=low
|
||||
|
||||
c34165e csoler Wed, 21 Jun 2017 08:08:29 +0200 pushed new changelog to force update of the date...
|
||||
8950acc csoler Thu, 22 Jun 2017 00:39:03 +0200 Merge pull request #892 from PhenomRetroShare/Add_MoveRelayPageToNetwork
|
||||
ea8af8a Phenom Wed, 21 Jun 2017 17:57:14 +0200 Move Relay setting page to network one.
|
||||
8cc82f9 csoler Wed, 21 Jun 2017 18:32:51 +0200 Merge pull request #891 from PhenomRetroShare/Fix_MessageToHeight
|
||||
812e606 csoler Tue, 20 Jun 2017 23:40:58 +0200 fixed changelog for typo
|
||||
1f9320c csoler Tue, 20 Jun 2017 21:17:21 +0200 updated changelog
|
||||
310c848 csoler Wed, 21 Jun 2017 07:42:15 +0200 Merge pull request #890 from G10h4ck/qml_app_identity_avatar
|
||||
c46c747 Phenom Wed, 21 Jun 2017 06:35:29 +0200 Fix To, Cc & Bcc height in MessageWidget.
|
||||
1d03191 Gioacc Tue, 20 Jun 2017 17:16:27 +0200 Created a dedicated component for avatar image
|
||||
8c62c2a Gioacc Tue, 20 Jun 2017 15:35:05 +0200 Qml app: show contact avatar in details if available
|
||||
b206015 Gioacc Tue, 20 Jun 2017 15:33:28 +0200 libresapi: expose identity avatar in JSON API
|
||||
0133be7 csoler Sat, 17 Jun 2017 23:07:10 +0200 Merge pull request #887 from csoler/v0.6-GxsTransport
|
||||
12a4529 csoler Sat, 17 Jun 2017 23:02:28 +0200 added ifdef for comments on GxsTrans
|
||||
eb4bb5b csoler Sat, 17 Jun 2017 21:42:00 +0200 fixed bug in gxs trans stats counting
|
||||
43dcddc csoler Fri, 16 Jun 2017 12:37:09 +0200 Merge pull request #880 from PhenomRetroShare/Add_GxsCircleNotify
|
||||
a29bc44 csoler Fri, 16 Jun 2017 12:24:45 +0200 Merge pull request #874 from G10h4ck/silent_initiate_distant_chat_api
|
||||
12eed8e csoler Fri, 16 Jun 2017 12:22:57 +0200 Merge pull request #884 from sehraf/pr-fix-bob-settings
|
||||
25565a7 csoler Thu, 15 Jun 2017 23:58:29 +0200 merged upstream/master
|
||||
6633b04 csoler Thu, 15 Jun 2017 23:57:02 +0200 changed constants for GxsTransport anti-spam
|
||||
26bb865 csoler Thu, 15 Jun 2017 19:32:31 +0200 added code to reject messages based on existing per-user statistics
|
||||
65ab68b sehraf Thu, 15 Jun 2017 07:20:24 +0200 fix stop button being wrongly disabled
|
||||
fe5ec8b sehraf Thu, 15 Jun 2017 07:06:52 +0200 reduce BOB log level
|
||||
09ff94c csoler Wed, 14 Jun 2017 23:19:52 +0200 added new virtual method to refuse incoming msgs (similar to groups) in RsGenExchange, and used it in p3GxsTrans to refuse msgs from peers who send too much
|
||||
c451d3a csoler Mon, 12 Jun 2017 22:18:34 +0200 Merge pull request #873 from RetroPooh/tunnstats
|
||||
1e7feec csoler Mon, 12 Jun 2017 22:16:46 +0200 Merge pull request #882 from topcat/iss879
|
||||
79825eb csoler Mon, 12 Jun 2017 20:36:02 +0200 fixed thread issue in RsGxsCleanupThread that caused random crashes
|
||||
80ec9b7 Jeetu Mon, 12 Jun 2017 15:51:26 +0530 Included QStringList header in ApiServerLocal.cpp [Issue 879]
|
||||
aa64c4d Phenom Tue, 30 May 2017 22:23:31 +0200 Add Circle Feed Item.
|
||||
1766087 csoler Wed, 7 Jun 2017 23:10:59 +0200 fixed update notification and display in GxsTransStatistics
|
||||
9853b53 csoler Wed, 7 Jun 2017 23:10:24 +0200 fixed debug output in GxsNetService
|
||||
7691a8e csoler Wed, 7 Jun 2017 21:41:20 +0200 removed debug info
|
||||
4cb7522 csoler Wed, 7 Jun 2017 21:41:00 +0200 added deleted gxs messages to the reject list of GxsNetService to avoid re-downloading them right away
|
||||
edd82d0 Gioacc Wed, 7 Jun 2017 21:37:03 +0200 libresapi: stop assuming first chat message is own
|
||||
318ea31 csoler Sat, 3 Jun 2017 10:30:22 +0200 fixed layout of GxsTrans stats
|
||||
23156ab csoler Sat, 3 Jun 2017 10:30:02 +0200 fixed malloc problem when chat avatar is missing
|
||||
e726bd1 csoler Wed, 7 Jun 2017 13:37:38 +0200 attempt to fix the crash in DataStore by not calling deleteMsgs directly
|
||||
39f003f csoler Tue, 6 Jun 2017 22:00:08 +0200 Merge pull request #875 from csoler/v0.6-GxsTransport
|
||||
528317d Gioacc Tue, 6 Jun 2017 18:57:32 +0200 libresapi: silent /chat/initiate_distant_chat
|
||||
f62028b csoler Tue, 6 Jun 2017 00:15:06 +0200 moved metadata info to members of OutgoingRecord, so that the un-serialized meta is not lost when saved. Ensured backward compatibility when reloading old items.
|
||||
1e652d6 csoler Mon, 5 Jun 2017 22:27:54 +0200 reduced number of calls to indicateConfigChanged(), and renamed mIngoingQueue into mIncomingQueue in GxsTrans
|
||||
0098433 csoler Mon, 5 Jun 2017 21:51:59 +0200 Merge pull request #871 from Emotyco/changed_socket_path_windows
|
||||
b7c09bd csoler Mon, 5 Jun 2017 21:15:42 +0200 added calls to indicateConfigChanged() to force saving GxsTrans outgoing records when updated
|
||||
2d8fd07 RetroP Mon, 5 Jun 2017 14:25:09 +0300 stats tunnels rearranged columns for better readablilty
|
||||
ca1dc9d Konrad Sun, 4 Jun 2017 22:10:41 +0200 Changed: Unified socket path across systems.
|
||||
318b2cb csoler Sun, 4 Jun 2017 20:38:20 +0200 Merge pull request #870 from BabushkaRetroShare/master
|
||||
7fb0419 Babush Sun, 4 Jun 2017 20:34:10 +0200 Typo fixes
|
||||
458e180 csoler Sun, 4 Jun 2017 18:44:26 +0200 Merge pull request #869 from csoler/v0.6-GxsTransport
|
||||
1967204 csoler Sun, 4 Jun 2017 18:43:12 +0200 restored GXS trans cleanign delay
|
||||
831b560 csoler Sun, 4 Jun 2017 18:37:38 +0200 moved deletion of msgs in GxsTransport inside the service thread
|
||||
5eaab25 csoler Sat, 3 Jun 2017 20:00:54 +0200 Merge pull request #833 from Emotyco/libresapi_network_configuration
|
||||
861dab3 csoler Sat, 3 Jun 2017 13:27:21 +0200 Merge pull request #863 from G10h4ck/qmlapp_pex_alpha
|
||||
e3cd3b6 csoler Fri, 2 Jun 2017 23:26:24 +0200 fixed bug causing display of null group in GxsTransportStatistics
|
||||
fb7ac7a csoler Fri, 2 Jun 2017 23:10:43 +0200 fixed mismatched free/delete (free is used in rschatitems.cc to delete avatars)
|
||||
efdfa46 Gioacc Fri, 2 Jun 2017 10:39:42 +0200 Merge branch 'libresapi_attempt_connection' into qmlapp_pex_alpha
|
||||
8b72c9c Gioacc Fri, 2 Jun 2017 10:26:15 +0200 libresapi expose connection attempt method
|
||||
8e7e700 csoler Thu, 1 Jun 2017 10:16:30 +0200 fixed compilation for windows
|
||||
59b77da Gioacc Wed, 31 May 2017 12:11:15 +0200 Merge branch 'master' into qmlapp_pex_alpha
|
||||
1ebcc60 csoler Tue, 30 May 2017 22:22:06 +0200 Merge pull request #861 from RetroShare/v0.6-GxsTransport
|
||||
d7797f1 csoler Tue, 30 May 2017 21:42:29 +0200 Merge pull request #856 from G10h4ck/GxsTransOptionalChat
|
||||
eacf23d csoler Tue, 30 May 2017 21:40:41 +0200 Merge pull request #860 from csoler/v0.6-GxsTransport
|
||||
832ba69 csoler Tue, 30 May 2017 21:38:59 +0200 fixed up cleanup for GxsTransport
|
||||
a7eb167 csoler Tue, 30 May 2017 20:57:20 +0200 fixed a bug in RsThread which made finished threads unaware of their state
|
||||
32ad43a csoler Tue, 30 May 2017 20:46:49 +0200 Merge pull request #859 from PhenomRetroShare/Fix_StartDialogMargin
|
||||
5410c51 csoler Tue, 30 May 2017 20:45:39 +0200 added cleanup thread for GxsTransport
|
||||
34fbee2 Phenom Tue, 30 May 2017 20:34:12 +0200 Fix StartDialog margins.
|
||||
5c71d52 Gioacc Tue, 30 May 2017 15:43:43 +0200 async chat disabled by default in GUI
|
||||
f4c167c csoler Tue, 30 May 2017 13:57:11 +0200 improved display of GXS Transport stats
|
||||
2e3f62a csoler Mon, 29 May 2017 23:06:31 +0200 added msg ids to GxsTransport statistics.
|
||||
bd1edbc csoler Sun, 28 May 2017 22:50:34 +0200 Merge pull request #850 from csoler/v0.6-GxsTransport
|
||||
0868b64 csoler Sun, 28 May 2017 22:49:07 +0200 fixed uninitialized memory read in GxsTrans msg Id
|
||||
4c07050 csoler Sun, 28 May 2017 22:02:14 +0200 Merge pull request #841 from sehraf/pr-minor-fix
|
||||
048045a csoler Sun, 28 May 2017 22:01:28 +0200 Merge pull request #849 from PhenomRetroShare/Fix_logo_web_nobackground
|
||||
54e91e3 csoler Sun, 28 May 2017 22:00:49 +0200 Merge pull request #840 from felisucoibi/master
|
||||
9121ff6 csoler Sun, 28 May 2017 21:59:48 +0200 Merge pull request #848 from PhenomRetroShare/Fix_WindowsCompil
|
||||
9d2e0d7 Phenom Sun, 28 May 2017 15:19:27 +0200 Fix Appveyor
|
||||
5c99297 Phenom Sun, 28 May 2017 13:19:22 +0200 Fix logo_web_nobackground
|
||||
28119b5 Phenom Sun, 28 May 2017 12:57:36 +0200 Fix Windows Compilation
|
||||
6d76624 csoler Sat, 27 May 2017 23:16:20 +0200 fixed uninitialized memory read in grouter
|
||||
e0498ba csoler Sat, 27 May 2017 22:37:14 +0200 Merge pull request #846 from csoler/v0.6-GxsTransport
|
||||
eea63ac csoler Sat, 27 May 2017 22:19:52 +0200 minor code cleaning in p3GxsTrans (struct->class for consistency, sendMail->sendData), added popularity+subscribed status display in statistics
|
||||
753867e csoler Sat, 27 May 2017 15:22:32 +0200 Merge pull request #845 from csoler/v0.6-GxsTransport
|
||||
6da8b2a csoler Sat, 27 May 2017 15:13:23 +0200 fixed up icons in statistics window
|
||||
e06bd9b csoler Sat, 27 May 2017 14:48:08 +0200 added icon for GxsTransport
|
||||
4fef4d6 csoler Sat, 27 May 2017 14:23:16 +0200 added display of the various GxsTrans groups and their respective sizes
|
||||
7c43998 csoler Fri, 26 May 2017 22:04:33 +0200 Merge pull request #842 from csoler/v0.6-GxsTransport
|
||||
541b42a sehraf Fri, 26 May 2017 20:29:43 +0200 minor fix
|
||||
a3096f2 csoler Fri, 26 May 2017 20:28:44 +0200 added data hash to GxsTrans display
|
||||
95b0273 felisu Fri, 26 May 2017 18:54:02 +0200 small fix removed ... from text login screen.
|
||||
4fa6cbe csoler Fri, 26 May 2017 18:42:52 +0200 fixed display in GxsTrans stats widget
|
||||
95f1719 felisu Fri, 26 May 2017 18:37:05 +0200 Changed login screen add Profile/Node text.
|
||||
1e8df12 felisu Fri, 26 May 2017 18:19:06 +0200 Final step to change again size and design of start up login screen. 4/4
|
||||
7281222 felisu Fri, 26 May 2017 18:15:14 +0200 Login screen 3 / 4
|
||||
2dbe3a1 felisu Fri, 26 May 2017 18:13:57 +0200 Start login 2/4
|
||||
0fa3b9e felisu Fri, 26 May 2017 18:12:24 +0200 smaller login screen and less blue 1
|
||||
873131f csoler Thu, 25 May 2017 22:20:18 +0200 Merge pull request #836 from sehraf/pr-add-i2p-bob-v2.1
|
||||
14b9a54 csoler Thu, 25 May 2017 16:56:29 +0200 added group data retrieval to GxsTransStatistics
|
||||
a3ee85a sehraf Sun, 9 Oct 2016 14:32:52 +0200 Add I2P BOB support to libretroashare and RetroShare GUI
|
||||
9ff81b9 csoler Tue, 23 May 2017 22:06:46 +0200 Merge pull request #835 from felisucoibi/master
|
||||
483d538 defnax Tue, 23 May 2017 18:46:50 +0200 fit the background image to the login page
|
||||
a136fb6 csoler Mon, 22 May 2017 23:54:55 +0200 added display of ongoing record status for GxsTrans. Unfinished.
|
||||
ac66ee7 felisu Mon, 22 May 2017 15:21:06 +0200 Improved GUI gencert
|
||||
9b67e93 Konrad Sun, 21 May 2017 19:51:52 +0200 Added: Network configuration to libresapi.
|
||||
fbeb6ff csoler Sun, 21 May 2017 15:57:10 +0200 added infrastructure for gathering statistics about GxsTransport. Unfinished.
|
||||
8c1babe csoler Sun, 21 May 2017 15:12:49 +0200 Merge pull request #832 from felisucoibi/master
|
||||
2adde95 felisu Sun, 21 May 2017 15:08:07 +0200 fixed bad uploading of previous pr
|
||||
dbc2396 csoler Sun, 21 May 2017 14:52:20 +0200 Merge pull request #830 from Gottox/fix-libressl
|
||||
6bc72dd felisu Sun, 21 May 2017 14:51:43 +0200 restored start dialog and fixed
|
||||
33ab7fa csoler Sun, 21 May 2017 14:49:13 +0200 Merge pull request #831 from Gottox/fix-musl
|
||||
b341fea csoler Sun, 21 May 2017 13:49:41 +0200 merged upstream/master
|
||||
a5cebb9 felisu Sun, 21 May 2017 12:35:43 +0200 simplified and upgraded gui logo added
|
||||
ecf3fc5 felisu Sun, 21 May 2017 12:34:52 +0200 simplified gui
|
||||
d83c42d felisu Sun, 21 May 2017 12:33:40 +0200 Add files via upload
|
||||
a578acd Enno B Sun, 21 May 2017 10:54:19 +0200 fix building with musl libc
|
||||
2046d9e Enno B Sun, 21 May 2017 10:48:58 +0200 fix building with libressl
|
||||
95c9b37 defnax Sun, 21 May 2017 04:12:34 +0200 update background image resolution
|
||||
a439fbf csoler Sat, 20 May 2017 23:01:56 +0200 fixed bug (due to new serializer) that caused a wrong hash to be computed when sending distant messages
|
||||
ef59a60 csoler Sat, 20 May 2017 22:39:53 +0200 Merge pull request #828 from csoler/v0.6-EditPosts
|
||||
162095b csoler Sat, 20 May 2017 22:37:31 +0200 fixed count of unread/new posts by not counting older versions
|
||||
8b079f8 csoler Sat, 20 May 2017 18:34:07 +0200 Merge pull request #827 from csoler/v0.6-EditPosts
|
||||
0321037 csoler Sat, 20 May 2017 18:15:57 +0200 fixed centering of comments
|
||||
7a2807a defnax Sat, 20 May 2017 18:06:23 +0200 added missed icon
|
||||
9da1e1c csoler Sat, 20 May 2017 17:53:25 +0200 fixed proper comment number in channels feeds
|
||||
51710c1 csoler Sat, 20 May 2017 17:33:05 +0200 merge comments between channel item versions
|
||||
bda7a50 defnax Sat, 20 May 2017 15:14:43 +0200 Improved look & feel for Generate and Login Window
|
||||
d79c117 csoler Fri, 19 May 2017 22:12:02 +0200 Merge pull request #826 from PhenomRetroShare/Fix_ChatFontSetting
|
||||
7acefda Phenom Fri, 19 May 2017 18:40:17 +0200 Fix Chat Font setting saving.
|
||||
6b09fa0 csoler Thu, 18 May 2017 22:31:52 +0200 allow GxsFeedItems to have versions. Unfinished (does not compile)
|
||||
db3dad3 Gioacc Thu, 18 May 2017 21:57:24 +0200 Local API binary output support + qml image example
|
||||
e59366d Gioacc Wed, 17 May 2017 15:49:26 +0200 Qml app: made contact sorting case insensitive
|
||||
97a0e00 Gioacc Wed, 17 May 2017 15:34:29 +0200 Qml Better debugging for token manager
|
||||
c1c1d5d Gioacc Wed, 17 May 2017 15:33:10 +0200 Qml app: fixed unread messages count displaying
|
||||
d5ec641 csoler Tue, 16 May 2017 19:45:27 +0200 changing background color as a function of commenter ID (needs to be further adapted to all styles)
|
||||
86118d9 csoler Tue, 16 May 2017 10:26:03 +0200 Merge pull request #823 from csoler/v0.6-EditPosts
|
||||
fd136c1 csoler Tue, 16 May 2017 10:24:23 +0200 made gxs comments multi-lines
|
||||
b9d19c2 csoler Mon, 15 May 2017 22:17:26 +0200 Merge pull request #822 from csoler/v0.6-EditPosts
|
||||
2bc36bc csoler Mon, 15 May 2017 22:13:36 +0200 properly merge new version feed items in channels when some items are already present
|
||||
84e588b csoler Mon, 15 May 2017 21:37:22 +0200 switch file to REMOTE state in subfileitem if the attachment has already been checked in the past but the file is not here anymore
|
||||
635918e csoler Mon, 15 May 2017 20:09:58 +0200 Merge pull request #821 from G10h4ck/v0.6-GxsTransport
|
||||
de9a44f Gioacc Mon, 15 May 2017 19:16:08 +0200 Merge branch 'v0.6-GxsTransport' into qmlapp_pex_alpha
|
||||
10ec527 Gioacc Mon, 15 May 2017 15:00:21 +0200 Fix GxsTrans related serialization regressions
|
||||
745462a Gioacc Mon, 15 May 2017 15:05:07 +0200 Merge branch 'v0.6-GxsTransport' into qmlapp_pex_alpha
|
||||
93a6b7d Gioacc Mon, 15 May 2017 15:00:21 +0200 Fix serialization regression in async chat
|
||||
d335d45 thunder2 Mon, 15 May 2017 09:43:47 +0200 Fixed build script for Windows
|
||||
32b7003 csoler Sun, 14 May 2017 21:44:08 +0200 Merge pull request #820 from csoler/v0.6-EditPosts
|
||||
18e37de csoler Sun, 14 May 2017 21:41:26 +0200 hide download buttons when the file is local in sub file item
|
||||
1824da1 csoler Sun, 14 May 2017 21:29:04 +0200 Merge pull request #819 from csoler/v0.6-EditPosts
|
||||
f832f3d csoler Sun, 14 May 2017 21:26:45 +0200 added delete button to channel attached files
|
||||
af57545 csoler Sun, 14 May 2017 20:59:43 +0200 removed unused button in GxsChannelPostsWidget
|
||||
9077d80 csoler Sun, 14 May 2017 17:52:40 +0200 Merge pull request #817 from csoler/v0.6-EditPosts
|
||||
2f43927 csoler Sat, 13 May 2017 21:13:24 +0200 Merge pull request #698 from G10h4ck/gxs_mail_experiments
|
||||
c0c5cc5 csoler Sat, 13 May 2017 21:08:16 +0200 Merge branch 'master' into gxs_mail_experiments
|
||||
01bb4b0 csoler Sat, 13 May 2017 20:41:56 +0200 added ifdefs around debug info and fixed a few bugs in channel post edit
|
||||
6859e0d csoler Sat, 13 May 2017 17:13:05 +0200 fixed post replacement algorithm in channel editing
|
||||
022c545 Gioacc Sat, 13 May 2017 12:52:45 +0200 Qml app: show contact details when avater clicked
|
||||
0b82b73 Gioacc Sat, 13 May 2017 11:43:31 +0200 Qml app: fixed import/export of plain certificate
|
||||
659e3c9 csoler Fri, 12 May 2017 23:55:09 +0200 merged upstream/master
|
||||
305c5d6 csoler Fri, 12 May 2017 23:54:02 +0200 added collapsing of new versions of channel posts
|
||||
2f17a80 defnax Fri, 12 May 2017 21:39:50 +0200 added missed icons
|
||||
837fcd7 defnax Fri, 12 May 2017 18:29:39 +0200 Added Placeholder text for Password field, removed "Password:" label.
|
||||
5044ac1 csoler Thu, 11 May 2017 23:44:57 +0200 moved the edit button from top bar to each channel post
|
||||
5406da9 csoler Thu, 11 May 2017 23:21:13 +0200 first part of channel post editing
|
||||
38d0743 csoler Thu, 11 May 2017 18:46:40 +0200 used more saturated colors in stats graph
|
||||
7a19dee csoler Thu, 11 May 2017 14:52:26 +0200 small fix to statistics view
|
||||
eb30af5 csoler Thu, 11 May 2017 14:42:06 +0200 improved display in bw statistics
|
||||
d73e850 defnax Thu, 11 May 2017 18:14:21 +0200 look n feel improvements
|
||||
7eb5e8e csoler Wed, 10 May 2017 21:37:06 +0200 added warning when switching opmode status to non turtle for the first time
|
||||
1ff1b89 Phenom Sun, 7 Feb 2016 11:45:55 +0100 Save last state of OpMode status bar droplist and restore it at start.
|
||||
3cc79fb csoler Wed, 10 May 2017 20:00:42 +0200 Merge pull request #774 from PhenomRetroShare/Fix_LobbyTopic
|
||||
af18e4c csoler Wed, 10 May 2017 19:34:53 +0200 Merge pull request #816 from PhenomRetroShare/Fix_StartPasswordFocus
|
||||
6ffae36 Phenom Wed, 10 May 2017 19:06:03 +0200 Fix Start page password focus.
|
||||
11708c8 csoler Tue, 9 May 2017 22:44:00 +0200 Merge pull request #814 from csoler/v0.6-ImprovedGUI
|
||||
bd9a8ae csoler Tue, 9 May 2017 22:39:15 +0200 prevent to remove old forum messages that have follow-ups.
|
||||
5d7d8c0 csoler Tue, 9 May 2017 21:56:22 +0200 Merge pull request #813 from csoler/v0.6-ImprovedGUI
|
||||
52a0aea csoler Tue, 9 May 2017 21:33:02 +0200 fixed bug causing edited posts to turn into missing messages when they have submessages
|
||||
0edbc26 csoler Tue, 9 May 2017 19:34:48 +0200 Merge pull request #812 from PhenomRetroShare/Fix_TextColorGrayForumThread
|
||||
a5386eb Phenom Tue, 9 May 2017 19:19:13 +0200 Fix text's color gray in Forum thread when selected.
|
||||
0af05d2 csoler Tue, 9 May 2017 19:06:31 +0200 patch to avoid re-asking for rejected plugins when the executable is upgraded.
|
||||
88525e4 csoler Tue, 9 May 2017 18:55:28 +0200 Merge pull request #811 from PhenomRetroShare/Add_OpenCertFileInHomeAddFriend
|
||||
237db96 Phenom Mon, 8 May 2017 17:26:12 +0200 Add Open Cert File in Home Add Friend wizard.
|
||||
34dd68d csoler Mon, 8 May 2017 23:05:16 +0200 Merge pull request #809 from csoler/v0.6-FT
|
||||
e0cb0f4 csoler Mon, 8 May 2017 23:04:04 +0200 fixed previous commit
|
||||
9a0df3f csoler Mon, 8 May 2017 22:21:28 +0200 Merge pull request #804 from PhenomRetroShare/Fix_Warnings
|
||||
9a7f78f csoler Mon, 8 May 2017 22:18:51 +0200 Merge pull request #805 from PhenomRetroShare/Fix_Commit_#77adc82
|
||||
caa36b4 csoler Mon, 8 May 2017 22:17:09 +0200 Merge pull request #807 from PhenomRetroShare/Fix_ToasterPositionSetting
|
||||
d74bb2a csoler Mon, 8 May 2017 22:16:39 +0200 Merge pull request #806 from PhenomRetroShare/Fix_LobbySoundNotification
|
||||
4a2f5f0 csoler Mon, 8 May 2017 22:02:38 +0200 Merge pull request #808 from csoler/v0.6-FT
|
||||
8a86b9e csoler Mon, 8 May 2017 22:00:51 +0200 added a per-friend upload slots limit in FT. Default is 0=unlimited
|
||||
39646f3 Gioacc Mon, 8 May 2017 20:44:15 +0200 qml app removed unused icon
|
||||
d0b881f Gioacc Mon, 8 May 2017 20:35:15 +0200 Added view to show/edit contact details
|
||||
52a04e1 csoler Mon, 8 May 2017 18:24:32 +0200 updated ubuntu changelog
|
||||
f67617a Gioacc Mon, 8 May 2017 16:57:37 +0200 Add override and final placeolders for old GCC compatibility
|
||||
d02cba5 Phenom Sun, 16 Apr 2017 17:53:37 +0200 Fix Lobby Topic not send on invite.
|
||||
594ab53 Phenom Mon, 8 May 2017 15:37:18 +0200 Fix Toaster Position Setting.
|
||||
a869a37 Phenom Mon, 8 May 2017 15:29:11 +0200 Fix Lobby's sound notification.
|
||||
79bbe0e Phenom Mon, 8 May 2017 14:53:53 +0200 Fix Commit #77adc82
|
||||
ccaf488 Gioacc Mon, 8 May 2017 13:38:29 +0200 Merge branch 'master' into qmlapp_pex_alpha
|
||||
4a2f688 Phenom Mon, 8 May 2017 13:01:34 +0200 Fix Windows Compilation:
|
||||
8f30634 Gioacc Mon, 8 May 2017 12:33:40 +0200 Merge branch 'gxs_mail_experiments' into qmlapp_pex_alpha
|
||||
5022ef0 Phenom Mon, 8 May 2017 12:26:37 +0200 Fix Warnings: this ‘if’ clause does not guard...
|
||||
f352939 Phenom Mon, 8 May 2017 12:25:29 +0200 Fix Warnings:
|
||||
bf47edf Phenom Mon, 8 May 2017 12:22:46 +0200 Fix Warnings:
|
||||
523730f Phenom Mon, 8 May 2017 12:21:08 +0200 Fix Warnings: unused parameter ‘resp’, 'req' & 'resp'
|
||||
a6acc72 Phenom Mon, 8 May 2017 12:18:51 +0200 Fix Warnings: this ‘if’ clause does not guard...
|
||||
58c812a Phenom Mon, 8 May 2017 12:17:01 +0200 Fix Warnings: unused parameter ‘s’
|
||||
ee7e92d Phenom Mon, 8 May 2017 12:15:45 +0200 Fix Warnings: this ‘if’ clause does not guard...
|
||||
9b1209d Phenom Mon, 8 May 2017 12:14:04 +0200 Fix Warnings: unused parameter ‘s’ & 'n'
|
||||
91e3cc3 Phenom Mon, 8 May 2017 12:08:29 +0200 Fix Warnings: variable ‘p’ set but not used
|
||||
ca291b7 Phenom Mon, 8 May 2017 12:05:58 +0200 Fix Warnings: warning: unused variable ‘i2d’
|
||||
9021609 Phenom Mon, 8 May 2017 11:55:23 +0200 Fix Warnings: unused variable ‘p’
|
||||
7892004 Phenom Mon, 8 May 2017 11:53:16 +0200 Fix Warnings: unused parameter ‘member_name’
|
||||
381aca4 Phenom Mon, 8 May 2017 11:49:39 +0200 Fix Warnings: unused parameter ‘j’, 'ctx' & 'name'
|
||||
dd089a9 Phenom Mon, 8 May 2017 11:46:54 +0200 Fix Warnings: this ‘if’ clause does not guard
|
||||
5050d4f Phenom Mon, 8 May 2017 11:42:49 +0200 Fix Warnings: unused parameter ‘indent’ warning: unused parameter ‘indent’ [-Wunused-parameter] virtual std::ostream& print(std::ostream &out, uint16_t indent = 0) { return out; } // derived from RsItem, but should be removed
|
||||
8e9b3c9 Gioacc Mon, 8 May 2017 12:03:42 +0200 Fix missing include
|
||||
add529f csoler Mon, 8 May 2017 11:41:34 +0200 Merge pull request #803 from PhenomRetroShare/Fix_UnitTest
|
||||
4e2db2f Phenom Mon, 8 May 2017 11:30:54 +0200 Fix UnitTest
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Mon, 20 Jun 2017 22:00:00 +0100
|
||||
|
||||
retroshare06 (0.6.2-1.20170508.52a04e1f~precise) precise; urgency=low
|
||||
|
||||
9714409 csoler Mon, 8 May 2017 10:57:00 +0200 Merge pull request #802 from csoler/v0.6-ImprovedGUI
|
||||
de0f8b9 csoler Mon, 8 May 2017 10:51:15 +0200 moved passphrase box into start dialog, and removed blank logo, replaced it by RS splash logo
|
||||
6cb4990 csoler Mon, 8 May 2017 10:06:40 +0200 fixed compilation with qt4
|
||||
84c8158 csoler Mon, 8 May 2017 09:38:33 +0200 disabled show OpMode status on default
|
||||
24eca4a defnax Sun, 7 May 2017 19:39:20 +0200 Moved status icon column to the last position
|
||||
b18a186 csoler Sat, 6 May 2017 18:20:48 +0200 fixed ftExtraList to accept e2e encrypted transfers in addition to direct transfers. This fixed the drag+drop of shared files in a distant chat
|
||||
59ac5a5 csoler Sat, 6 May 2017 16:51:38 +0200 added on-the-fly fix of group privacy flags, so that edited groups with old un-set flags will be set automatically. Also fixes the bug preventing to grant membership on old circles
|
||||
868c046 csoler Sat, 6 May 2017 13:23:26 +0200 fixed bug in serializer caused to not updating the size parameter. Also fixes unittests
|
||||
f7f0d8d csoler Fri, 5 May 2017 23:10:07 +0200 Merge pull request #800 from sehraf/pr-openssl-chacha20
|
||||
00c80b1 csoler Fri, 5 May 2017 23:06:25 +0200 Merge pull request #797 from PhenomRetroShare/Fix_WindowsCompilation
|
||||
e4dde95 csoler Fri, 5 May 2017 23:04:28 +0200 Merge pull request #798 from PhenomRetroShare/Fix_TravisCompilation
|
||||
7371fdc sehraf Fri, 5 May 2017 18:50:40 +0200 add openssl chacha20 support
|
||||
96b4a1b sehraf Fri, 5 May 2017 15:40:02 +0200 add openssl chacha20-poly1305 support
|
||||
e913f36 csoler Thu, 4 May 2017 21:40:32 +0200 fixed crash when trying to deserialize an empty buffer in rsrecogn
|
||||
2f2715b csoler Thu, 4 May 2017 21:23:21 +0200 Merge pull request #799 from csoler/v0.6-ImprovedGUI
|
||||
6484ea6 csoler Thu, 4 May 2017 21:19:23 +0200 improved graph widget
|
||||
e6a7168 csoler Thu, 4 May 2017 16:41:02 +0200 merged upstream/master
|
||||
1c2b43b Phenom Thu, 4 May 2017 15:01:25 +0200 Fix UnitTest compilation
|
||||
d31b80c Phenom Thu, 4 May 2017 11:31:36 +0200 Fix Windows Compilation
|
||||
cac335e csoler Wed, 3 May 2017 23:05:50 +0200 Merge pull request #796 from csoler/v0.6-Serialization
|
||||
4f4240d csoler Wed, 3 May 2017 22:43:16 +0200 fixed bug in history serializer
|
||||
214aaa7 csoler Wed, 3 May 2017 22:20:58 +0200 added safety check for null chunks in TlvMemBlock_proxy deserialization
|
||||
f006146 csoler Tue, 2 May 2017 22:41:01 +0200 merged upstream/master
|
||||
4bee52c csoler Tue, 2 May 2017 22:34:45 +0200 removed old unused serialization code
|
||||
861dc16 csoler Tue, 2 May 2017 22:05:54 +0200 switched VOIP to new serialization
|
||||
c481186 csoler Tue, 2 May 2017 10:14:12 +0200 Merge pull request #793 from PhenomRetroShare/Fix_FriendListExport
|
||||
99d8b7d csoler Mon, 1 May 2017 21:23:34 +0200 switched service control items to new serialization
|
||||
07201e8 Phenom Mon, 1 May 2017 12:48:11 +0200 Fix FriendList Import/Export filename and error message.
|
||||
1f56db5 csoler Sun, 30 Apr 2017 22:45:18 +0200 Merge pull request #790 from PhenomRetroShare/Add_CreateGxsIdentityByDefault
|
||||
0c17570 csoler Sun, 30 Apr 2017 22:44:20 +0200 Merge pull request #792 from PhenomRetroShare/Add_DoubleClickOnTextBrowser
|
||||
3d17d31 csoler Sun, 30 Apr 2017 22:43:10 +0200 Merge pull request #789 from PhenomRetroShare/Add_FriendTimeOffsetNewsFeed
|
||||
8aa9be3 csoler Sun, 30 Apr 2017 22:39:07 +0200 Merge pull request #791 from PhenomRetroShare/Fix_MissingMessageMarkedRead
|
||||
40aff5d csoler Sun, 30 Apr 2017 22:37:54 +0200 Merge pull request #785 from PhenomRetroShare/Add_RelayBandwidthOnServerPage
|
||||
16b8947 csoler Sun, 30 Apr 2017 20:31:43 +0200 improved serializer documentation
|
||||
cecd9a3 csoler Sun, 30 Apr 2017 20:14:23 +0200 merged upstream/master
|
||||
24c7c38 csoler Sun, 30 Apr 2017 20:08:30 +0200 removed old file rssrviceserialiser.h/cc
|
||||
14076de csoler Sun, 30 Apr 2017 19:17:44 +0200 moved code of rsservicerserialiser into rsserializer.h/cc and renamed it into RsRawSerializer
|
||||
e401b90 csoler Sun, 30 Apr 2017 16:05:37 +0200 moved rsserializer and rstypeserializer to serialiser/
|
||||
4f92f48 csoler Sat, 29 Apr 2017 23:02:44 +0200 dwicthed GxsTunnel items to new serialization
|
||||
4fbcc1e Phenom Sat, 29 Apr 2017 19:47:29 +0200 Add Double Click on Name for Chat to add their name in text writer.
|
||||
1159c86 csoler Sat, 29 Apr 2017 21:50:55 +0200 moved wiki and wire items to rsitems/
|
||||
d58c638 csoler Sat, 29 Apr 2017 21:46:54 +0200 switched wiki and wire items to new serialization
|
||||
77adc82 Phenom Sat, 29 Apr 2017 17:32:23 +0200 Fix Missing messages when mark all as read.
|
||||
5cba005 csoler Fri, 28 Apr 2017 23:32:47 +0200 moved recognitems to rsitems/
|
||||
2349269 csoler Fri, 28 Apr 2017 23:28:56 +0200 switch rsrecognitems to new serialization
|
||||
8341c68 csoler Fri, 28 Apr 2017 18:54:07 +0200 removed old code
|
||||
688813f csoler Fri, 28 Apr 2017 18:51:35 +0200 moved photo items to rsitems/
|
||||
634efb6 csoler Fri, 28 Apr 2017 18:42:11 +0200 switched rsphotoitems to new serialization
|
||||
d3c960e csoler Fri, 28 Apr 2017 17:48:54 +0200 removed old code
|
||||
22e2416 csoler Fri, 28 Apr 2017 17:47:41 +0200 moved rsserviceinfo items to rsitems/
|
||||
2d19783 csoler Fri, 28 Apr 2017 17:44:45 +0200 switched serviceinfo items to new serialization
|
||||
c33c34b csoler Fri, 28 Apr 2017 16:44:04 +0200 moved rspluginitems to rsitems/
|
||||
d32a8ca csoler Fri, 28 Apr 2017 16:39:54 +0200 switched PluginItems to new serialization
|
||||
45eaf27 csoler Fri, 28 Apr 2017 16:30:33 +0200 moved rsgxsupdateitems to rsitems/
|
||||
2e67665 csoler Fri, 28 Apr 2017 16:26:59 +0200 switched MsgUpdate items to new serialization
|
||||
5995e50 csoler Thu, 27 Apr 2017 21:24:27 +0200 moved rsstatusitem.h to rsitems/
|
||||
87018ed csoler Thu, 27 Apr 2017 21:20:30 +0200 switched rsstatusitem to new serializer
|
||||
07a93be csoler Thu, 27 Apr 2017 21:11:10 +0200 moved heartbeatitem.h to rsitems/
|
||||
9adbab3 csoler Thu, 27 Apr 2017 21:10:22 +0200 switched heartbeatitems to new serialization
|
||||
8a9edb2 Phenom Thu, 27 Apr 2017 17:03:53 +0200 Create a Gxs Identity by default.
|
||||
19b4fb8 Phenom Thu, 27 Apr 2017 16:42:25 +0200 Add Friend Time Offset news feed.
|
||||
349d14b csoler Thu, 27 Apr 2017 14:44:41 +0200 moved rsposteditems to rsitems/
|
||||
35ecc19 csoler Thu, 27 Apr 2017 14:41:31 +0200 switched rsposteditems to new serialization
|
||||
22f6d15 csoler Thu, 27 Apr 2017 14:21:46 +0200 moved rsnxsitems.cc to rsitems/
|
||||
3c20a85 csoler Thu, 27 Apr 2017 14:16:57 +0200 switched RsNxsItems to new serialization
|
||||
f6e59f7 csoler Thu, 27 Apr 2017 11:59:18 +0200 moved gxsforumitems to rsitems/
|
||||
449a420 csoler Thu, 27 Apr 2017 11:56:56 +0200 dwitched gxsforum items to new serialization
|
||||
f50670f csoler Wed, 26 Apr 2017 20:59:59 +0200 moved circle items to rsitems/
|
||||
559137d csoler Wed, 26 Apr 2017 20:57:28 +0200 switched gxscircleitems to new serialization
|
||||
db64523 csoler Wed, 26 Apr 2017 20:15:54 +0200 moved rsgxschannel items to rsitems
|
||||
69729ad csoler Wed, 26 Apr 2017 18:55:23 +0200 switch Channel items to new serialization
|
||||
77c2e6d csoler Wed, 26 Apr 2017 18:14:10 +0200 improved error handlign in pqistore
|
||||
8f97647 csoler Wed, 26 Apr 2017 15:43:00 +0200 fixed bug in RsGxsId deserialization
|
||||
c31396a csoler Wed, 26 Apr 2017 14:31:15 +0200 moved dsdv code to unused directory
|
||||
508a2e2 csoler Wed, 26 Apr 2017 14:28:25 +0200 moved gxs comment and Id items to rsitems/
|
||||
97d0df0 csoler Wed, 26 Apr 2017 14:19:34 +0200 added comment about serialization hack
|
||||
c0d8735 csoler Wed, 26 Apr 2017 14:17:38 +0200 switched RsGxsIdItems to new serialization
|
||||
fb34fa1 csoler Wed, 26 Apr 2017 13:44:09 +0200 switch GxsComment item to new serialization
|
||||
9c610a7 csoler Wed, 26 Apr 2017 11:40:46 +0200 cleaned the hierarchy of serialization classes
|
||||
77e809e csoler Tue, 25 Apr 2017 21:21:46 +0200 switched GRouter to new serialization
|
||||
9e246c9 Phenom Tue, 25 Apr 2017 18:39:30 +0200 Add warning about relays bandwidth.
|
||||
4d7bd83 csoler Tue, 25 Apr 2017 10:14:50 +0200 Merge pull request #786 from PhenomRetroShare/Fix_RelaySettingValues
|
||||
540a8b9 csoler Tue, 25 Apr 2017 10:01:00 +0200 Merge pull request #788 from csoler/v0.6-PRTest
|
||||
078913f Phenom Fri, 21 Apr 2017 21:29:20 +0200 Fix GCC warnings: enumeration value ‘TYPE_IDENTITY’ not handled in switch
|
||||
3592d5b Phenom Fri, 21 Apr 2017 19:55:37 +0200 Fix GCC warnings: unused parameter ‘names’
|
||||
593c0cb Phenom Wed, 19 Apr 2017 14:19:54 +0200 Fix CSA warnings: Called C++ object pointer is null
|
||||
90aaace Phenom Wed, 19 Apr 2017 14:18:35 +0200 Fix CSA warnings: Called C++ object pointer is null
|
||||
1f16f46 Phenom Wed, 19 Apr 2017 14:15:34 +0200 Fix CSA warnings: Called C++ object pointer is null
|
||||
30632dc Phenom Wed, 19 Apr 2017 14:06:56 +0200 Fix CSA warnings: Called C++ object pointer is null
|
||||
90cd623 Phenom Wed, 19 Apr 2017 14:04:50 +0200 Fix CAS warnings: Potential leak of memory pointed to by 'toaster'
|
||||
b2b7d00 Phenom Wed, 19 Apr 2017 14:01:35 +0200 Fix CSA warnings: Called C++ object pointer is null
|
||||
ff1908e Phenom Wed, 19 Apr 2017 11:50:24 +0200 Fix Clang Static Analyser: Undefined allocation of 0 bytes
|
||||
f22dc0f Phenom Tue, 18 Apr 2017 12:02:34 +0200 Fix Clang warnings: unused variable 'action'
|
||||
490f8d2 Phenom Tue, 18 Apr 2017 12:00:00 +0200 Fix Clang warnings: 'TYPE_IDENTITY' not handled
|
||||
6e42cf4 Phenom Tue, 18 Apr 2017 11:56:25 +0200 Fix Clang warnings: field 'mPassword' will be initialized after field 'mPrevIsBad'
|
||||
0d7df56 csoler Mon, 24 Apr 2017 22:47:08 +0200 moved rsconfigitems and rshistoryitems to rsitems/
|
||||
f7338d4 csoler Mon, 24 Apr 2017 22:39:05 +0200 removed old code
|
||||
43b3b87 csoler Mon, 24 Apr 2017 22:36:03 +0200 fixed a few bugs in config items
|
||||
fcabe63 csoler Mon, 24 Apr 2017 18:51:51 +0200 switch RsConfigItems to new serialization
|
||||
be9f126 electr Mon, 24 Apr 2017 18:43:17 +0200 Merge pull request #781 from Sonetio/libresapi_requests
|
||||
af4fcf7 csoler Mon, 24 Apr 2017 17:33:30 +0200 switched rshistoryitems to new serialization
|
||||
1327582 Phenom Mon, 24 Apr 2017 17:28:25 +0200 Fix Relay setting values
|
||||
8ae6541 csoler Mon, 24 Apr 2017 17:10:01 +0200 added two new classes for config/service serialisers and a base generic serialiser class
|
||||
8da5e15 Konrad Mon, 24 Apr 2017 16:00:23 +0200 Changed: difference time to absolute time.
|
||||
dc2df07 csoler Mon, 24 Apr 2017 14:14:34 +0200 renamed RsSerializer into RsServiceSerializer
|
||||
976a80a csoler Mon, 24 Apr 2017 13:30:18 +0200 switch rsfilelistitems to new serialization
|
||||
26e9541 csoler Mon, 24 Apr 2017 11:06:51 +0200 moved RTT items to rsitems/
|
||||
f6aaee7 csoler Mon, 24 Apr 2017 11:01:45 +0200 converted RTT items to new serialization
|
||||
5071c4b csoler Mon, 24 Apr 2017 11:00:57 +0200 moved msgitems to rsitems/
|
||||
fc82b20 csoler Mon, 24 Apr 2017 10:36:22 +0200 removed old serialization code in msgs
|
||||
0886794 csoler Mon, 24 Apr 2017 10:29:57 +0200 fixed bug caused by wrong cast in lobby msg signature validation
|
||||
91b0409 csoler Mon, 24 Apr 2017 10:11:24 +0200 fixed two memory bugs in serialization code
|
||||
6313d89 defnax Mon, 24 Apr 2017 01:23:05 +0200 Improved look n feel of Profile Generation Window.
|
||||
31c07f4 csoler Sun, 23 Apr 2017 22:40:26 +0200 converted RsMsgItems to new serialization. Added format and flag members to RsSerialiser and used the later to handle signature and config serialization techniques
|
||||
63b4b3a csoler Sun, 23 Apr 2017 19:07:26 +0200 moved discovery2 items to rsitems/
|
||||
9d9ff56 csoler Sun, 23 Apr 2017 19:02:12 +0200 switched discovery2items to new serialization
|
||||
190a638 csoler Sun, 23 Apr 2017 17:53:25 +0200 added zesty to ubuntu releases
|
||||
06e90e6 csoler Sun, 23 Apr 2017 17:49:07 +0200 added control file for zesty
|
||||
c738026 csoler Sun, 23 Apr 2017 17:48:39 +0200 updated ubuntu changelog
|
||||
2e71270 csoler Sat, 22 Apr 2017 21:36:39 +0200 fixed previous file move
|
||||
bef6db4 csoler Sat, 22 Apr 2017 21:32:57 +0200 moved files
|
||||
311f257 csoler Sat, 22 Apr 2017 21:10:55 +0200 converted GxsReputationItems to new serialization
|
||||
782c027 csoler Sat, 22 Apr 2017 16:00:01 +0200 added names for turtle sub items
|
||||
f571b05 Konrad Sat, 22 Apr 2017 11:06:56 +0200 Added: Checking if the vector is empty; Changed: Grouped values into one member
|
||||
8c0b7ce Konrad Fri, 21 Apr 2017 23:44:00 +0200 Fixed: Responds sends now correct time difference
|
||||
c9f618d Konrad Thu, 20 Apr 2017 19:09:57 +0200 Added: Notification about changed peer status
|
||||
9600359 Konrad Thu, 20 Apr 2017 18:09:19 +0200 Fixed: Password was not stored after creating a new location
|
||||
4a0b51c Konrad Wed, 19 Apr 2017 22:03:24 +0200 Added: to response information whether the identity is a contact
|
||||
b43bedf Konrad Tue, 18 Apr 2017 23:00:59 +0200 Added: Handling requests to set opinion about identity
|
||||
120ca9d Konrad Tue, 18 Apr 2017 22:58:15 +0200 Added: Handling requests to set opinion about identity
|
||||
3f54568 Konrad Tue, 18 Apr 2017 22:56:35 +0200 Added: Handling requests to get details about identity
|
||||
e2d9152 csoler Tue, 18 Apr 2017 21:11:37 +0200 moved converted serialisation files into new directory rsitems/, leaving serialiser/ for the serialisation classes
|
||||
76dd7fe Konrad Tue, 18 Apr 2017 14:02:14 +0200 Added: Handling requests to add and remove contact
|
||||
4a99000 Konrad Tue, 18 Apr 2017 14:00:30 +0200 Added: Handling requests to get and set node options
|
||||
f8fc8b4 csoler Sun, 16 Apr 2017 20:16:59 +0200 removed old code in turtle serialiser
|
||||
2ca46ec csoler Sun, 16 Apr 2017 20:11:54 +0200 fixed bug in serialization of data chunks
|
||||
1211334 csoler Sun, 16 Apr 2017 19:59:22 +0200 fixed bug in serialization for turtle
|
||||
636450f csoler Sat, 15 Apr 2017 18:46:44 +0200 moved turtle and FT to new serialization
|
||||
fd33315 Konrad Fri, 14 Apr 2017 17:44:17 +0200 Added: Handling requests to create lobby
|
||||
93aeae0 Konrad Fri, 14 Apr 2017 17:41:35 +0200 Added: Handling requests to delete identity
|
||||
3453a3e csoler Tue, 11 Apr 2017 23:05:27 +0200 switched FileTransfer items to new serialization
|
||||
80e8769 csoler Tue, 11 Apr 2017 21:37:35 +0200 added missign file and converted BW control items
|
||||
731e20d csoler Mon, 10 Apr 2017 22:09:56 +0200 switch BanListItem classes to new serialization system
|
||||
691ed8d csoler Mon, 10 Apr 2017 20:34:02 +0200 added new template for std::string with type id
|
||||
8b77388 csoler Wed, 5 Apr 2017 21:02:17 +0200 removed all chat serialization code
|
||||
ae9d0b2 csoler Wed, 5 Apr 2017 20:49:32 +0200 fixed a few bugs in chat serialization
|
||||
03c31ce csoler Wed, 5 Apr 2017 18:27:29 +0200 fixed serialization test example
|
||||
6b4fdb4 csoler Wed, 5 Apr 2017 18:25:54 +0200 fixed bug in serialization
|
||||
a941136 csoler Wed, 5 Apr 2017 18:09:45 +0200 fixed a few bugs in new serialization
|
||||
5b3e488 csoler Wed, 5 Apr 2017 16:53:20 +0200 fixed compilation
|
||||
48688ea csoler Wed, 5 Apr 2017 10:27:12 +0200 progress in converting chat items to new serialization
|
||||
9438d60 csoler Tue, 4 Apr 2017 22:53:50 +0200 progress in converting Chat items to new serialization model
|
||||
f2fa70e csoler Tue, 4 Apr 2017 16:37:57 +0200 progress in converting Chat items to new serialization model
|
||||
32ce9ae csoler Tue, 4 Apr 2017 15:33:59 +0200 started converting rschatitems to new serialization
|
||||
f7e3968 csoler Tue, 4 Apr 2017 14:01:33 +0200 added hability to print in the serialization process
|
||||
059dfcf csoler Tue, 4 Apr 2017 14:00:17 +0200 added hability to print in the serialization process
|
||||
75a3cf0 csoler Sun, 2 Apr 2017 15:04:03 +0200 fixed compilation in new serialization test code
|
||||
ddbe2ef csoler Sun, 2 Apr 2017 14:48:17 +0200 created .cc files for serialization
|
||||
b52071d csoler Sat, 1 Apr 2017 18:05:53 +0200 removed RsSerializable and merged it into RsItem
|
||||
1bc4fe5 csoler Sat, 25 Mar 2017 19:01:32 +0100 polished serialisation prototype
|
||||
369621f csoler Mon, 20 Mar 2017 23:31:04 +0100 simplified new serialization prototype
|
||||
4f24b95 csoler Sun, 19 Mar 2017 21:28:28 +0100 added new serialization code test example
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Mon, 8 May 2017 18:00:00 +0100
|
||||
|
||||
retroshare06 (0.6.2-1.20170423.190a638c~xenial) xenial; urgency=low
|
||||
|
||||
5b3b903 csoler Sun, 23 Apr 2017 17:33:21 +0200 added missing line for ubuntu zesty
|
||||
73bfc27 csoler Sun, 23 Apr 2017 17:33:50 +0200 Merge pull request #784 from PhenomRetroShare/Fix_RelaySettingsPage
|
||||
4c326f5 Phenom Sun, 23 Apr 2017 10:27:18 +0200 Fix Relay setting page.
|
||||
0e087db defnax Sat, 22 Apr 2017 17:32:59 +0200 Fixed to use right icons for context menu actions
|
||||
8b9c447 electr Sat, 22 Apr 2017 10:13:23 +0200 fixed possible crash and return value in rsGetHostByName(), thanks to Kotyara for reporting this
|
||||
4ab6021 csoler Fri, 21 Apr 2017 19:45:30 +0200 Merge pull request #782 from PhenomRetroShare/Fix_MacOSX_Compilation
|
||||
936dcba Phenom Fri, 21 Apr 2017 18:50:36 +0200 Fix UnitTest compilation.
|
||||
969b5ce Phenom Fri, 21 Apr 2017 15:57:57 +0200 Fix MacOSX compilation.
|
||||
7400a8d csoler Thu, 20 Apr 2017 20:59:12 +0200 Merge pull request #780 from csoler/v0.6-ImprovedGUI
|
||||
5f8bf03 csoler Thu, 20 Apr 2017 20:54:51 +0200 added mechanism to allow services to document the names of their items, and improved bandwidth graph to show names for GXS services. Other services still need to supply their own names
|
||||
ccfd12b csoler Wed, 19 Apr 2017 18:53:49 +0200 Merge pull request #778 from csoler/v0.6-ImprovedGUI
|
||||
f406b81 csoler Wed, 19 Apr 2017 18:46:58 +0200 removed all FFT code and cleaned up deleted code in graphwidget.cpp
|
||||
1da89dd csoler Wed, 19 Apr 2017 17:16:30 +0200 changed FFT code in graph widget into a more efficient one, with free licence
|
||||
e95ddb9 csoler Tue, 18 Apr 2017 20:28:36 +0200 Merge pull request #767 from PhenomRetroShare/Fix_CommentWithLineReturn
|
||||
5f969e7 csoler Tue, 18 Apr 2017 20:27:20 +0200 Merge pull request #776 from PhenomRetroShare/Fix_ClangWarnings
|
||||
3ab39c6 csoler Tue, 18 Apr 2017 20:26:14 +0200 Merge pull request #777 from PhenomRetroShare/Fix_EncodeRadixInRSLinks
|
||||
3c5e61a Phenom Tue, 18 Apr 2017 17:36:43 +0200 Encode Radix in RSLinks.
|
||||
3733137 Phenom Tue, 18 Apr 2017 11:25:41 +0200 Fix Clang warnings: implicit conversion
|
||||
7d9a803 Phenom Tue, 18 Apr 2017 11:18:10 +0200 Fix Clang warnings: bdnet_inet_ntoa C-linkage
|
||||
4faaaf7 csoler Mon, 17 Apr 2017 22:03:48 +0200 Merge pull request #775 from csoler/v0.6-PRTest
|
||||
87dd614 Phenom Fri, 7 Apr 2017 19:32:19 +0200 Fix Clang Warnings: private field 'encoding_debug_file' is not used
|
||||
4f939b2 Phenom Fri, 7 Apr 2017 19:29:27 +0200 Fix Clang warnings: unused function 'set_item_background'
|
||||
76f7573 Phenom Fri, 7 Apr 2017 18:48:40 +0200 Fix Clang warnings: comparison of array != a null pointer is always true
|
||||
0bbd149 Phenom Fri, 7 Apr 2017 18:42:22 +0200 Fix Clang warnings: comparison of integers of different signs
|
||||
a476a81 Phenom Fri, 7 Apr 2017 18:40:02 +0200 Fix Clang warnings: function 'update_children_background' is not needed
|
||||
d8a7313 Phenom Fri, 7 Apr 2017 18:32:55 +0200 Fix Clang warnings: implicit conversion from 'double' to 'int'
|
||||
19196e2 Phenom Fri, 7 Apr 2017 18:21:49 +0200 Fix Clang warnings: ariable 'status' is used uninitialized
|
||||
a3a53b9 Phenom Fri, 7 Apr 2017 18:19:42 +0200 Fix Clang warnings: unused parameter 'req'
|
||||
94ac821 Phenom Wed, 29 Mar 2017 18:13:17 +0200 Fix Clang warnings: Unused variable Pi
|
||||
fd92bca Phenom Tue, 28 Mar 2017 21:18:25 +0200 Fix Clang warnings: variable 'layout' is used uninitialized
|
||||
8d85cf5 Phenom Tue, 28 Mar 2017 21:16:05 +0200 Fix Clang warnings: 'xxxWidget::sizeHint' hides overloaded vf
|
||||
6f2d7bb Phenom Sun, 19 Mar 2017 10:51:48 +0100 Fix Clang warnings: implicit conversion from 'double' to 'int'
|
||||
07b67e9 Phenom Sun, 19 Mar 2017 10:40:34 +0100 Fix Clang warnings: 'PopupDistantChatDialog::init' hides overloaded virtual function
|
||||
eea49d9 Phenom Sat, 18 Mar 2017 11:56:11 +0100 Fix Clang warnings: change ChatDialog::init definition
|
||||
9319caf Phenom Sat, 18 Mar 2017 11:32:56 +0100 Fix Clang warnings: 'Node::advance' hides overloaded virtual function
|
||||
13c8f7d Phenom Sat, 18 Mar 2017 11:28:29 +0100 Fix Clang warnings: Infinite recursion
|
||||
e0225ef Phenom Sat, 18 Mar 2017 11:19:42 +0100 Fix Clang warnings: 'ChatLobbyDialog::init' hides overloaded virtual function
|
||||
de4f6c0 Phenom Sat, 18 Mar 2017 10:42:38 +0100 Fix Clang warnings: Z-order assignment to spacer
|
||||
32eeb95 Phenom Sat, 18 Mar 2017 10:25:23 +0100 Fix Clang warnings: unused private field
|
||||
4ac3b3f Phenom Sat, 18 Mar 2017 10:20:57 +0100 Fix Clang warnings: implicit conversion of NULL to bool
|
||||
e83104e Phenom Sat, 18 Mar 2017 10:19:31 +0100 Fix Clang warnings: Add author and date to #warning
|
||||
039908b Phenom Thu, 16 Mar 2017 22:58:06 +0100 Fix Clang warnings: private field not used
|
||||
872f42b Phenom Thu, 16 Mar 2017 22:55:18 +0100 Fix Clang warnings: Overloaded vf hide in pluginmanager
|
||||
2204309 Phenom Thu, 16 Mar 2017 22:11:33 +0100 Fix Clang warnings: extraneous parentheses
|
||||
dc533b1 Phenom Thu, 16 Mar 2017 22:01:22 +0100 Fix Clang warnings: private field not used
|
||||
6532150 Phenom Thu, 16 Mar 2017 21:04:38 +0100 Fix Clang warnings: Overloaded vf hide in p3dhtmgr
|
||||
5bc6558 Phenom Thu, 16 Mar 2017 18:28:48 +0100 Fix Clang warnings: explicitly assigning value to itself
|
||||
6fecac5 Phenom Thu, 16 Mar 2017 17:50:25 +0100 Fix Clang warnings: Overloaded vf hide
|
||||
cf963c0 Phenom Wed, 15 Mar 2017 20:41:39 +0100 Fix Clang warnings: struct declared as class
|
||||
105840a Phenom Wed, 15 Mar 2017 19:03:39 +0100 Fix Clang Warning: Overloaded vf hide
|
||||
da4b168 Phenom Wed, 15 Mar 2017 18:55:24 +0100 Fix Clang warnings: mFns is not used
|
||||
cbc264f Phenom Wed, 15 Mar 2017 18:53:30 +0100 Fix clang warning:Implicit conversion from enumeration
|
||||
b2e37fe csoler Sat, 15 Apr 2017 20:24:06 +0200 Merge pull request #773 from csoler/v0.6-Identity
|
||||
273aae7 csoler Sat, 15 Apr 2017 19:01:13 +0200 fixed sharing of own identity
|
||||
98e1a6d electr Thu, 13 Apr 2017 14:12:46 +0200 Merge pull request #770 from Sonetio/fix_reselecting_accounts
|
||||
144d570 Konrad Thu, 13 Apr 2017 13:40:30 +0200 Fixed: Thread safe access to RsControlModule member variables
|
||||
dcc8c6e Konrad Thu, 13 Apr 2017 13:31:32 +0200 Changed: Using PeersHandler::mRsPeers instead of rsPeers
|
||||
a382d68 electr Thu, 13 Apr 2017 09:22:19 +0200 Merge pull request #769 from electron128/fix-gui-multiinstance
|
||||
aa81cc1 Konrad Wed, 12 Apr 2017 20:24:18 +0200 Added: Functions for handling PGP account details requests
|
||||
9402b8e Konrad Mon, 10 Apr 2017 23:42:22 +0200 Fixed: mFixedPassword remained empty after logging
|
||||
e1350a0 Konrad Mon, 10 Apr 2017 22:58:23 +0200 Fixed: Re-selecting accounts via RsControlModule; Added: Sending feedback about incorrect password
|
||||
3130ec9 csoler Mon, 10 Apr 2017 20:02:14 +0200 added GUI async call to ID serialised data. Allows to copy+paste identities.
|
||||
4c9b620 electr Sun, 9 Apr 2017 10:26:18 +0200 fixed --base-dir command line argument in rs-gui when running multiple instances. Only forward "link" and "rsfile" arguments to a running instance. Start a new instance if other arguments are present.
|
||||
7f12ca2 electr Sun, 9 Apr 2017 09:57:48 +0200 fixed name of local socket where RS waits for rslinks etc.
|
||||
d66e653 csoler Sat, 8 Apr 2017 23:39:05 +0200 fixed bug in deserialisation of group informaiton
|
||||
54cd402 csoler Sat, 8 Apr 2017 21:43:07 +0200 fixed a few bugs in latest identity link code
|
||||
6d29038 csoler Sat, 8 Apr 2017 21:12:48 +0200 added RSLink for GXS identities
|
||||
4f5da86 csoler Sat, 8 Apr 2017 19:07:33 +0200 added method to serialise/deserialise groups to/from memory and export of GxsIdentities to memory chunk in radix format
|
||||
f175533 Phenom Sat, 8 Apr 2017 14:06:47 +0200 Fix comment view when they have line return.
|
||||
4067c95 electr Wed, 5 Apr 2017 18:49:32 +0200 Merge pull request #760 from Sonetio/windows_service
|
||||
6e65fcd Konrad Sat, 1 Apr 2017 14:32:49 +0200 Removed: Unused #include statement
|
||||
8543525 Konrad Sat, 1 Apr 2017 14:28:55 +0200 Fixed: Linker problem
|
||||
fbc1bb4 Konrad Wed, 29 Mar 2017 16:06:39 +0200 Added: function for handling autosubscribing lobbies
|
||||
22956be Konrad Tue, 28 Mar 2017 11:24:16 +0200 Deleted: functions for hadling particular lobbies types in ChatHandler
|
||||
6e53002 Konrad Tue, 28 Mar 2017 11:20:51 +0200 Added: tokens in PeersHandler
|
||||
efd6ce3 Konrad Tue, 28 Mar 2017 11:19:50 +0200 Changed: Simplified asking for deferred self signature
|
||||
5694581 Konrad Tue, 28 Mar 2017 11:18:27 +0200 Changed: Qt dependecies are optional
|
||||
4031e49 Konrad Mon, 27 Mar 2017 16:11:04 +0200 Deleted: unused stateTokens
|
||||
c33107c Konrad Sun, 26 Mar 2017 19:12:04 +0200 Fixed: backward comptiblity
|
||||
bef7540 Konrad Sun, 26 Mar 2017 15:11:07 +0200 Fixed building on Travis CI
|
||||
dbcf2d2 csoler Sat, 25 Mar 2017 20:27:18 +0100 Merge pull request #756 from RetroPooh/guistuff
|
||||
04af39f csoler Sat, 25 Mar 2017 20:24:40 +0100 Merge pull request #754 from PhenomRetroShare/Fix_WinNoSQLCipherCompil
|
||||
ccb632a csoler Sat, 25 Mar 2017 19:26:12 +0100 Merge pull request #749 from PhenomRetroShare/Fix_WindowsHeightAtFirstStart
|
||||
8624c93 Konrad Sat, 25 Mar 2017 18:33:35 +0100 Added functions for hadling particular lobbies types to ChatHandler
|
||||
194878a Konrad Sat, 25 Mar 2017 18:31:13 +0100 Added functions for handling own and not own identities to IdentityHandler
|
||||
cb32f30 Konrad Sat, 25 Mar 2017 18:28:31 +0100 Added states handling to PeersHandler
|
||||
28d37c2 Konrad Sat, 25 Mar 2017 18:25:26 +0100 Added password storing to RsControlModule for GUI benefits
|
||||
39967b7 Konrad Sat, 25 Mar 2017 18:23:28 +0100 Added name of requests to be used by GUI
|
||||
ae95b49 Konrad Sat, 25 Mar 2017 18:20:53 +0100 Added SettingsHandler to handle response to settings requests
|
||||
cb04134 Konrad Sat, 25 Mar 2017 18:15:47 +0100 Added Windows support to libresapi when working with retroshare_android_service
|
||||
b0d2249 Konrad Sat, 25 Mar 2017 18:12:39 +0100 Added Windows support to retroshare-android-service
|
||||
f5e7217 RetroP Tue, 21 Mar 2017 17:24:59 +0300 statistics - router - fix bold marking for tunnel speeds over 1mbs
|
||||
85cfda1 RetroP Tue, 21 Mar 2017 16:52:40 +0300 add tree item counters for channels,forums,posted
|
||||
50c81d7 RetroP Tue, 21 Mar 2017 16:41:39 +0300 chat lobby list - mark signed lobbies with color
|
||||
000dabf RetroP Tue, 21 Mar 2017 15:02:46 +0300 chat lobby list - add tree item counters
|
||||
19bd51d RetroP Tue, 21 Mar 2017 14:57:06 +0300 searchdialog - mark current downloads green
|
||||
5efa8e3 Phenom Fri, 17 Mar 2017 22:14:14 +0100 Fix Windows Compilation with CONFIG+=no_sqlcipher
|
||||
ca0521c csoler Thu, 16 Mar 2017 21:01:27 +0100 allowed to edit subject hen editing forum posts. Only the latest subject is visible
|
||||
107d48f Phenom Wed, 15 Mar 2017 22:50:51 +0100 Fix windows height at first start.
|
||||
2046dbe csoler Wed, 15 Mar 2017 20:53:01 +0100 merged latest fixes from official 0.6.2 release branch
|
||||
e4fad45 csoler Wed, 15 Mar 2017 20:51:40 +0100 fixed layout in ConfCertDialog, removed overnumerous tabs
|
||||
2114374 csoler Wed, 15 Mar 2017 19:26:07 +0100 fixed update of Tor proxy address in hidden nodes server page
|
||||
44f2971 csoler Tue, 14 Mar 2017 20:04:22 +0100 Merge pull request #682 from csoler/v0.6-EditPosts
|
||||
a0d1089 csoler Sat, 11 Mar 2017 18:15:35 +0100 added branch parameter to makeSourcePackage script
|
||||
fdab480 csoler Sat, 11 Mar 2017 18:10:14 +0100 added minimum version number for debian stretch
|
||||
733b114 thunde Fri, 10 Mar 2017 15:57:40 +0100 Updated languages from Transifex
|
||||
ed5779f csoler Fri, 10 Mar 2017 15:39:22 +0100 Merge pull request #743 from mestaritonttu/patch-22
|
||||
69c3df6 csoler Fri, 10 Mar 2017 15:36:50 +0100 fixed bug in total item size estimation in pqiqosstreamer due to item slicing
|
||||
c377bf3 csoler Fri, 10 Mar 2017 15:12:10 +0100 fixed debug output for groups with no data
|
||||
fd84639 csoler Fri, 10 Mar 2017 15:05:41 +0100 removed some debug info
|
||||
c87de3e csoler Fri, 10 Mar 2017 10:48:40 +0100 fixed mistake in pointer handling
|
||||
cf2edb5 csoler Thu, 9 Mar 2017 22:47:06 +0100 fixed memory leak in deleteGroup and removed unnecessary pointer in the functions called below
|
||||
a545481 csoler Thu, 9 Mar 2017 22:05:06 +0100 fixed memory leak when receving multi-chunk file lists
|
||||
5b819eb csoler Thu, 9 Mar 2017 20:59:01 +0100 added missing virtual destructor causing a memory leak
|
||||
1f8fd95 csoler Thu, 9 Mar 2017 20:48:26 +0100 fixed uninitialised memory read in chacha20 test code
|
||||
d5f2ae8 csoler Thu, 9 Mar 2017 20:39:12 +0100 fixed memory leak recently introduced with openssl-1.1.0 changes
|
||||
f76454d csoler Thu, 9 Mar 2017 13:05:03 +0100 updated full pipeline packaging script for debian
|
||||
999e845 mestar Wed, 8 Mar 2017 13:17:34 +0200 Fix grammar
|
||||
e6cf628 csoler Tue, 7 Mar 2017 21:58:59 +0100 Merge pull request #740 from RetroPooh/trstats
|
||||
283a2ee csoler Tue, 7 Mar 2017 21:54:56 +0100 Merge pull request #717 from PhenomRetroShare/Fix_SettingListWidth
|
||||
b3b2a4b csoler Tue, 7 Mar 2017 21:54:10 +0100 Merge pull request #726 from mestaritonttu/patch-8
|
||||
bbc27b2 csoler Tue, 7 Mar 2017 21:53:21 +0100 Merge pull request #736 from mestaritonttu/patch-18
|
||||
3d0c28d csoler Tue, 7 Mar 2017 21:52:19 +0100 Merge pull request #724 from mestaritonttu/patch-6
|
||||
ed22b48 csoler Tue, 7 Mar 2017 21:51:51 +0100 Merge pull request #738 from mestaritonttu/patch-20
|
||||
376be42 csoler Tue, 7 Mar 2017 21:51:13 +0100 Merge pull request #739 from mestaritonttu/patch-21
|
||||
b3578f6 csoler Tue, 7 Mar 2017 21:50:20 +0100 Merge pull request #734 from mestaritonttu/patch-16
|
||||
d9c084b csoler Tue, 7 Mar 2017 21:49:52 +0100 Merge pull request #730 from mestaritonttu/patch-12
|
||||
5bad326 csoler Tue, 7 Mar 2017 21:49:14 +0100 Merge pull request #725 from mestaritonttu/patch-7
|
||||
ec21698 csoler Tue, 7 Mar 2017 21:48:30 +0100 Merge pull request #727 from mestaritonttu/patch-9
|
||||
7d8e06b csoler Tue, 7 Mar 2017 21:47:43 +0100 Merge pull request #732 from mestaritonttu/patch-14
|
||||
f3e29bd csoler Tue, 7 Mar 2017 21:47:00 +0100 Merge pull request #731 from mestaritonttu/patch-13
|
||||
17c44db csoler Tue, 7 Mar 2017 21:46:21 +0100 Merge pull request #733 from mestaritonttu/patch-15
|
||||
5f9f061 csoler Tue, 7 Mar 2017 21:45:50 +0100 Merge pull request #735 from mestaritonttu/patch-17
|
||||
8881a44 csoler Tue, 7 Mar 2017 21:45:11 +0100 Merge pull request #737 from mestaritonttu/patch-19
|
||||
160c289 csoler Tue, 7 Mar 2017 21:44:42 +0100 Merge pull request #728 from mestaritonttu/patch-10
|
||||
22308bc csoler Tue, 7 Mar 2017 21:44:14 +0100 Merge pull request #729 from mestaritonttu/patch-11
|
||||
fedffd7 csoler Tue, 7 Mar 2017 21:43:36 +0100 Merge pull request #723 from mestaritonttu/patch-5
|
||||
d3f0f9d RetroP Tue, 7 Mar 2017 17:50:13 +0300 router stats - mark active tunnels bold
|
||||
87f9dba mestar Tue, 7 Mar 2017 14:05:21 +0200 Improvements and typo fixes in strings
|
||||
222cf48 mestar Tue, 7 Mar 2017 14:03:05 +0200 Various improvements and fixes to strings
|
||||
83283d9 mestar Tue, 7 Mar 2017 13:58:43 +0200 Remove extra your
|
||||
7005126 mestar Tue, 7 Mar 2017 13:57:10 +0200 Added whitespace to strings
|
||||
6ec5415 mestar Tue, 7 Mar 2017 13:55:02 +0200 ASCII uppercase
|
||||
28d2e27 mestar Tue, 7 Mar 2017 13:53:08 +0200 Remove whitespace from string
|
||||
931531b mestar Tue, 7 Mar 2017 13:51:28 +0200 Fix typo
|
||||
65c7ca7 mestar Tue, 7 Mar 2017 13:49:57 +0200 Clarify sorting by posts
|
||||
21b7861 mestar Tue, 7 Mar 2017 13:48:14 +0200 Fix grammar
|
||||
ba18fcd mestar Tue, 7 Mar 2017 13:45:31 +0200 Fix grammar
|
||||
a4c2015 mestar Tue, 7 Mar 2017 13:41:45 +0200 Fix typos
|
||||
6b4f7e3 mestar Tue, 7 Mar 2017 13:39:39 +0200 Removed extra "to"
|
||||
b444567 mestar Tue, 7 Mar 2017 13:34:53 +0200 Added period
|
||||
400dde9 mestar Tue, 7 Mar 2017 13:09:04 +0200 Added whitespace
|
||||
c9a4a55 mestar Tue, 7 Mar 2017 13:06:22 +0200 Fix grammar
|
||||
86e7243 mestar Tue, 7 Mar 2017 12:56:25 +0200 Fix typos
|
||||
d7dc9cc mestar Tue, 7 Mar 2017 12:53:18 +0200 Whitespace inside <p>
|
||||
a518225 csoler Tue, 7 Mar 2017 11:27:17 +0100 Merge pull request #716 from felisucoibi/master
|
||||
6a6bcf7 thunde Mon, 6 Mar 2017 21:46:42 +0100 Fixed Windows compile of VOIP
|
||||
dc65d3f Phenom Sun, 5 Mar 2017 13:22:30 +0100 Fix Setting list width.
|
||||
0316c8c thunde Mon, 6 Mar 2017 06:34:06 +0100 Added workaround for crash on Windows 7 for Qt versions with gcc 5.3.0. The call to GetProcAddress in openssl (cryptlib.c) finds an function pointer to the not existing function _OPENSSL_isservice in the executable running on Windows 7.
|
||||
313e1b3 csoler Sun, 5 Mar 2017 20:08:53 +0100 updated translation files
|
||||
88a5c03 csoler Sun, 5 Mar 2017 20:08:36 +0100 removed some debug info
|
||||
94c9c94 thunde Sun, 5 Mar 2017 14:30:45 +0100 updated version number to 0.6.2 in rsversion.in
|
||||
b71f475 csoler Sun, 5 Mar 2017 14:14:46 +0100 qick fix to allow re-advertising for known forums/channels during the same session. Will be reset at restart (probably best)
|
||||
fbd72dd csoler Sun, 5 Mar 2017 13:57:49 +0100 fixed settings SoundPage
|
||||
15bb0ff felisu Sun, 5 Mar 2017 02:45:37 +0100 Update ChatPage.h
|
||||
951820f felisu Sun, 5 Mar 2017 02:45:07 +0100 Update ForumPage.h
|
||||
63174aa felisu Sun, 5 Mar 2017 02:44:18 +0100 Update PostedPage.h
|
||||
ca75515 felisu Sun, 5 Mar 2017 02:43:40 +0100 Update MessagePage.h
|
||||
d3cdd15 csoler Sat, 4 Mar 2017 21:20:34 +0100 fixed uninitialised memory read in GxsReputation
|
||||
dec5c5c csoler Sat, 4 Mar 2017 21:13:34 +0100 suppressed uninitialised memory leak in LocalDirectoryStorage
|
||||
b14e4d5 csoler Sat, 4 Mar 2017 21:08:10 +0100 removed memory leak due to missing delete for BWGraph
|
||||
0bd0056 csoler Sat, 4 Mar 2017 20:52:41 +0100 fixed memory leak in RsGxsNetService
|
||||
7111579 csoler Sat, 4 Mar 2017 20:52:06 +0100 fixed memory leak in config of msgService
|
||||
2302c46 csoler Sat, 4 Mar 2017 16:41:10 +0100 updated version number in changelog
|
||||
0024ddf csoler Sat, 4 Mar 2017 16:39:39 +0100 fixed utf8 bug in ShareManager
|
||||
3600905 csoler Sat, 4 Mar 2017 12:04:41 +0100 updated packaging files
|
||||
c715b03 csoler Sat, 4 Mar 2017 11:56:51 +0100 updated version number to 0.6.2
|
||||
5e2a253 csoler Sat, 4 Mar 2017 11:44:31 +0100 updated ubuntu changelog
|
||||
bd8189c csoler Tue, 28 Feb 2017 18:05:44 +0100 added test to prevent msgs with a different name to be used as different version
|
||||
763f227 csoler Sun, 26 Feb 2017 20:39:40 +0100 merged upstream/master into v0.6-EditPosts branch
|
||||
22f2edb csoler Sat, 11 Feb 2017 10:45:30 +0100 removed debug info and added comment
|
||||
ea82d26 csoler Thu, 9 Feb 2017 23:35:59 +0100 fixed signature verification bug for versionned messages
|
||||
5bf8376 csoler Thu, 9 Feb 2017 21:49:24 +0100 fixed a few more bugs in post version UI
|
||||
8deeec6 csoler Thu, 9 Feb 2017 18:45:55 +0100 fixed UI for post versions
|
||||
b93130a csoler Thu, 9 Feb 2017 16:15:35 +0100 fixed a few bugs in post version collecting
|
||||
f8056e5 csoler Thu, 9 Feb 2017 14:49:43 +0100 added collection of older posts versions.
|
||||
6681985 csoler Wed, 8 Feb 2017 20:40:47 +0100 merged upstream/master
|
||||
dfcb66d csoler Fri, 3 Feb 2017 13:02:53 +0100 added spinbox to show older versions
|
||||
777a73e csoler Fri, 3 Feb 2017 12:48:51 +0100 added GUI for editing forum messages
|
||||
|
||||
-- Retroshare Dev Team <contact@retroshare.net> Dim, 23 Apr 2017 16:00:00 +0100
|
||||
|
||||
retroshare06 (0.6.2-1.931442~trusty) trusty; urgency=low
|
||||
|
||||
931442a csoler Sat, 4 Mar 2017 00:07:51 +0100 fixed compilation
|
||||
b4e0a8f csoler Sat, 4 Mar 2017 00:04:52 +0100 removed unused file DirectoriesPage.{cpp,ui,h}
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm -f ./libssh-0.5.4.tar.gz.*
|
||||
rm -f ./retroshare06_0.6.2-1.*_source.build
|
||||
rm -f ./retroshare06_0.6.2-1.*_source.changes
|
||||
rm -f ./retroshare06_0.6.2-1.*.tar.gz
|
||||
rm -f ./retroshare06_0.6.2-1.*.diff.gz
|
||||
rm -f ./retroshare06_0.6.2-1.*.dsc
|
||||
rm -f ./retroshare_0.6.3-1.*_source.build
|
||||
rm -f ./retroshare_0.6.3-1.*_source.changes
|
||||
rm -f ./retroshare_0.6.3-1.*.tar.gz
|
||||
rm -f ./retroshare_0.6.3-1.*.diff.gz
|
||||
rm -f ./retroshare_0.6.3-1.*.dsc
|
||||
rm -f *.upload
|
||||
|
||||
rm -f *~
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
@ -6,34 +6,36 @@ Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxs
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui, retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
@ -6,34 +6,36 @@ Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, qt4-dev-tools, li
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
@ -6,34 +6,36 @@ Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, qt4-dev-tools, li
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -1,39 +1,41 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
||||
Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev (>= 3.4.1), libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -8,6 +8,7 @@ Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
@ -16,6 +17,7 @@ Description: RetroShare VOIP plugin
|
||||
|
||||
Package: retroshare-linkscloud-plugin
|
||||
Architecture: any
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare LinksCloud plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
@ -32,7 +34,7 @@ Description: RetroShare LinksCloud plugin
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
@ -41,7 +43,7 @@ Description: Secure communication with friends
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
@ -6,34 +6,36 @@ Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxs
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
@ -6,34 +6,36 @@ Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxs
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
46
build_scripts/Debian+Ubuntu/control.zesty
Normal file
@ -0,0 +1,46 @@
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqt5multimedia5
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
friends and family, using a web-of-trust to authenticate peers and OpenSSL to
|
||||
encrypt all communication. RetroShare provides filesharing, chat, messages,
|
||||
forums and channels.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: retroshare06
|
||||
Source: retroshare
|
||||
Section: devel
|
||||
Priority: standard
|
||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||
@ -6,34 +6,36 @@ Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, qt4-dev-tools, li
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: http://retroshare.sourceforge.net
|
||||
|
||||
Package: retroshare06-voip-plugin
|
||||
Package: retroshare-voip-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Conflicts: retroshare06-voip-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare, libspeex1, libspeexdsp1, libqtmultimediakit1
|
||||
Description: RetroShare VOIP plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds voice-over-IP functionality to the private chat window. Both
|
||||
friends chatting together need the plugin installed to be able to talk together.
|
||||
|
||||
Package: retroshare06-feedreader-plugin
|
||||
Package: retroshare-feedreader-plugin
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare06
|
||||
Conflicts: retroshare06-feedreader-plugin
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, retroshare
|
||||
Description: RetroShare FeedReader plugin
|
||||
This package provides a plugin for RetroShare, a secured Friend-to-Friend communication
|
||||
plateform. The plugin adds a RSS feed reader tab to retroshare.
|
||||
|
||||
Package: retroshare06-nogui
|
||||
Package: retroshare-nogui
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06
|
||||
Conflicts: retroshare,retroshare06-nogui
|
||||
Description: Secure communication with friends
|
||||
This is the command-line client for RetroShare network. This client
|
||||
can be contacted and talked-to using SSL. Clients exist for portable
|
||||
devices running e.g. Android.
|
||||
|
||||
Package: retroshare06
|
||||
Package: retroshare
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, gnome-keyring
|
||||
Conflicts: retroshare06-nogui
|
||||
Conflicts: retroshare-nogui,retroshare06
|
||||
Description: Secure communication with friends
|
||||
RetroShare is a Open Source cross-platform, private and secure decentralised
|
||||
commmunication platform. It lets you to securely chat and share files with your
|
||||
|
@ -0,0 +1,3 @@
|
||||
debian/tmp/usr/bin/retroshare-nogui
|
||||
debian/tmp/usr/share/retroshare/bdboot.txt
|
||||
debian/tmp/usr/share/retroshare/webui/*
|
6
build_scripts/Debian+Ubuntu/debian/retroshare.install
Normal file
@ -0,0 +1,6 @@
|
||||
debian/tmp/usr/bin/retroshare
|
||||
debian/tmp/usr/bin/retroshare-nogui
|
||||
debian/tmp/usr/share/applications/retroshare.desktop
|
||||
debian/tmp/usr/share/icons/hicolor/*
|
||||
debian/tmp/usr/share/pixmaps/retroshare.xpm
|
||||
debian/tmp/usr/share/retroshare/*
|
@ -1,3 +0,0 @@
|
||||
debian/tmp/usr/bin/RetroShare06-nogui
|
||||
debian/tmp/usr/share/RetroShare06/bdboot.txt
|
||||
debian/tmp/usr/share/RetroShare06/webui/*
|
@ -1,6 +0,0 @@
|
||||
debian/tmp/usr/bin/RetroShare06
|
||||
debian/tmp/usr/bin/RetroShare06-nogui
|
||||
debian/tmp/usr/share/applications/retroshare06.desktop
|
||||
debian/tmp/usr/share/icons/hicolor/*
|
||||
debian/tmp/usr/share/pixmaps/retroshare06.xpm
|
||||
debian/tmp/usr/share/RetroShare06/*
|
@ -10,12 +10,12 @@ archis="armhf amd64 i386"
|
||||
########################################################
|
||||
|
||||
./clean.sh
|
||||
rm -rf retroshare06-0.6.2
|
||||
rm -rf retroshare-0.6.2
|
||||
./makeSourcePackage.sh -distribution "$distribs"
|
||||
|
||||
for dist in $distribs; do
|
||||
for arch in $archis; do
|
||||
pbuilder-dist $dist $arch build retroshare06_0.6.2-1.???????.????????~"$dist".dsc
|
||||
pbuilder-dist $dist $arch build retroshare.6.2-1.???????.????????~"$dist".dsc
|
||||
done
|
||||
done
|
||||
|
||||
|
36
build_scripts/Debian+Ubuntu/how_to_build_for_stretch.txt
Normal file
@ -0,0 +1,36 @@
|
||||
Aug 09, 2017
|
||||
============
|
||||
|
||||
Building packages for debian stretch requires an extra dependency of libsqlcipher0-3.4.1, which is not shipped mainstream with Debian.
|
||||
As a consequence, the package needs to be added to pbuilder before it's creating the .deb
|
||||
|
||||
0 - create the .dsc for debian stretch using the RS packaging script
|
||||
|
||||
> ./makeSourcePackage.sh -distribution stretch
|
||||
|
||||
This should produce the file retroshare_0.6.3-1.20170806.3ae85dbc~stretch.dsc
|
||||
|
||||
1 - add /home/csoler/pbuilder/stretch_result as an extra deb repository for pbuilder:
|
||||
|
||||
> cat ~/.pbuilderrc
|
||||
HOOKDIR="/var/cache/pbuilder/hook.d"
|
||||
BINDMOUNTS="/home/csoler/pbuilder/stretch_result"
|
||||
|
||||
> cat /var/cache/pbuilder/hook.d/D70results
|
||||
cd /home/csoler/pbuilder/stretch_result
|
||||
/usr/bin/dpkg-scanpackages . /dev/null > /home/csoler/pbuilder/stretch_result/Packages
|
||||
/usr/bin/apt-get update
|
||||
|
||||
2 - make sure that the directory /home/csoler/pbuilder/stretch-result/ contains the packages needed:
|
||||
|
||||
> ls -l ~/pbuilder/stretch_result/
|
||||
total 1344
|
||||
-rw-r--r-- libsqlcipher0_3.4.1-1_amd64.deb
|
||||
-rw-r--r-- libsqlcipher-dev_3.4.1-1_amd64.deb
|
||||
|
||||
3 - build the package using additional arguments to pbuilder-dist:
|
||||
|
||||
> pbuilder-dist stretch build --override-config --othermirror "deb [trusted=yes] file:///home/csoler/pbuilder/stretch_result ./" retroshare_0.6.3-1.20170806.3ae85dbc~stretch.dsc
|
||||
|
||||
Sources:
|
||||
* http://blog.anthonywong.net/2014/10/26/how-to-include-local-packages-for-pbuilder/
|
@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
###################### PARAMETERS ####################
|
||||
version="0.6.2"
|
||||
version="0.6.3"
|
||||
gitpath="https://github.com/RetroShare/RetroShare.git"
|
||||
workdir=retroshare06-${version}
|
||||
workdir=retroshare-${version}
|
||||
branch="master"
|
||||
#branch="v0.6.3-official_release"
|
||||
#bubba3="Y" # comment out to compile for bubba3
|
||||
######################################################
|
||||
|
||||
@ -53,7 +55,7 @@ while [ ${#} -gt 0 ]; do
|
||||
done
|
||||
|
||||
if test "${dist}" = "" ; then
|
||||
dist="precise trusty vivid xenial yakkety"
|
||||
dist="precise trusty vivid xenial zesty"
|
||||
fi
|
||||
|
||||
echo Attempting to get revision number...
|
||||
@ -66,6 +68,7 @@ echo " "Commit count : ${ccount}
|
||||
echo " "Date : ${date}
|
||||
echo " "Time : ${time}
|
||||
echo " "Hash : ${hhsh}
|
||||
echo " "Using branch : ${branch}
|
||||
echo " "Using revision : ${rev}
|
||||
|
||||
echo Done.
|
||||
@ -80,7 +83,13 @@ echo Extracting base archive...
|
||||
mkdir -p ${workdir}/src
|
||||
echo Checking out latest snapshot...
|
||||
cd ${workdir}/src
|
||||
git clone --depth 1 https://github.com/RetroShare/RetroShare.git .
|
||||
git clone --depth 1 https://github.com/RetroShare/RetroShare.git --single-branch --branch $branch .
|
||||
|
||||
# if ! test "$hhsh" = "" ; then
|
||||
# echo Checking out revision $hhsh
|
||||
# git checkout $hhsh
|
||||
# fi
|
||||
|
||||
cd -
|
||||
|
||||
if ! test -d ${workdir}/src/libretroshare/; then
|
||||
@ -114,6 +123,8 @@ for i in ${dist}; do
|
||||
|
||||
if test "${i}" = "lucid" ; then
|
||||
cp ../control.ubuntu_lucid debian/control
|
||||
elif test "${i}" = "zesty" ; then
|
||||
cp ../control.zesty debian/control
|
||||
elif test "${i}" = "squeeze" ; then
|
||||
cp ../control.squeeze_bubba3 debian/control
|
||||
elif test "${i}" = "precise" ; then
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
for i in `ls retroshare06_0.6.2-1.*.changes` ; do
|
||||
for i in `ls retroshare_0.6.3-1.*.changes` ; do
|
||||
dput ppa:retroshare/unstable $i
|
||||
done
|
||||
|
@ -1,9 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=RetroShare06
|
||||
Name=RetroShare
|
||||
Comment=Securely share files with your friends
|
||||
Exec=/usr/bin/RetroShare06 %U
|
||||
Icon=/usr/share/pixmaps/retroshare06.xpm
|
||||
Exec=/usr/bin/retroshare %U
|
||||
Icon=/usr/share/pixmaps/retroshare.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Network;P2P;
|
||||
|
@ -34,7 +34,7 @@ echo "Using revision: ${REV}"
|
||||
echo "Hit ENTER if this is correct. Otherwise hit Ctrl+C"
|
||||
read tmp
|
||||
|
||||
WORKDIR="retroshare06-${FULL_VERSION}"
|
||||
WORKDIR="retroshare-${FULL_VERSION}"
|
||||
|
||||
if [[ -d ${WORKDIR} ]]
|
||||
then
|
||||
@ -80,6 +80,6 @@ do
|
||||
done
|
||||
popd >/dev/null
|
||||
tar -zcf rpm-build/rpm/SOURCES/${WORKDIR}.tar.gz ${WORKDIR}
|
||||
rpmbuild --define="%rev ${REV}" --define="%_usrsrc $PWD/rpm-build" --define="%_topdir %{_usrsrc}/rpm" -ba retroshare06.spec
|
||||
rpmbuild --define="%rev ${REV}" --define="%_usrsrc $PWD/rpm-build" --define="%_topdir %{_usrsrc}/rpm" -ba retroshare.spec
|
||||
rm -rf ${WORKDIR}
|
||||
exit 0
|
||||
|
@ -1,5 +1,5 @@
|
||||
Summary: Secure communication with friends
|
||||
Name: retroshare06
|
||||
Name: retroshare
|
||||
Version: 0.6.0.%{rev}
|
||||
Release: 1%{?dist}
|
||||
License: GPLv3
|
||||
@ -65,25 +65,25 @@ rm -rf $RPM_BUILD_ROOT
|
||||
cd src
|
||||
make INSTALL_ROOT=$RPM_BUILD_ROOT install
|
||||
#menu
|
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/retroshare06.desktop
|
||||
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/retroshare.desktop
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/RetroShare06
|
||||
%{_bindir}/retroshare
|
||||
%defattr(644, root, root)
|
||||
%{_datadir}/pixmaps/%{name}.xpm
|
||||
%{_datadir}/icons/hicolor
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/RetroShare06
|
||||
%{_datadir}/retroshare
|
||||
|
||||
%files nogui
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/RetroShare06-nogui
|
||||
%{_bindir}/retroshare-nogui
|
||||
%defattr(644, root, root)
|
||||
%{_datadir}/RetroShare06
|
||||
%{_datadir}/retroshare
|
||||
|
||||
%files voip-plugin
|
||||
%defattr(-, root, root)
|
@ -266,7 +266,7 @@ libs/curl-$(CURL_VERSION): $(DOWNLOAD_PATH)/curl-$(CURL_VERSION).tar.gz
|
||||
sqlcipher: libs/sqlcipher-$(SQLCIPHER_VERSION)
|
||||
|
||||
$(DOWNLOAD_PATH)/tcl$(TCL_VERSION)-src.tar.gz:
|
||||
wget http://prdownloads.sourceforge.net/tcl/tcl$(TCL_VERSION)-src.tar.gz -O $(DOWNLOAD_PATH)/tcl$(TCL_VERSION)-src.tar.gz
|
||||
wget --no-check-certificate http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION)/tcl$(TCL_VERSION)-src.tar.gz -O $(DOWNLOAD_PATH)/tcl$(TCL_VERSION)-src.tar.gz
|
||||
|
||||
$(DOWNLOAD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz:
|
||||
wget --no-check-certificate https://github.com/sqlcipher/sqlcipher/archive/v$(SQLCIPHER_VERSION).tar.gz -O $(DOWNLOAD_PATH)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz
|
||||
|
@ -116,7 +116,7 @@ echo copy external binaries
|
||||
copy "%RootPath%\libs\bin\*.dll" "%RsDeployPath%" %Quite%
|
||||
|
||||
echo copy dependencies
|
||||
call :copy_dependencies "%RsDeployPath%\RetroShare06.exe" "%RsDeployPath%"
|
||||
call :copy_dependencies "%RsDeployPath%\retroshare.exe" "%RsDeployPath%"
|
||||
|
||||
echo copy Qt DLL's
|
||||
copy "%QtPath%\Qt%QtMainVersion1%Svg%QtMainVersion2%.dll" "%RsDeployPath%" %Quite%
|
||||
|
@ -41,7 +41,7 @@
|
||||
!define SOURCEDIR "..\..\.."
|
||||
|
||||
# Get version from executable
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\RetroShare06.exe" VERSION_
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
||||
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}${BUILDADD}
|
||||
;!define REVISION ${VERSION_4}
|
||||
|
||||
@ -107,7 +107,7 @@ Var StyleSheetDir
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\RetroShare06.exe"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\retroshare.exe"
|
||||
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
@ -180,8 +180,8 @@ Section $(Section_Main) Section_Main
|
||||
|
||||
; Main binaries
|
||||
SetOutPath "$INSTDIR"
|
||||
File /oname=RetroShare06.exe "${RELEASEDIR}\retroshare-gui\src\release\RetroShare06.exe"
|
||||
File /oname=retroshare06-nogui.exe "${RELEASEDIR}\retroshare-nogui\src\release\RetroShare06-nogui.exe"
|
||||
File /oname=retroshare.exe "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe"
|
||||
File /oname=retroshare-nogui.exe "${RELEASEDIR}\retroshare-nogui\src\release\retroshare-nogui.exe"
|
||||
|
||||
; Qt binaries
|
||||
File "${QTDIR}\bin\QtCore4.dll"
|
||||
@ -270,7 +270,7 @@ SectionEnd
|
||||
; WriteRegStr HKCR retroshare "" "PQI File"
|
||||
; WriteRegBin HKCR retroshare EditFlags 00000100
|
||||
; WriteRegStr HKCR "retroshare\shell" "" open
|
||||
; WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\RetroShare06.exe" "%1"`
|
||||
; WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\retroshare.exe" "%1"`
|
||||
;SectionEnd
|
||||
|
||||
# Shortcuts
|
||||
@ -279,24 +279,24 @@ Section $(Section_StartMenu) Section_StartMenu
|
||||
SetOutPath "$INSTDIR"
|
||||
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\$(Link_Uninstall).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
|
||||
Section $(Section_Desktop) Section_Desktop
|
||||
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe" 0
|
||||
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
|
||||
Section $(Section_QuickLaunch) Section_QuickLaunch
|
||||
CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe" 0
|
||||
CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
Section $(Section_AutoStart) Section_AutoStart
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroShare" "$INSTDIR\${APPNAME}06.exe -m"
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroShare" "$INSTDIR\retroshare.exe -m"
|
||||
SectionEnd
|
||||
|
||||
;Section $(Section_AutoStart) Section_AutoStart
|
||||
; CreateShortCut "$SMSTARTUP\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe -m" 0
|
||||
; CreateShortCut "$SMSTARTUP\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe -m" 0
|
||||
;SectionEnd
|
||||
|
||||
Section -FinishSection
|
||||
@ -305,7 +305,7 @@ Section -FinishSection
|
||||
WriteRegStr HKLM "Software\${APPNAME}" "Version" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\RetroShare06.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\retroshare.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${PUBLISHER}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" "1"
|
||||
|
@ -41,7 +41,7 @@
|
||||
!define SOURCEDIR "..\..\.."
|
||||
|
||||
# Get version from executable
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\RetroShare06.exe" VERSION_
|
||||
!GetDllVersion "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe" VERSION_
|
||||
!define VERSION ${VERSION_1}.${VERSION_2}.${VERSION_3}${BUILDADD}
|
||||
;!define REVISION ${VERSION_4}
|
||||
|
||||
@ -107,7 +107,7 @@ Var StyleSheetDir
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
!define MUI_FINISHPAGE_LINK "Visit the RetroShare forum for the latest news and support"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://retroshare.sourceforge.net/forum/"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\RetroShare06.exe"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\retroshare.exe"
|
||||
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\changelog.txt
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT changelog.txt
|
||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
@ -180,8 +180,8 @@ Section $(Section_Main) Section_Main
|
||||
|
||||
; Main binaries
|
||||
SetOutPath "$INSTDIR"
|
||||
File /oname=RetroShare06.exe "${RELEASEDIR}\retroshare-gui\src\release\RetroShare06.exe"
|
||||
File /oname=retroshare06-nogui.exe "${RELEASEDIR}\retroshare-nogui\src\release\RetroShare06-nogui.exe"
|
||||
File /oname=retroshare.exe "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe"
|
||||
File /oname=retroshare-nogui.exe "${RELEASEDIR}\retroshare-nogui\src\release\retroshare-nogui.exe"
|
||||
|
||||
; Qt binaries
|
||||
File "${QTDIR}\bin\Qt5Core.dll"
|
||||
@ -288,7 +288,7 @@ SectionEnd
|
||||
; WriteRegStr HKCR retroshare "" "PQI File"
|
||||
; WriteRegBin HKCR retroshare EditFlags 00000100
|
||||
; WriteRegStr HKCR "retroshare\shell" "" open
|
||||
; WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\RetroShare06.exe" "%1"`
|
||||
; WriteRegStr HKCR "retroshare\shell\open\command" "" `"$INSTDIR\retroshare.exe" "%1"`
|
||||
;SectionEnd
|
||||
|
||||
# Shortcuts
|
||||
@ -297,24 +297,24 @@ Section $(Section_StartMenu) Section_StartMenu
|
||||
SetOutPath "$INSTDIR"
|
||||
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\$(Link_Uninstall).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
|
||||
Section $(Section_Desktop) Section_Desktop
|
||||
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe" 0
|
||||
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
|
||||
Section $(Section_QuickLaunch) Section_QuickLaunch
|
||||
CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe" 0
|
||||
CreateShortCut "$QUICKLAUNCH\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
Section $(Section_AutoStart) Section_AutoStart
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroShare" "$INSTDIR\${APPNAME}06.exe -m"
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "RetroShare" "$INSTDIR\retroshare.exe -m"
|
||||
SectionEnd
|
||||
|
||||
;Section $(Section_AutoStart) Section_AutoStart
|
||||
; CreateShortCut "$SMSTARTUP\${APPNAME}.lnk" "$INSTDIR\RetroShare06.exe" "" "$INSTDIR\RetroShare06.exe -m" 0
|
||||
; CreateShortCut "$SMSTARTUP\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe -m" 0
|
||||
;SectionEnd
|
||||
|
||||
Section -FinishSection
|
||||
@ -323,7 +323,7 @@ Section -FinishSection
|
||||
WriteRegStr HKLM "Software\${APPNAME}" "Version" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\RetroShare06.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$INSTDIR\retroshare.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${PUBLISHER}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" "1"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" "1"
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@ -1,10 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Version=1.0
|
||||
Name=RetroShare06
|
||||
Name=RetroShare
|
||||
Comment=Securely share files with your friends
|
||||
Exec=/usr/bin/RetroShare06 %U
|
||||
Icon=/usr/share/pixmaps/retroshare06.xpm
|
||||
Exec=/usr/bin/retroshare %U
|
||||
Icon=/usr/share/pixmaps/retroshare.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Network;
|
@ -1305,6 +1305,7 @@ void bdConnectManager::callbackConnectRequest(bdId *srcId, bdId *proxyId, bdId *
|
||||
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BITDHT_CONNECT_ERROR_DUPLICATE: // similar attempt. delay/recycle (ANY/ANY)
|
||||
{
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
/*************************************/
|
||||
|
||||
UdpBitDht::UdpBitDht(UdpPublisher *pub, bdNodeId *id, std::string appVersion, std::string bootstrapfile, const std::string& filteredipfile, bdDhtFunctions *fns)
|
||||
:UdpSubReceiver(pub), dhtMtx(true), mFns(fns)
|
||||
:UdpSubReceiver(pub), dhtMtx(true)//, mFns(fns)
|
||||
{
|
||||
std::string usedVersion;
|
||||
|
||||
|
@ -119,7 +119,7 @@ void clearDataTransferred();
|
||||
|
||||
bdMutex dhtMtx; /* for all class data (below) */
|
||||
bdNodeManager *mBitDhtManager;
|
||||
bdDhtFunctions *mFns;
|
||||
//bdDhtFunctions *mFns;
|
||||
|
||||
|
||||
uint32_t mReadBytes;
|
||||
|
@ -144,6 +144,11 @@ std::string bloomFilter::getFilter()
|
||||
bytes++;
|
||||
}
|
||||
|
||||
if (bytes==0)
|
||||
{
|
||||
std::cerr << "(EE) Error. Cannot allocate memory for 0 byte in " << __PRETTY_FUNCTION__ << std::endl;
|
||||
return std::string();
|
||||
}
|
||||
// convert to binary array.
|
||||
uint8_t *tmparray = (uint8_t *) malloc(bytes);
|
||||
|
||||
|
@ -103,8 +103,6 @@ int bdnet_inet_aton(const char *name, struct in_addr *addr);
|
||||
int bdnet_checkTTL(int fd);
|
||||
|
||||
void bdsockaddr_clear(struct sockaddr_in *addr);
|
||||
/* thread-safe version of inet_ntoa */
|
||||
std::string bdnet_inet_ntoa(struct in_addr in);
|
||||
|
||||
/* Extra stuff to declare for windows error handling (mimics unix errno)
|
||||
*/
|
||||
@ -175,4 +173,7 @@ int usleep(unsigned int usec);
|
||||
} /* C Interface */
|
||||
#endif
|
||||
|
||||
/* thread-safe version of inet_ntoa */
|
||||
std::string bdnet_inet_ntoa(struct in_addr in);
|
||||
|
||||
#endif /* BITDHT_UNIVERSAL_NETWORK_HEADER */
|
||||
|
@ -10,5 +10,5 @@ Quickinfo for builders and packagers
|
||||
|
||||
* copy the files in ./webui to
|
||||
* ./webui (Windows)
|
||||
* /usr/share/RetroShare06/webui (Linux)
|
||||
* /usr/share/retroshare/webui (Linux)
|
||||
* other OS: see RsAccountsDetail::PathDataDirectory()
|
||||
|
@ -17,6 +17,10 @@
|
||||
#include "ChannelsHandler.h"
|
||||
#include "StatsHandler.h"
|
||||
|
||||
#ifdef LIBRESAPI_QT
|
||||
#include "SettingsHandler.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
data types in json http://json.org/
|
||||
string (utf-8 unicode)
|
||||
@ -237,6 +241,9 @@ public:
|
||||
mApiPluginHandler(sts, ifaces),
|
||||
mChannelsHandler(ifaces.mGxsChannels),
|
||||
mStatsHandler()
|
||||
#ifdef LIBRESAPI_QT
|
||||
,mSettingsHandler(sts)
|
||||
#endif
|
||||
{
|
||||
// the dynamic cast is to not confuse the addResourceHandler template like this:
|
||||
// addResourceHandler(derived class, parent class)
|
||||
@ -262,6 +269,10 @@ public:
|
||||
&ChannelsHandler::handleRequest);
|
||||
router.addResourceHandler("stats", dynamic_cast<ResourceRouter*>(&mStatsHandler),
|
||||
&StatsHandler::handleRequest);
|
||||
#ifdef LIBRESAPI_QT
|
||||
router.addResourceHandler("settings", dynamic_cast<ResourceRouter*>(&mSettingsHandler),
|
||||
&SettingsHandler::handleRequest);
|
||||
#endif
|
||||
}
|
||||
|
||||
PeersHandler mPeersHandler;
|
||||
@ -274,6 +285,10 @@ public:
|
||||
ApiPluginHandler mApiPluginHandler;
|
||||
ChannelsHandler mChannelsHandler;
|
||||
StatsHandler mStatsHandler;
|
||||
|
||||
#ifdef LIBRESAPI_QT
|
||||
SettingsHandler mSettingsHandler;
|
||||
#endif
|
||||
};
|
||||
|
||||
ApiServer::ApiServer():
|
||||
@ -362,6 +377,9 @@ std::string ApiServer::handleRequest(Request &request)
|
||||
if(data.isRawData())
|
||||
return data.getRawData();
|
||||
|
||||
if(!resp.mCallbackName.empty())
|
||||
outstream << resource_api::makeKeyValueReference("callback_name", resp.mCallbackName);
|
||||
|
||||
outstream << resource_api::makeKeyValue("debug_msg", debugString.str());
|
||||
outstream << resource_api::makeKeyValueReference("returncode", returncode);
|
||||
if(!resp.mStateToken.isNull())
|
||||
|
@ -16,6 +16,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QStringList>
|
||||
#include "ApiServerLocal.h"
|
||||
#include "JsonStream.h"
|
||||
|
||||
@ -105,9 +106,17 @@ readPath:
|
||||
resource_api::Request req(reqJson);
|
||||
req.mMethod = reqMeth;
|
||||
req.setPath(reqPath);
|
||||
std::string resultString = mApiServer->handleRequest(req);
|
||||
mLocalSocket->write(resultString.c_str(), resultString.length());
|
||||
|
||||
// Need this idiom because binary result may contains \0
|
||||
std::string&& resultString = mApiServer->handleRequest(req);
|
||||
QByteArray rB(resultString.data(), resultString.length());
|
||||
|
||||
// Dirty trick to support avatars answers
|
||||
if(rB.contains("\n") || !rB.startsWith("{") || !rB.endsWith("}"))
|
||||
mLocalSocket->write(rB.toBase64());
|
||||
else mLocalSocket->write(rB);
|
||||
mLocalSocket->write("\n\0");
|
||||
|
||||
mState = WAITING_PATH;
|
||||
|
||||
/* Because QLocalSocket is SOCK_STREAM some clients implementations
|
||||
|
@ -252,6 +252,9 @@ public:
|
||||
|
||||
StateToken mStateToken;
|
||||
|
||||
//Just for GUI benefit
|
||||
std::string mCallbackName;
|
||||
|
||||
// the result
|
||||
StreamBase& mDataStream;
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
* libresapi
|
||||
* Copyright (C) 2015 electron128 <electron128@yahoo.com>
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ChatHandler.h"
|
||||
#include "Pagination.h"
|
||||
#include "Operators.h"
|
||||
@ -5,6 +24,7 @@
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rshistory.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
@ -141,12 +161,18 @@ ChatHandler::ChatHandler(StateTokenServer *sts, RsNotify *notify, RsMsgs *msgs,
|
||||
mMsgStateToken = mStateTokenServer->getNewToken();
|
||||
mLobbiesStateToken = mStateTokenServer->getNewToken();
|
||||
mUnreadMsgsStateToken = mStateTokenServer->getNewToken();
|
||||
mInvitationsStateToken = mStateTokenServer->getNewToken();
|
||||
|
||||
addResourceHandler("*", this, &ChatHandler::handleWildcard);
|
||||
addResourceHandler("lobbies", this, &ChatHandler::handleLobbies);
|
||||
addResourceHandler("create_lobby", this, &ChatHandler::handleCreateLobby);
|
||||
addResourceHandler("subscribe_lobby", this, &ChatHandler::handleSubscribeLobby);
|
||||
addResourceHandler("unsubscribe_lobby", this, &ChatHandler::handleUnsubscribeLobby);
|
||||
addResourceHandler("autosubscribe_lobby", this, &ChatHandler::handleAutoSubsribeLobby);
|
||||
addResourceHandler("clear_lobby", this, &ChatHandler::handleClearLobby);
|
||||
addResourceHandler("invite_to_lobby", this, &ChatHandler::handleInviteToLobby);
|
||||
addResourceHandler("get_invitations_to_lobby", this, &ChatHandler::handleGetInvitationsToLobby);
|
||||
addResourceHandler("answer_to_invitation", this, &ChatHandler::handleAnswerToInvitation);
|
||||
addResourceHandler("lobby_participants", this, &ChatHandler::handleLobbyParticipants);
|
||||
addResourceHandler("messages", this, &ChatHandler::handleMessages);
|
||||
addResourceHandler("send_message", this, &ChatHandler::handleSendMessage);
|
||||
@ -207,6 +233,15 @@ void ChatHandler::notifyChatLobbyEvent(uint64_t lobby_id, uint32_t event_type,
|
||||
}
|
||||
}
|
||||
|
||||
void ChatHandler::notifyListChange(int list, int /*type*/)
|
||||
{
|
||||
if(list == NOTIFY_LIST_CHAT_LOBBY_INVITATION)
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
mStateTokenServer->replaceToken(mInvitationsStateToken);
|
||||
}
|
||||
}
|
||||
|
||||
void ChatHandler::tick()
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
@ -244,7 +279,8 @@ void ChatHandler::tick()
|
||||
else
|
||||
{
|
||||
LobbyParticipantsInfo& pi = mit->second;
|
||||
if(!std::equal(pi.participants.begin(), pi.participants.end(), info.gxs_ids.begin()))
|
||||
if(!std::equal(pi.participants.begin(), pi.participants.end(), info.gxs_ids.begin())
|
||||
|| pi.participants.size() != info.gxs_ids.size())
|
||||
{
|
||||
pi.participants = info.gxs_ids;
|
||||
mStateTokenServer->replaceToken(pi.state_token);
|
||||
@ -394,10 +430,12 @@ void ChatHandler::tick()
|
||||
else if(msg.chat_id.isDistantChatId())
|
||||
{
|
||||
RsIdentityDetails details;
|
||||
DistantChatPeerInfo dcpinfo ;
|
||||
DistantChatPeerInfo dcpinfo;
|
||||
|
||||
if(!gxs_id_failed && rsMsgs->getDistantChatStatus(msg.chat_id.toDistantChatId(),dcpinfo)
|
||||
&& mRsIdentity->getIdDetails(msg.incoming? dcpinfo.to_id: dcpinfo.own_id, details))
|
||||
if( !gxs_id_failed &&
|
||||
rsMsgs->getDistantChatStatus(
|
||||
msg.chat_id.toDistantChatId(), dcpinfo ) &&
|
||||
mRsIdentity->getIdDetails(dcpinfo.to_id, details) )
|
||||
{
|
||||
info.remote_author_id = details.mId.toStdString();
|
||||
info.remote_author_name = details.mNickname;
|
||||
@ -889,6 +927,15 @@ void ChatHandler::handleUnsubscribeLobby(Request &req, Response &resp)
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void ChatHandler::handleAutoSubsribeLobby(Request& req, Response& resp)
|
||||
{
|
||||
ChatLobbyId chatId = 0;
|
||||
bool autosubsribe;
|
||||
req.mStream << makeKeyValueReference("chatid", chatId) << makeKeyValueReference("autosubsribe", autosubsribe);
|
||||
mRsMsgs->setLobbyAutoSubscribe(chatId, autosubsribe);
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void ChatHandler::handleClearLobby(Request &req, Response &resp)
|
||||
{
|
||||
ChatLobbyId id = 0;
|
||||
@ -902,6 +949,70 @@ void ChatHandler::handleClearLobby(Request &req, Response &resp)
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void ChatHandler::handleInviteToLobby(Request& req, Response& resp)
|
||||
{
|
||||
std::string chat_id;
|
||||
std::string pgp_id;
|
||||
req.mStream << makeKeyValueReference("chat_id", chat_id);
|
||||
req.mStream << makeKeyValueReference("pgp_id", pgp_id);
|
||||
|
||||
ChatId chatId(chat_id);
|
||||
RsPgpId pgpId(pgp_id);
|
||||
|
||||
std::list<RsPeerId> peerIds;
|
||||
mRsPeers->getAssociatedSSLIds(pgpId, peerIds);
|
||||
|
||||
for(std::list<RsPeerId>::iterator it = peerIds.begin(); it != peerIds.end(); it++)
|
||||
mRsMsgs->invitePeerToLobby(chatId.toLobbyId(), (*it));
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void ChatHandler::handleGetInvitationsToLobby(Request& /*req*/, Response& resp)
|
||||
{
|
||||
std::list<ChatLobbyInvite> invites;
|
||||
mRsMsgs->getPendingChatLobbyInvites(invites);
|
||||
|
||||
resp.mDataStream.getStreamToMember();
|
||||
for(std::list<ChatLobbyInvite>::const_iterator it = invites.begin(); it != invites.end(); ++it)
|
||||
{
|
||||
resp.mDataStream.getStreamToMember()
|
||||
<< makeKeyValue("peer_id", (*it).peer_id.toStdString())
|
||||
<< makeKeyValue("lobby_id", (*it).lobby_id)
|
||||
<< makeKeyValue("lobby_name", (*it).lobby_name)
|
||||
<< makeKeyValue("lobby_topic", (*it).lobby_topic);
|
||||
}
|
||||
|
||||
resp.mStateToken = mInvitationsStateToken;
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void ChatHandler::handleAnswerToInvitation(Request& req, Response& resp)
|
||||
{
|
||||
ChatLobbyId lobbyId = 0;
|
||||
req.mStream << makeKeyValueReference("lobby_id", lobbyId);
|
||||
|
||||
bool join;
|
||||
req.mStream << makeKeyValueReference("join", join);
|
||||
|
||||
std::string gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
RsGxsId gxsId(gxs_id);
|
||||
|
||||
if(join)
|
||||
{
|
||||
if(rsMsgs->acceptLobbyInvite(lobbyId, gxsId))
|
||||
resp.setOk();
|
||||
else
|
||||
resp.setFail();
|
||||
}
|
||||
else
|
||||
{
|
||||
rsMsgs->denyLobbyInvite(lobbyId);
|
||||
resp.setOk();
|
||||
}
|
||||
}
|
||||
|
||||
ResponseTask* ChatHandler::handleLobbyParticipants(Request &req, Response &resp)
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
@ -924,13 +1035,14 @@ ResponseTask* ChatHandler::handleLobbyParticipants(Request &req, Response &resp)
|
||||
void ChatHandler::handleMessages(Request &req, Response &resp)
|
||||
{
|
||||
/* G10h4ck: Whithout this the request processing won't happen, copied from
|
||||
* ChatHandler::handleLobbies, is this a work around or is the right whay of
|
||||
* ChatHandler::handleLobbies, is this a work around or is the right way of
|
||||
* doing it? */
|
||||
tick();
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
ChatId id(req.mPath.top());
|
||||
|
||||
// make response a list
|
||||
resp.mDataStream.getStreamToMember();
|
||||
if(id.isNotSet())
|
||||
@ -974,6 +1086,7 @@ void ChatHandler::handleMarkChatAsRead(Request &req, Response &resp)
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
ChatId id(req.mPath.top());
|
||||
|
||||
if(id.isNotSet())
|
||||
{
|
||||
resp.setFail("\""+req.mPath.top()+"\" is not a valid chat id");
|
||||
@ -1118,24 +1231,28 @@ void ChatHandler::handleUnreadMsgs(Request &/*req*/, Response &resp)
|
||||
RS_STACK_MUTEX(mMtx); /********** LOCKED **********/
|
||||
|
||||
resp.mDataStream.getStreamToMember();
|
||||
for(std::map<ChatId, std::list<Msg> >::const_iterator mit = mMsgs.begin(); mit != mMsgs.end(); ++mit)
|
||||
for( std::map<ChatId, std::list<Msg> >::const_iterator mit = mMsgs.begin();
|
||||
mit != mMsgs.end(); ++mit )
|
||||
{
|
||||
uint32_t count = 0;
|
||||
for(std::list<Msg>::const_iterator lit = mit->second.begin(); lit != mit->second.end(); ++lit)
|
||||
if(!lit->read)
|
||||
count++;
|
||||
for( std::list<Msg>::const_iterator lit = mit->second.begin();
|
||||
lit != mit->second.end(); ++lit ) if(!lit->read) ++count;
|
||||
std::map<ChatId, ChatInfo>::iterator mit2 = mChatInfo.find(mit->first);
|
||||
if(mit2 == mChatInfo.end())
|
||||
std::cerr << "Error in ChatHandler::handleUnreadMsgs(): ChatInfo not found. It is weird if this happens. Normally it should not happen." << std::endl;
|
||||
if(count && (mit2 != mChatInfo.end()))
|
||||
{
|
||||
resp.mDataStream.getStreamToMember()
|
||||
#warning Gioacchino Mazzurco 2017-03-24: @deprecated using "id" as key can cause problems in some JS based \
|
||||
languages like Qml @see chat_id instead
|
||||
<< makeKeyValue("id", mit->first.toStdString())
|
||||
<< makeKeyValue("chat_id", mit->first.toStdString())
|
||||
<< makeKeyValueReference("unread_count", count)
|
||||
<< mit2->second;
|
||||
}
|
||||
}
|
||||
resp.mStateToken = mUnreadMsgsStateToken;
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void ChatHandler::handleInitiateDistantChatConnexion(Request& req, Response& resp)
|
||||
@ -1162,8 +1279,9 @@ void ChatHandler::handleInitiateDistantChatConnexion(Request& req, Response& res
|
||||
DistantChatPeerId distant_chat_id;
|
||||
uint32_t error_code;
|
||||
|
||||
if(mRsMsgs->initiateDistantChatConnexion(receiver_id, sender_id, distant_chat_id, error_code))
|
||||
resp.setOk();
|
||||
if(mRsMsgs->initiateDistantChatConnexion( receiver_id, sender_id,
|
||||
distant_chat_id, error_code,
|
||||
false )) resp.setOk();
|
||||
else resp.setFail("Failed to initiate distant chat");
|
||||
|
||||
ChatId chat_id(distant_chat_id);
|
||||
@ -1197,4 +1315,37 @@ void ChatHandler::handleCloseDistantChatConnexion(Request& req, Response& resp)
|
||||
else resp.setFail("Failed to close distant chat");
|
||||
}
|
||||
|
||||
void ChatHandler::handleCreateLobby(Request& req, Response& resp)
|
||||
{
|
||||
std::set<RsPeerId> invited_identites;
|
||||
std::string lobby_name;
|
||||
std::string lobby_topic;
|
||||
std::string gxs_id;
|
||||
|
||||
req.mStream << makeKeyValueReference("lobby_name", lobby_name);
|
||||
req.mStream << makeKeyValueReference("lobby_topic", lobby_topic);
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
RsGxsId gxsId(gxs_id);
|
||||
|
||||
bool lobby_public;
|
||||
bool pgp_signed;
|
||||
|
||||
req.mStream << makeKeyValueReference("lobby_public", lobby_public);
|
||||
req.mStream << makeKeyValueReference("pgp_signed", pgp_signed);
|
||||
|
||||
ChatLobbyFlags lobby_flags;
|
||||
|
||||
if(lobby_public)
|
||||
lobby_flags |= RS_CHAT_LOBBY_FLAGS_PUBLIC;
|
||||
|
||||
if(pgp_signed)
|
||||
lobby_flags |= RS_CHAT_LOBBY_FLAGS_PGP_SIGNED;
|
||||
|
||||
mRsMsgs->createChatLobby(lobby_name, gxsId, lobby_topic, invited_identites, lobby_flags);
|
||||
|
||||
tick();
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
} // namespace resource_api
|
||||
|
@ -35,6 +35,8 @@ public:
|
||||
virtual void notifyChatLobbyEvent (uint64_t /* lobby id */, uint32_t /* event type */ ,
|
||||
const RsGxsId& /* nickname */,const std::string& /* any string */);
|
||||
|
||||
virtual void notifyListChange(int list, int type);
|
||||
|
||||
// from tickable
|
||||
virtual void tick();
|
||||
|
||||
@ -118,8 +120,13 @@ public:
|
||||
private:
|
||||
void handleWildcard(Request& req, Response& resp);
|
||||
void handleLobbies(Request& req, Response& resp);
|
||||
void handleCreateLobby(Request& req, Response& resp);
|
||||
void handleSubscribeLobby(Request& req, Response& resp);
|
||||
void handleUnsubscribeLobby(Request& req, Response& resp);
|
||||
void handleAutoSubsribeLobby(Request& req, Response& resp);
|
||||
void handleInviteToLobby(Request& req, Response& resp);
|
||||
void handleGetInvitationsToLobby(Request& req, Response& resp);
|
||||
void handleAnswerToInvitation(Request& req, Response& resp);
|
||||
void handleClearLobby(Request& req, Response& resp);
|
||||
ResponseTask* handleLobbyParticipants(Request& req, Response& resp);
|
||||
void handleMessages(Request& req, Response& resp);
|
||||
@ -160,6 +167,7 @@ private:
|
||||
std::map<ChatLobbyId, LobbyParticipantsInfo> mLobbyParticipantsInfos;
|
||||
|
||||
StateToken mUnreadMsgsStateToken;
|
||||
StateToken mInvitationsStateToken;
|
||||
|
||||
};
|
||||
} // namespace resource_api
|
||||
|
@ -10,8 +10,8 @@
|
||||
namespace resource_api
|
||||
{
|
||||
|
||||
FileSearchHandler::FileSearchHandler(StateTokenServer *sts, RsNotify *notify, RsTurtle *turtle, RsFiles *files):
|
||||
mStateTokenServer(sts), mNotify(notify), mTurtle(turtle), mFiles(files),
|
||||
FileSearchHandler::FileSearchHandler(StateTokenServer *sts, RsNotify *notify, RsTurtle *turtle, RsFiles */*files*/):
|
||||
mStateTokenServer(sts), mNotify(notify), mTurtle(turtle),// mFiles(files),
|
||||
mMtx("FileSearchHandler")
|
||||
{
|
||||
mNotify->registerNotifyClient(this);
|
||||
|
@ -24,7 +24,7 @@ private:
|
||||
StateTokenServer* mStateTokenServer;
|
||||
RsNotify* mNotify;
|
||||
RsTurtle* mTurtle;
|
||||
RsFiles* mFiles;
|
||||
//RsFiles* mFiles;
|
||||
|
||||
class Search{
|
||||
public:
|
||||
|
@ -1,6 +1,28 @@
|
||||
/*
|
||||
* libresapi
|
||||
*
|
||||
* Copyright (C) 2015 electron128 <electron128@yahoo.com>
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "IdentityHandler.h"
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <util/radix64.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "Operators.h"
|
||||
@ -61,7 +83,18 @@ protected:
|
||||
{
|
||||
case BEGIN:{
|
||||
RsIdentityParameters params;
|
||||
req.mStream << makeKeyValueReference("name", params.nickname) << makeKeyValueReference("pgp_linked", params.isPgpLinked);
|
||||
req.mStream
|
||||
<< makeKeyValueReference("name", params.nickname)
|
||||
<< makeKeyValueReference("pgp_linked", params.isPgpLinked);
|
||||
|
||||
std::string avatar;
|
||||
req.mStream << makeKeyValueReference("avatar", avatar);
|
||||
|
||||
std::vector<uint8_t> avatar_data = Radix64::decode(avatar);
|
||||
uint8_t *p_avatar_data = &avatar_data[0];
|
||||
uint32_t size = avatar_data.size();
|
||||
params.mImage.clear();
|
||||
params.mImage.copy(p_avatar_data, size);
|
||||
|
||||
if(params.nickname == "")
|
||||
{
|
||||
@ -95,7 +128,39 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
IdentityHandler::IdentityHandler(StateTokenServer *sts, RsNotify *notify, RsIdentity *identity):
|
||||
class DeleteIdentityTask : public GxsResponseTask
|
||||
{
|
||||
public:
|
||||
DeleteIdentityTask(RsIdentity* idservice) :
|
||||
GxsResponseTask(idservice, idservice->getTokenService()),
|
||||
mToken(0),
|
||||
mRsIdentity(idservice)
|
||||
{}
|
||||
|
||||
protected:
|
||||
virtual void gxsDoWork(Request &req, Response & /* resp */)
|
||||
{
|
||||
RsGxsIdGroup group;
|
||||
std::string gxs_id;
|
||||
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
group.mMeta.mGroupId = RsGxsGroupId(gxs_id);
|
||||
|
||||
mRsIdentity->deleteIdentity(mToken, group);
|
||||
addWaitingToken(mToken);
|
||||
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t mToken;
|
||||
RsIdentity* mRsIdentity;
|
||||
RsGxsId mId;
|
||||
};
|
||||
|
||||
IdentityHandler::IdentityHandler(StateTokenServer *sts, RsNotify *notify,
|
||||
RsIdentity *identity) :
|
||||
mStateTokenServer(sts), mNotify(notify), mRsIdentity(identity),
|
||||
mMtx("IdentityHandler Mtx"), mStateToken(sts->getNewToken())
|
||||
{
|
||||
@ -103,7 +168,27 @@ IdentityHandler::IdentityHandler(StateTokenServer *sts, RsNotify *notify, RsIden
|
||||
|
||||
addResourceHandler("*", this, &IdentityHandler::handleWildcard);
|
||||
addResourceHandler("own", this, &IdentityHandler::handleOwn);
|
||||
|
||||
addResourceHandler("own_ids", this, &IdentityHandler::handleOwnIdsRequest);
|
||||
addResourceHandler("notown_ids", this,
|
||||
&IdentityHandler::handleNotOwnIdsRequest);
|
||||
|
||||
addResourceHandler("export_key", this, &IdentityHandler::handleExportKey);
|
||||
addResourceHandler("import_key", this, &IdentityHandler::handleImportKey);
|
||||
|
||||
addResourceHandler("add_contact", this, &IdentityHandler::handleAddContact);
|
||||
addResourceHandler("remove_contact", this, &IdentityHandler::handleRemoveContact);
|
||||
|
||||
addResourceHandler("create_identity", this, &IdentityHandler::handleCreateIdentity);
|
||||
addResourceHandler("delete_identity", this, &IdentityHandler::handleDeleteIdentity);
|
||||
|
||||
addResourceHandler("get_identity_details", this, &IdentityHandler::handleGetIdentityDetails);
|
||||
|
||||
addResourceHandler("get_avatar", this, &IdentityHandler::handleGetAvatar);
|
||||
addResourceHandler("set_avatar", this, &IdentityHandler::handleSetAvatar);
|
||||
|
||||
addResourceHandler("set_ban_node", this, &IdentityHandler::handleSetBanNode);
|
||||
addResourceHandler("set_opinion", this, &IdentityHandler::handleSetOpinion);
|
||||
}
|
||||
|
||||
IdentityHandler::~IdentityHandler()
|
||||
@ -113,18 +198,125 @@ IdentityHandler::~IdentityHandler()
|
||||
|
||||
void IdentityHandler::notifyGxsChange(const RsGxsChanges &changes)
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx); // ********** LOCKED **********
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
// if changes come from identity service, invalidate own state token
|
||||
if(changes.mService == mRsIdentity->getTokenService())
|
||||
{
|
||||
mStateTokenServer->replaceToken(mStateToken);
|
||||
}
|
||||
}
|
||||
|
||||
void IdentityHandler::handleWildcard(Request & /*req*/, Response &resp)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
uint32_t token;
|
||||
mRsIdentity->getTokenService()->requestGroupInfo(
|
||||
token, RS_TOKREQ_ANSTYPE_DATA, opts);
|
||||
|
||||
time_t timeout = time(NULL)+10;
|
||||
uint8_t rStatus = mRsIdentity->getTokenService()->requestStatus(token);
|
||||
while( rStatus != RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE &&
|
||||
rStatus != RsTokenService::GXS_REQUEST_V2_STATUS_FAILED &&
|
||||
time(NULL) < timeout )
|
||||
{
|
||||
usleep(50*1000);
|
||||
rStatus = mRsIdentity->getTokenService()->requestStatus(token);
|
||||
}
|
||||
|
||||
if(rStatus == RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE)
|
||||
{
|
||||
std::vector<RsGxsIdGroup> grps;
|
||||
ok &= mRsIdentity->getGroupData(token, grps);
|
||||
for( std::vector<RsGxsIdGroup>::iterator vit = grps.begin();
|
||||
vit != grps.end(); ++vit )
|
||||
{
|
||||
RsGxsIdGroup& grp = *vit;
|
||||
/* electron: not very happy about this, i think the flags should
|
||||
* stay hidden in rsidentities */
|
||||
bool own = (grp.mMeta.mSubscribeFlags &
|
||||
GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
||||
bool pgp_linked = (grp.mMeta.mGroupFlags &
|
||||
RSGXSID_GROUPFLAG_REALID_kept_for_compatibility);
|
||||
resp.mDataStream.getStreamToMember()
|
||||
#warning Gioacchino Mazzurco 2017-03-24: @deprecated using "id" as key can cause problems in some JS based \
|
||||
languages like Qml @see gxs_id instead
|
||||
<< makeKeyValueReference("id", grp.mMeta.mGroupId)
|
||||
<< makeKeyValueReference("gxs_id", grp.mMeta.mGroupId)
|
||||
<< makeKeyValueReference("pgp_id",grp.mPgpId )
|
||||
<< makeKeyValueReference("name", grp.mMeta.mGroupName)
|
||||
<< makeKeyValueReference("contact", grp.mIsAContact)
|
||||
<< makeKeyValueReference("own", own)
|
||||
<< makeKeyValueReference("pgp_linked", pgp_linked)
|
||||
<< makeKeyValueReference("is_contact", grp.mIsAContact);
|
||||
}
|
||||
}
|
||||
else ok = false;
|
||||
|
||||
if(ok) resp.setOk();
|
||||
else resp.setFail();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleNotOwnIdsRequest(Request & /*req*/, Response &resp)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
uint32_t token;
|
||||
mRsIdentity->getTokenService()->requestGroupInfo(
|
||||
token, RS_TOKREQ_ANSTYPE_DATA, opts);
|
||||
|
||||
time_t timeout = time(NULL)+10;
|
||||
uint8_t rStatus = mRsIdentity->getTokenService()->requestStatus(token);
|
||||
while( rStatus != RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE &&
|
||||
rStatus != RsTokenService::GXS_REQUEST_V2_STATUS_FAILED &&
|
||||
time(NULL) < timeout )
|
||||
{
|
||||
usleep(50*1000);
|
||||
rStatus = mRsIdentity->getTokenService()->requestStatus(token);
|
||||
}
|
||||
|
||||
if(rStatus == RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE)
|
||||
{
|
||||
std::vector<RsGxsIdGroup> grps;
|
||||
ok &= mRsIdentity->getGroupData(token, grps);
|
||||
for(std::vector<RsGxsIdGroup>::iterator vit = grps.begin();
|
||||
vit != grps.end(); vit++)
|
||||
{
|
||||
RsGxsIdGroup& grp = *vit;
|
||||
if(!(grp.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN))
|
||||
{
|
||||
bool pgp_linked = (
|
||||
grp.mMeta.mGroupFlags &
|
||||
RSGXSID_GROUPFLAG_REALID_kept_for_compatibility );
|
||||
resp.mDataStream.getStreamToMember()
|
||||
<< makeKeyValueReference("gxs_id", grp.mMeta.mGroupId)
|
||||
<< makeKeyValueReference("pgp_id",grp.mPgpId )
|
||||
<< makeKeyValueReference("name", grp.mMeta.mGroupName)
|
||||
<< makeKeyValueReference("pgp_linked", pgp_linked)
|
||||
<< makeKeyValueReference("is_contact", grp.mIsAContact);
|
||||
}
|
||||
}
|
||||
}
|
||||
else ok = false;
|
||||
|
||||
if(ok) resp.setOk();
|
||||
else resp.setFail();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleOwnIdsRequest(Request & /*req*/, Response &resp)
|
||||
{
|
||||
bool ok = true;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
@ -155,23 +347,314 @@ void IdentityHandler::handleWildcard(Request & /*req*/, Response &resp)
|
||||
{
|
||||
RsGxsIdGroup& grp = *vit;
|
||||
//electron: not very happy about this, i think the flags should stay hidden in rsidentities
|
||||
bool own = (grp.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
||||
if(vit->mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)
|
||||
{
|
||||
bool pgp_linked = (grp.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility ) ;
|
||||
resp.mDataStream.getStreamToMember()
|
||||
<< makeKeyValueReference("id", grp.mMeta.mGroupId) /// @deprecated using "id" as key can cause problems in some JS based languages like Qml @see gxs_id instead
|
||||
<< makeKeyValueReference("gxs_id", grp.mMeta.mGroupId)
|
||||
<< makeKeyValueReference("own_gxs_id", grp.mMeta.mGroupId)
|
||||
<< makeKeyValueReference("pgp_id",grp.mPgpId )
|
||||
<< makeKeyValueReference("name", grp.mMeta.mGroupName)
|
||||
<< makeKeyValueReference("own", own)
|
||||
<< makeKeyValueReference("pgp_linked", pgp_linked);
|
||||
}
|
||||
}
|
||||
else ok = false;
|
||||
|
||||
}
|
||||
else
|
||||
ok = false;
|
||||
|
||||
if(ok) resp.setOk();
|
||||
else resp.setFail();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleAddContact(Request& req, Response& resp)
|
||||
{
|
||||
std::string gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
mRsIdentity->setAsRegularContact(RsGxsId(gxs_id), true);
|
||||
|
||||
{
|
||||
RsStackMutex stack(mMtx); /********** STACK LOCKED MTX ******/
|
||||
mStateTokenServer->replaceToken(mStateToken);
|
||||
}
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleRemoveContact(Request& req, Response& resp)
|
||||
{
|
||||
std::string gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
mRsIdentity->setAsRegularContact(RsGxsId(gxs_id), false);
|
||||
|
||||
{
|
||||
RsStackMutex stack(mMtx); /********** STACK LOCKED MTX ******/
|
||||
mStateTokenServer->replaceToken(mStateToken);
|
||||
}
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleGetIdentityDetails(Request& req, Response& resp)
|
||||
{
|
||||
std::string gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
uint32_t token;
|
||||
|
||||
std::list<RsGxsGroupId> groupIds;
|
||||
groupIds.push_back(RsGxsGroupId(gxs_id));
|
||||
mRsIdentity->getTokenService()->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds);
|
||||
|
||||
time_t start = time(NULL);
|
||||
while((mRsIdentity->getTokenService()->requestStatus(token) != RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE)
|
||||
&&(mRsIdentity->getTokenService()->requestStatus(token) != RsTokenService::GXS_REQUEST_V2_STATUS_FAILED)
|
||||
&&((time(NULL) < (start+10)))
|
||||
)
|
||||
{
|
||||
#ifdef WINDOWS_SYS
|
||||
Sleep(500);
|
||||
#else
|
||||
usleep(500*1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
RsGxsIdGroup data;
|
||||
std::vector<RsGxsIdGroup> datavector;
|
||||
if (!mRsIdentity->getGroupData(token, datavector))
|
||||
{
|
||||
resp.setFail();
|
||||
return;
|
||||
}
|
||||
|
||||
if(datavector.empty())
|
||||
{
|
||||
resp.setFail();
|
||||
return;
|
||||
}
|
||||
|
||||
data = datavector[0];
|
||||
|
||||
resp.mDataStream << makeKeyValue("gxs_name", data.mMeta.mGroupName);
|
||||
resp.mDataStream << makeKeyValue("gxs_id", data.mMeta.mGroupId.toStdString());
|
||||
|
||||
resp.mDataStream << makeKeyValue("pgp_id_known", data.mPgpKnown);
|
||||
resp.mDataStream << makeKeyValue("pgp_id", data.mPgpId.toStdString());
|
||||
|
||||
std::string pgp_name;
|
||||
if (data.mPgpKnown)
|
||||
{
|
||||
RsPeerDetails details;
|
||||
rsPeers->getGPGDetails(data.mPgpId, details);
|
||||
pgp_name = details.name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility)
|
||||
pgp_name = "[Unknown node]";
|
||||
else
|
||||
pgp_name = "Anonymous Id";
|
||||
}
|
||||
resp.mDataStream << makeKeyValue("pgp_name", pgp_name);
|
||||
|
||||
resp.mDataStream << makeKeyValue("last_usage", (uint32_t)data.mLastUsageTS);
|
||||
|
||||
bool isAnonymous = false;
|
||||
if(!data.mPgpKnown)
|
||||
{
|
||||
if (!(data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility))
|
||||
isAnonymous = true;
|
||||
}
|
||||
resp.mDataStream << makeKeyValue("anonymous", isAnonymous);
|
||||
|
||||
|
||||
bool isOwnId = (data.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN);
|
||||
resp.mDataStream << makeKeyValue("own", isOwnId);
|
||||
|
||||
std::string type;
|
||||
if(isOwnId)
|
||||
{
|
||||
if (data.mPgpKnown && !data.mPgpId.isNull())
|
||||
type = "Identity owned by you, linked to your Retroshare node";
|
||||
else
|
||||
type = "Anonymous identity, owned by you";
|
||||
}
|
||||
else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID_kept_for_compatibility)
|
||||
{
|
||||
if (data.mPgpKnown)
|
||||
{
|
||||
if (rsPeers->isGPGAccepted(data.mPgpId))
|
||||
type = "Linked to a friend Retroshare node";
|
||||
else
|
||||
type = "Linked to a known Retroshare node";
|
||||
}
|
||||
else
|
||||
type = "Linked to unknown Retroshare node";
|
||||
}
|
||||
else
|
||||
type = "Anonymous identity";
|
||||
|
||||
resp.mDataStream << makeKeyValue("type", type);
|
||||
|
||||
resp.mDataStream << makeKeyValue("bannned_node", rsReputations->isNodeBanned(data.mPgpId));
|
||||
|
||||
RsReputations::ReputationInfo info;
|
||||
rsReputations->getReputationInfo(RsGxsId(data.mMeta.mGroupId), data.mPgpId, info);
|
||||
resp.mDataStream << makeKeyValue("friends_positive_votes", info.mFriendsPositiveVotes);
|
||||
resp.mDataStream << makeKeyValue("friends_negative_votes", info.mFriendsNegativeVotes);
|
||||
resp.mDataStream << makeKeyValue("overall_reputation_level", (int)info.mOverallReputationLevel);
|
||||
resp.mDataStream << makeKeyValue("own_opinion", (int)info.mOwnOpinion);
|
||||
|
||||
RsIdentityDetails details;
|
||||
mRsIdentity->getIdDetails(RsGxsId(data.mMeta.mGroupId), details);
|
||||
|
||||
std::string base64Avatar;
|
||||
Radix64::encode(details.mAvatar.mData, details.mAvatar.mSize, base64Avatar);
|
||||
resp.mDataStream << makeKeyValue("avatar", base64Avatar);
|
||||
|
||||
StreamBase& usagesStream = resp.mDataStream.getStreamToMember("usages");
|
||||
usagesStream.getStreamToMember();
|
||||
|
||||
for(std::map<RsIdentityUsage,time_t>::const_iterator it(details.mUseCases.begin()); it != details.mUseCases.end(); ++it)
|
||||
{
|
||||
usagesStream.getStreamToMember()
|
||||
<< makeKeyValue("usage_time", (uint32_t)data.mLastUsageTS)
|
||||
<< makeKeyValue("usage_service", (int)(it->first.mServiceId))
|
||||
<< makeKeyValue("usage_case", (int)(it->first.mUsageCode));
|
||||
}
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleSetAvatar(Request& req, Response& resp)
|
||||
{
|
||||
std::string gxs_id;
|
||||
std::string avatar;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
req.mStream << makeKeyValueReference("avatar", avatar);
|
||||
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
|
||||
uint32_t token;
|
||||
|
||||
std::list<RsGxsGroupId> groupIds;
|
||||
groupIds.push_back(RsGxsGroupId(gxs_id));
|
||||
mRsIdentity->getTokenService()->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds);
|
||||
|
||||
time_t start = time(NULL);
|
||||
while((mRsIdentity->getTokenService()->requestStatus(token) != RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE)
|
||||
&&(mRsIdentity->getTokenService()->requestStatus(token) != RsTokenService::GXS_REQUEST_V2_STATUS_FAILED)
|
||||
&&((time(NULL) < (start+10)))
|
||||
)
|
||||
{
|
||||
#ifdef WINDOWS_SYS
|
||||
Sleep(500);
|
||||
#else
|
||||
usleep(500*1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
RsGxsIdGroup data;
|
||||
std::vector<RsGxsIdGroup> datavector;
|
||||
if (!mRsIdentity->getGroupData(token, datavector))
|
||||
{
|
||||
resp.setFail();
|
||||
return;
|
||||
}
|
||||
|
||||
if(datavector.empty())
|
||||
{
|
||||
resp.setFail();
|
||||
return;
|
||||
}
|
||||
|
||||
data = datavector[0];
|
||||
|
||||
if(!avatar.empty())
|
||||
{
|
||||
std::vector<uint8_t> avatar_data = Radix64::decode(avatar);
|
||||
uint8_t *p_avatar_data = &avatar_data[0];
|
||||
uint32_t size = avatar_data.size();
|
||||
data.mImage.clear();
|
||||
data.mImage.copy(p_avatar_data, size);
|
||||
|
||||
std::string base64Avatar;
|
||||
Radix64::encode(data.mImage.mData, data.mImage.mSize, base64Avatar);
|
||||
resp.mDataStream << makeKeyValue("avatar", base64Avatar);
|
||||
}
|
||||
else
|
||||
data.mImage.clear();
|
||||
|
||||
uint32_t dummyToken = 0;
|
||||
mRsIdentity->updateIdentity(dummyToken, data);
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleGetAvatar(Request& req, Response& resp)
|
||||
{
|
||||
std::string gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
RsIdentityDetails details;
|
||||
bool got = mRsIdentity->getIdDetails(RsGxsId(gxs_id), details);
|
||||
|
||||
std::string base64Avatar;
|
||||
Radix64::encode(details.mAvatar.mData, details.mAvatar.mSize, base64Avatar);
|
||||
resp.mDataStream << makeKeyValue("avatar", base64Avatar);
|
||||
|
||||
if(got)
|
||||
resp.setOk();
|
||||
else
|
||||
resp.setFail();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleSetBanNode(Request& req, Response& resp)
|
||||
{
|
||||
std::string pgp_id;
|
||||
req.mStream << makeKeyValueReference("pgp_id", pgp_id);
|
||||
RsPgpId pgpId(pgp_id);
|
||||
|
||||
bool banned_node;
|
||||
req.mStream << makeKeyValueReference("banned_node", banned_node);
|
||||
rsReputations->banNode(pgpId, banned_node);
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleSetOpinion(Request& req, Response& resp)
|
||||
{
|
||||
std::string gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
RsGxsId gxsId(gxs_id);
|
||||
|
||||
int own_opinion;
|
||||
req.mStream << makeKeyValueReference("own_opinion", own_opinion);
|
||||
|
||||
RsReputations::Opinion opinion;
|
||||
switch(own_opinion)
|
||||
{
|
||||
case 0:
|
||||
opinion = RsReputations::OPINION_NEGATIVE;
|
||||
break;
|
||||
case 1: opinion =
|
||||
RsReputations::OPINION_NEUTRAL;
|
||||
break;
|
||||
case 2:
|
||||
opinion = RsReputations::OPINION_POSITIVE;
|
||||
break;
|
||||
default:
|
||||
resp.setFail();
|
||||
return;
|
||||
}
|
||||
rsReputations->setOwnOpinion(gxsId, opinion);
|
||||
|
||||
resp.setOk();
|
||||
}
|
||||
|
||||
ResponseTask* IdentityHandler::handleOwn(Request & /* req */, Response &resp)
|
||||
{
|
||||
StateToken state;
|
||||
@ -192,4 +675,51 @@ ResponseTask* IdentityHandler::handleCreateIdentity(Request & /* req */, Respons
|
||||
return new CreateIdentityTask(mRsIdentity);
|
||||
}
|
||||
|
||||
void IdentityHandler::handleExportKey(Request& req, Response& resp)
|
||||
{
|
||||
RsGxsId gxs_id;
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
std::string radix;
|
||||
time_t timeout = time(NULL)+2;
|
||||
bool found = mRsIdentity->serialiseIdentityToMemory(gxs_id, radix);
|
||||
while(!found && time(nullptr) < timeout)
|
||||
{
|
||||
usleep(5000);
|
||||
found = mRsIdentity->serialiseIdentityToMemory(gxs_id, radix);
|
||||
}
|
||||
|
||||
if(found)
|
||||
{
|
||||
resp.mDataStream << makeKeyValueReference("gxs_id", gxs_id)
|
||||
<< makeKeyValueReference("radix", radix);
|
||||
|
||||
resp.setOk();
|
||||
return;
|
||||
}
|
||||
|
||||
resp.setFail();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleImportKey(Request& req, Response& resp)
|
||||
{
|
||||
std::string radix;
|
||||
req.mStream << makeKeyValueReference("radix", radix);
|
||||
|
||||
RsGxsId gxs_id;
|
||||
if(mRsIdentity->deserialiseIdentityFromMemory(radix, &gxs_id))
|
||||
{
|
||||
resp.mDataStream << makeKeyValueReference("gxs_id", gxs_id)
|
||||
<< makeKeyValueReference("radix", radix);
|
||||
resp.setOk();
|
||||
return;
|
||||
}
|
||||
|
||||
resp.setFail();
|
||||
}
|
||||
|
||||
ResponseTask* IdentityHandler::handleDeleteIdentity(Request& /*req*/,
|
||||
Response& /*resp*/)
|
||||
{ return new DeleteIdentityTask(mRsIdentity); }
|
||||
|
||||
} // namespace resource_api
|
||||
|
@ -1,4 +1,23 @@
|
||||
#pragma once
|
||||
/*
|
||||
* libresapi
|
||||
*
|
||||
* Copyright (C) 2015 electron128 <electron128@yahoo.com>
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <retroshare/rsnotify.h>
|
||||
#include <util/rsthreads.h>
|
||||
@ -23,8 +42,26 @@ public:
|
||||
|
||||
private:
|
||||
void handleWildcard(Request& req, Response& resp);
|
||||
void handleNotOwnIdsRequest(Request& req, Response& resp);
|
||||
void handleOwnIdsRequest(Request& req, Response& resp);
|
||||
|
||||
void handleExportKey(Request& req, Response& resp);
|
||||
void handleImportKey(Request& req, Response& resp);
|
||||
|
||||
void handleAddContact(Request& req, Response& resp);
|
||||
void handleRemoveContact(Request& req, Response& resp);
|
||||
|
||||
void handleGetIdentityDetails(Request& req, Response& resp);
|
||||
|
||||
void handleGetAvatar(Request& req, Response& resp);
|
||||
void handleSetAvatar(Request& req, Response& resp);
|
||||
|
||||
void handleSetBanNode(Request& req, Response& resp);
|
||||
void handleSetOpinion(Request& req, Response& resp);
|
||||
|
||||
ResponseTask *handleOwn(Request& req, Response& resp);
|
||||
ResponseTask *handleCreateIdentity(Request& req, Response& resp);
|
||||
ResponseTask *handleDeleteIdentity(Request& req, Response& resp);
|
||||
|
||||
StateTokenServer* mStateTokenServer;
|
||||
RsNotify* mNotify;
|
||||
|
@ -1,4 +1,22 @@
|
||||
#pragma once
|
||||
/*
|
||||
* libresapi
|
||||
* Copyright (C) 2015 electron128 <electron128@yahoo.com>
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ApiTypes.h"
|
||||
|
||||
@ -13,13 +31,6 @@ namespace resource_api
|
||||
template<class C>
|
||||
void handlePaginationRequest(Request& req, Response& resp, C& data)
|
||||
{
|
||||
/*
|
||||
if(!req.isGet()){
|
||||
resp.mDebug << "unsupported method. only GET is allowed." << std::endl;
|
||||
resp.setFail();
|
||||
return;
|
||||
}
|
||||
*/
|
||||
if(data.begin() == data.end()){
|
||||
// set result type to list
|
||||
resp.mDataStream.getStreamToMember();
|
||||
@ -30,7 +41,8 @@ void handlePaginationRequest(Request& req, Response& resp, C& data)
|
||||
|
||||
std::string begin_after;
|
||||
std::string last;
|
||||
req.mStream << makeKeyValueReference("begin_after", begin_after) << makeKeyValueReference("last", last);
|
||||
req.mStream << makeKeyValueReference("begin_after", begin_after)
|
||||
<< makeKeyValueReference("last", last);
|
||||
|
||||
typename C::iterator it_first = data.begin();
|
||||
if(begin_after != "begin" && begin_after != "")
|
||||
@ -62,7 +74,17 @@ void handlePaginationRequest(Request& req, Response& resp, C& data)
|
||||
++it_last; // increment to get iterator to element after the last wanted element
|
||||
}
|
||||
|
||||
/* G10h4ck: Guarded message count limitation with
|
||||
* JSON_API_LIMIT_CHAT_MSG_COUNT_BY_DEFAULT as ATM it seems that handling a
|
||||
* big bunch of messages hasn't been a problem for client apps, and even in
|
||||
* that case the client can specify +begin_after+ and +last+ in the request,
|
||||
* this way we don't make more difficult the life of those who just want get
|
||||
* the whole list of chat messages that seems to be a common usecase
|
||||
*/
|
||||
#ifdef JSON_API_LIMIT_CHAT_MSG_COUNT_BY_DEFAULT
|
||||
int count = 0;
|
||||
#endif
|
||||
|
||||
for(typename C::iterator it = it_first; it != it_last; ++it)
|
||||
{
|
||||
StreamBase& stream = resp.mDataStream.getStreamToMember();
|
||||
@ -71,11 +93,16 @@ void handlePaginationRequest(Request& req, Response& resp, C& data)
|
||||
|
||||
// todo: also handle the case when the last element is specified and the first element is begin
|
||||
// then want to return the elements near the specified element
|
||||
count++;
|
||||
if(count > 20){
|
||||
resp.mDebug << "limited the number of returned items to 20" << std::endl;
|
||||
|
||||
// G10h4ck: @see first comment about JSON_API_LIMIT_CHAT_MSG_COUNT_BY_DEFAULT
|
||||
#ifdef JSON_API_LIMIT_CHAT_MSG_COUNT_BY_DEFAULT
|
||||
++count;
|
||||
if(count > 20)
|
||||
{
|
||||
resp.mDebug << "limited the number of returned items to 20";
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
resp.setOk();
|
||||
}
|
||||
|
@ -1,4 +1,23 @@
|
||||
#pragma once
|
||||
/*
|
||||
* libresapi
|
||||
*
|
||||
* Copyright (C) 2015 electron128 <electron128@yahoo.com>
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ResourceRouter.h"
|
||||
#include "StateTokenServer.h"
|
||||
@ -21,6 +40,7 @@ public:
|
||||
// from NotifyClient
|
||||
// note: this may get called from foreign threads
|
||||
virtual void notifyListChange(int list, int type); // friends list change
|
||||
virtual void notifyPeerStatusChanged(const std::string& /*peer_id*/, uint32_t /*state*/);
|
||||
virtual void notifyPeerHasNewAvatar(std::string /*peer_id*/);
|
||||
|
||||
// from Tickable
|
||||
@ -33,9 +53,44 @@ public:
|
||||
|
||||
private:
|
||||
void handleWildcard(Request& req, Response& resp);
|
||||
|
||||
void handleAttemptConnection(Request& req, Response& resp);
|
||||
|
||||
void handleExamineCert(Request& req, Response& resp);
|
||||
|
||||
// a helper which ensures proper mutex locking
|
||||
void handleGetStateString(Request& req, Response& resp);
|
||||
void handleSetStateString(Request& req, Response& resp);
|
||||
|
||||
void handleGetCustomStateString(Request& req, Response& resp);
|
||||
void handleSetCustomStateString(Request& req, Response& resp);
|
||||
|
||||
void handleGetNetworkOptions(Request& req, Response& resp);
|
||||
void handleSetNetworkOptions(Request& req, Response& resp);
|
||||
|
||||
void handleGetPGPOptions(Request& req, Response& resp);
|
||||
void handleSetPGPOptions(Request& req, Response& resp);
|
||||
|
||||
void handleGetNodeOptions(Request& req, Response& resp);
|
||||
void handleSetNodeOptions(Request& req, Response& resp);
|
||||
|
||||
/**
|
||||
* \brief Remove specific location from trusted nodes
|
||||
*
|
||||
* \param [in] req request from user either peer_id is needed.
|
||||
* \param [out] resp response to user
|
||||
*/
|
||||
void handleRemoveNode(Request &req, Response &resp);
|
||||
|
||||
/**
|
||||
* \brief Retrieve inactive user list before specific UNIX time
|
||||
*
|
||||
* \param [in] req request from user, datatime in UNIX timestamp.
|
||||
* \param [in] resp response to request
|
||||
* \return a pgp_id list.
|
||||
*/
|
||||
void handleGetInactiveUsers(Request &req, Response &resp);
|
||||
|
||||
/// Helper which ensures proper mutex locking
|
||||
StateToken getCurrentStateToken();
|
||||
|
||||
StateTokenServer* mStateTokenServer;
|
||||
@ -44,9 +99,14 @@ private:
|
||||
RsMsgs* mRsMsgs; // required for avatar data
|
||||
|
||||
std::list<RsPeerId> mOnlinePeers;
|
||||
uint32_t status;
|
||||
std::string custom_state_string;
|
||||
|
||||
RsMutex mMtx;
|
||||
StateToken mStateToken; // mutex protected
|
||||
StateToken mStringStateToken; // mutex protected
|
||||
StateToken mCustomStateToken; // mutex protected
|
||||
|
||||
std::map<RsPeerId, uint32_t> mUnreadMsgsCounts;
|
||||
};
|
||||
} // namespace resource_api
|
||||
|
@ -37,6 +37,13 @@ ResponseTask* ResourceRouter::handleRequest(Request& req, Response& resp)
|
||||
if(vit->first == req.mPath.top())
|
||||
{
|
||||
req.mPath.pop();
|
||||
|
||||
//Just for GUI benefit
|
||||
std::string callbackName;
|
||||
req.mStream << makeKeyValueReference("callback_name", callbackName);
|
||||
resp.mCallbackName = callbackName;
|
||||
//
|
||||
|
||||
return vit->second->handleRequest(req, resp);
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <retroshare/rsiface.h>
|
||||
#include <util/rsdir.h>
|
||||
|
||||
#include "api/ApiServer.h"
|
||||
#include "api/Operators.h"
|
||||
@ -13,6 +14,8 @@
|
||||
|
||||
#include "GetPluginInterfaces.h"
|
||||
|
||||
//#define DEBUG_CONTROL_MODULE 1
|
||||
|
||||
namespace resource_api{
|
||||
|
||||
RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, ApiServer *apiserver, bool full_control):
|
||||
@ -23,7 +26,10 @@ RsControlModule::RsControlModule(int argc, char **argv, StateTokenServer* sts, A
|
||||
mDataMtx("RsControlModule::mDataMtx"),
|
||||
mRunState(WAITING_INIT),
|
||||
mAutoLoginNextTime(false),
|
||||
mWantPassword(false)
|
||||
mWantPassword(false),
|
||||
mPrevIsBad(false),
|
||||
mCountAttempts(0),
|
||||
mPassword("")
|
||||
{
|
||||
mStateToken = sts->getNewToken();
|
||||
this->argc = argc;
|
||||
@ -55,11 +61,24 @@ bool RsControlModule::processShouldExit()
|
||||
return mProcessShouldExit;
|
||||
}
|
||||
|
||||
bool RsControlModule::askForPassword(const std::string &title, const std::string &key_details, bool /* prev_is_bad */, std::string &password, bool& cancelled)
|
||||
bool RsControlModule::askForPassword(const std::string &title, const std::string &key_details, bool prev_is_bad, std::string &password, bool& cancelled)
|
||||
{
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::askForPassword(): current passwd is \"" << mPassword << "\"" << std::endl;
|
||||
#endif
|
||||
cancelled = false ;
|
||||
{
|
||||
RS_STACK_MUTEX(mDataMtx); // ********** LOCKED **********
|
||||
|
||||
mCountAttempts++;
|
||||
if(mCountAttempts == 3)
|
||||
{
|
||||
mPrevIsBad = prev_is_bad;
|
||||
mCountAttempts = 0;
|
||||
}
|
||||
else
|
||||
mPrevIsBad = false;
|
||||
|
||||
if(mFixedPassword != "")
|
||||
{
|
||||
password = mFixedPassword;
|
||||
@ -69,32 +88,40 @@ bool RsControlModule::askForPassword(const std::string &title, const std::string
|
||||
mWantPassword = true;
|
||||
mTitle = title;
|
||||
mKeyName = key_details;
|
||||
mPassword = "";
|
||||
|
||||
if(mPassword != "")
|
||||
{
|
||||
password = mPassword;
|
||||
mWantPassword = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
mStateTokenServer->replaceToken(mStateToken);
|
||||
}
|
||||
|
||||
bool wait = true;
|
||||
while(wait)
|
||||
int i = 0;
|
||||
while(i<100)
|
||||
{
|
||||
usleep(5*1000);
|
||||
|
||||
RS_STACK_MUTEX(mDataMtx); // ********** LOCKED **********
|
||||
wait = mWantPassword;
|
||||
if(!wait && mPassword != "")
|
||||
|
||||
if(mPassword != "")
|
||||
{
|
||||
password = mPassword;
|
||||
mPassword = "";
|
||||
mWantPassword = false;
|
||||
mStateTokenServer->replaceToken(mStateToken);
|
||||
return true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void RsControlModule::run()
|
||||
{
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule: initialising libretroshare..." << std::endl;
|
||||
#endif
|
||||
|
||||
RsInit::InitRsConfig();
|
||||
int initResult = RsInit::InitRetroShare(argc, argv, true);
|
||||
@ -105,11 +132,11 @@ void RsControlModule::run()
|
||||
std::stringstream ss;
|
||||
switch (initResult) {
|
||||
case RS_INIT_AUTH_FAILED:
|
||||
ss << "RsInit::InitRetroShare AuthGPG::InitAuth failed" << std::endl;
|
||||
ss << "RsControlModule::run() AuthGPG::InitAuth failed" << std::endl;
|
||||
break;
|
||||
default:
|
||||
/* Unexpected return code */
|
||||
ss << "RsInit::InitRetroShare unexpected return code " << initResult << std::endl;
|
||||
ss << "ControlModule::run() unexpected return code " << initResult << std::endl;
|
||||
break;
|
||||
}
|
||||
// FATAL ERROR, we can't recover from this. Just send the message to the user.
|
||||
@ -121,28 +148,57 @@ void RsControlModule::run()
|
||||
RsControl::earlyInitNotificationSystem();
|
||||
rsNotify->registerNotifyClient(this);
|
||||
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() Entering login wait loop." << std::endl;
|
||||
#endif
|
||||
bool login_ok = false;
|
||||
while(!login_ok)
|
||||
{
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() reseting passwd." << std::endl;
|
||||
#endif
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mPassword = "";
|
||||
}
|
||||
|
||||
// skip account selection if autologin is available
|
||||
if(initResult != RS_INIT_HAVE_ACCOUNT)
|
||||
setRunState(WAITING_ACCOUNT_SELECT);
|
||||
bool wait_for_account_select = (initResult != RS_INIT_HAVE_ACCOUNT);
|
||||
|
||||
// wait for login request
|
||||
bool auto_login = false;
|
||||
bool wait_for_account_select = (initResult != RS_INIT_HAVE_ACCOUNT);
|
||||
while(wait_for_account_select && !processShouldExit())
|
||||
{
|
||||
usleep(5*1000);
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
wait_for_account_select = mLoadPeerId.isNull();
|
||||
auto_login = mAutoLoginNextTime;
|
||||
if(!wait_for_account_select)
|
||||
{
|
||||
wait_for_account_select = !RsAccounts::SelectAccount(mLoadPeerId);
|
||||
|
||||
if(wait_for_account_select)
|
||||
{
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() wait_for_account_select=true => setting run state to WAITING_ACCOUNT_SELECT." << std::endl;
|
||||
#endif
|
||||
setRunState(WAITING_ACCOUNT_SELECT);
|
||||
}
|
||||
|
||||
while(wait_for_account_select && !processShouldExit())
|
||||
{
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() while(wait_for_account_select) mLoadPeerId=" << mLoadPeerId << std::endl;
|
||||
#endif
|
||||
usleep(500*1000);
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
|
||||
if(!mLoadPeerId.isNull())
|
||||
{
|
||||
wait_for_account_select = wait_for_account_select && !RsAccounts::SelectAccount(mLoadPeerId);
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() mLoadPeerId != NULL, account selection result: " << !wait_for_account_select << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
auto_login = mAutoLoginNextTime;
|
||||
|
||||
//if(!wait_for_account_select)
|
||||
//{
|
||||
// if(wait_for_account_select)
|
||||
// setRunState(WAITING_ACCOUNT_SELECT);
|
||||
//}
|
||||
}
|
||||
|
||||
if(processShouldExit())
|
||||
@ -150,6 +206,9 @@ void RsControlModule::run()
|
||||
|
||||
bool autoLogin = (initResult == RS_INIT_HAVE_ACCOUNT) | auto_login;
|
||||
std::string lockFile;
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() trying to load certificate..." << std::endl;
|
||||
#endif
|
||||
int retVal = RsInit::LockAndLoadCertificates(autoLogin, lockFile);
|
||||
|
||||
std::string error_string;
|
||||
@ -174,6 +233,25 @@ void RsControlModule::run()
|
||||
std::cerr << "RsControlModule::run() LockAndLoadCertificates failed. Unexpected switch value: " << retVal << std::endl;
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() Error string: \"" << error_string << "\"" << std::endl;
|
||||
#endif
|
||||
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mLoadPeerId.clear();
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::run() login is ok. Starting up..." << std::endl;
|
||||
#endif
|
||||
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mFixedPassword = mPassword;
|
||||
|
||||
std::cerr << "***Reseting mPasswd " << std::endl;
|
||||
mPassword = "";
|
||||
}
|
||||
|
||||
setRunState(WAITING_STARTUP);
|
||||
@ -295,17 +373,25 @@ void RsControlModule::handlePassword(Request &req, Response &resp)
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
std::string passwd;
|
||||
req.mStream << makeKeyValueReference("password", passwd);
|
||||
if(passwd != "" && mWantPassword)
|
||||
if(passwd != "")// && mWantPassword)
|
||||
{
|
||||
// client sends password
|
||||
mPassword = passwd;
|
||||
mWantPassword = false;
|
||||
mStateTokenServer->replaceToken(mStateToken);
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
std::cerr << "RsControlModule::handlePassword(): setting mPasswd=\"" << mPassword << "\"" << std::endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG_CONTROL_MODULE
|
||||
else
|
||||
std::cerr << "RsControlModule::handlePassword(): not setting mPasswd=\"" << mPassword << "\"!!!" << std::endl;
|
||||
#endif
|
||||
|
||||
resp.mDataStream
|
||||
<< makeKeyValueReference("want_password", mWantPassword)
|
||||
<< makeKeyValueReference("key_name", mKeyName);
|
||||
<< makeKeyValueReference("key_name", mKeyName)
|
||||
<< makeKeyValueReference("prev_is_bad", mPrevIsBad);
|
||||
resp.mStateToken = mStateToken;
|
||||
resp.setOk();
|
||||
}
|
||||
@ -414,8 +500,10 @@ void RsControlModule::handleCreateLocation(Request &req, Response &resp)
|
||||
}
|
||||
}
|
||||
|
||||
if(hidden_port)
|
||||
RsInit::SetHiddenLocation(hidden_address, hidden_port);
|
||||
if(hidden_port) {
|
||||
/// TODO add bob to webui
|
||||
RsInit::SetHiddenLocation(hidden_address, hidden_port, false);
|
||||
}
|
||||
|
||||
std::string ssl_password = RSRandom::random_alphaNumericString(RsInit::getSslPwdLen()) ;
|
||||
|
||||
@ -427,15 +515,16 @@ void RsControlModule::handleCreateLocation(Request &req, Response &resp)
|
||||
// give the password to the password callback
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mPassword = pgp_password;
|
||||
mFixedPassword = pgp_password;
|
||||
}
|
||||
bool ssl_ok = RsAccounts::GenerateSSLCertificate(pgp_id, "", ssl_name, "", hidden_port!=0, ssl_password, ssl_id, err_string);
|
||||
|
||||
// clear fixed password to restore normal password operation
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
mFixedPassword = "";
|
||||
}
|
||||
// {
|
||||
// RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
// mFixedPassword = "";
|
||||
// }
|
||||
|
||||
if (ssl_ok)
|
||||
{
|
||||
@ -456,6 +545,20 @@ void RsControlModule::handleCreateLocation(Request &req, Response &resp)
|
||||
resp.setFail("could not create a new location. Error: "+err_string);
|
||||
}
|
||||
|
||||
bool RsControlModule::askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result, std::string reason /*=""*/)
|
||||
{
|
||||
if(rsPeers->gpgSignData(data,len,sign,signlen,reason))
|
||||
{
|
||||
signature_result = SELF_SIGNATURE_RESULT_SUCCESS;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
signature_result = SELF_SIGNATURE_RESULT_FAILED;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void RsControlModule::setRunState(RunState s, std::string errstr)
|
||||
{
|
||||
RsStackMutex stack(mDataMtx); // ********** LOCKED **********
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <util/rsthreads.h>
|
||||
#include <util/cxx11retrocompat.h>
|
||||
#include <retroshare/rsnotify.h>
|
||||
#include "api/ResourceRouter.h"
|
||||
|
||||
@ -22,6 +23,8 @@ class ApiServer;
|
||||
class RsControlModule: public ResourceRouter, NotifyClient, private RsSingleJobThread
|
||||
{
|
||||
public:
|
||||
enum RunState { WAITING_INIT, FATAL_ERROR, WAITING_ACCOUNT_SELECT, WAITING_STARTUP, RUNNING_OK, RUNNING_OK_NO_FULL_CONTROL};
|
||||
|
||||
// ApiServer will be called once RS is started, to load additional api modules
|
||||
// full_control: set to true if this module should handle rsinit and login
|
||||
// set to false if rsinit is handled by the Qt gui
|
||||
@ -31,8 +34,12 @@ public:
|
||||
// returns true if the process should terminate
|
||||
bool processShouldExit();
|
||||
|
||||
// returns the current state of the software booting process
|
||||
RunState runState() const { return mRunState ; }
|
||||
|
||||
// from NotifyClient
|
||||
virtual bool askForPassword(const std::string &title, const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled);
|
||||
virtual bool askForPassword(const std::string &title, const std::string& key_details, bool prev_is_bad , std::string& password,bool& canceled) override;
|
||||
virtual bool askForDeferredSelfSignature(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen,int& signature_result, std::string reason = "") override;
|
||||
|
||||
protected:
|
||||
// from RsThread
|
||||
@ -40,7 +47,6 @@ protected:
|
||||
virtual void run();
|
||||
|
||||
private:
|
||||
enum RunState { WAITING_INIT, FATAL_ERROR, WAITING_ACCOUNT_SELECT, WAITING_STARTUP, RUNNING_OK, RUNNING_OK_NO_FULL_CONTROL};
|
||||
void handleRunState(Request& req, Response& resp);
|
||||
void handleIdentities(Request& req, Response& resp);
|
||||
void handleLocations(Request& req, Response& resp);
|
||||
@ -76,6 +82,8 @@ private:
|
||||
// to notify that a password callback is waiting
|
||||
// to answer the request, clear the flag and set the password
|
||||
bool mWantPassword;
|
||||
bool mPrevIsBad;
|
||||
int mCountAttempts;
|
||||
std::string mTitle;
|
||||
std::string mKeyName;
|
||||
std::string mPassword;
|
||||
|
182
libresapi/src/api/SettingsHandler.cpp
Normal file
@ -0,0 +1,182 @@
|
||||
#include "SettingsHandler.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <retroshare/rsinit.h>
|
||||
|
||||
namespace resource_api
|
||||
{
|
||||
#define SETTINGS_FILE (QString::fromUtf8(RsAccounts::AccountDirectory().c_str()) + "/Sonet.conf")
|
||||
|
||||
SettingsHandler::SettingsHandler(StateTokenServer *sts, const QString settingsGroup) :
|
||||
QSettings(SETTINGS_FILE, QSettings::IniFormat),
|
||||
mStateTokenServer(sts),
|
||||
mMtx("SettingsHandler Mutex"),
|
||||
mStateToken(sts->getNewToken())
|
||||
{
|
||||
RsPeerId sPreferedId;
|
||||
m_bValid = RsAccounts::GetPreferredAccountId(sPreferedId);
|
||||
|
||||
if (!settingsGroup.isEmpty())
|
||||
beginGroup(settingsGroup);
|
||||
|
||||
addResourceHandler("*", this, &SettingsHandler::handleSettingsRequest);
|
||||
addResourceHandler("get_advanced_mode", this, &SettingsHandler::handleGetAdvancedMode);
|
||||
addResourceHandler("set_advanced_mode", this, &SettingsHandler::handleSetAdvancedMode);
|
||||
addResourceHandler("get_flickable_grid_mode", this, &SettingsHandler::handleGetFlickableGridMode);
|
||||
addResourceHandler("set_flickable_grid_mode", this, &SettingsHandler::handleSetFlickableGridMode);
|
||||
addResourceHandler("get_auto_login", this, &SettingsHandler::handleGetAutoLogin);
|
||||
addResourceHandler("set_auto_login", this, &SettingsHandler::handleSetAutoLogin);
|
||||
}
|
||||
|
||||
SettingsHandler::~SettingsHandler()
|
||||
{
|
||||
sync();
|
||||
}
|
||||
|
||||
void SettingsHandler::handleSettingsRequest(Request &/*req*/, Response &resp)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SettingsHandler::handleGetAdvancedMode(Request &/*req*/, Response &resp)
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
|
||||
bool advanced_mode = valueFromGroup("General", "Advanced", false).toBool();
|
||||
resp.mDataStream << makeKeyValueReference("advanced_mode", advanced_mode);
|
||||
resp.setOk();
|
||||
sync();
|
||||
}
|
||||
|
||||
void SettingsHandler::handleSetAdvancedMode(Request &req, Response &resp)
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
|
||||
bool advanced_mode;
|
||||
req.mStream << makeKeyValueReference("advanced_mode", advanced_mode);
|
||||
setValueToGroup("General", "Advanced", advanced_mode);
|
||||
resp.setOk();
|
||||
sync();
|
||||
}
|
||||
|
||||
void SettingsHandler::handleGetFlickableGridMode(Request &/*req*/, Response &resp)
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
|
||||
bool flickable_grid_mode = valueFromGroup("General", "FlickableGrid", false).toBool();
|
||||
resp.mDataStream << makeKeyValueReference("flickable_grid_mode", flickable_grid_mode);
|
||||
resp.setOk();
|
||||
sync();
|
||||
}
|
||||
|
||||
void SettingsHandler::handleSetFlickableGridMode(Request &req, Response &resp)
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
|
||||
bool flickable_grid_mode;
|
||||
req.mStream << makeKeyValueReference("flickable_grid_mode", flickable_grid_mode);
|
||||
setValueToGroup("General", "FlickableGrid", flickable_grid_mode);
|
||||
|
||||
resp.setOk();
|
||||
sync();
|
||||
}
|
||||
|
||||
void SettingsHandler::handleGetAutoLogin(Request &/*req*/, Response &resp)
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
|
||||
bool autoLogin = RsInit::getAutoLogin();;
|
||||
resp.mDataStream << makeKeyValueReference("auto_login", autoLogin);
|
||||
resp.setOk();
|
||||
sync();
|
||||
}
|
||||
|
||||
void SettingsHandler::handleSetAutoLogin(Request &req, Response &resp)
|
||||
{
|
||||
{
|
||||
RS_STACK_MUTEX(mMtx);
|
||||
resp.mStateToken = mStateToken;
|
||||
}
|
||||
|
||||
bool autoLogin;
|
||||
req.mStream << makeKeyValueReference("auto_login", autoLogin);
|
||||
RsInit::setAutoLogin(autoLogin);
|
||||
|
||||
resp.setOk();
|
||||
sync();
|
||||
}
|
||||
|
||||
QVariant SettingsHandler::value(const QString &key, const QVariant &defaultVal) const
|
||||
{
|
||||
if (m_bValid == false)
|
||||
{
|
||||
return defaultVal.isNull() ? defaultValue(key) : defaultVal;
|
||||
}
|
||||
return QSettings::value(key, defaultVal.isNull() ? defaultValue(key) : defaultVal);
|
||||
}
|
||||
|
||||
void SettingsHandler::setValue(const QString &key, const QVariant &val)
|
||||
{
|
||||
if (m_bValid == false)
|
||||
{
|
||||
std::cerr << "RSettings::setValue() Calling on invalid object, key = " << key.toStdString() << std::endl;
|
||||
return;
|
||||
}
|
||||
if (val == defaultValue(key))
|
||||
QSettings::remove(key);
|
||||
else if (val != value(key))
|
||||
QSettings::setValue(key, val);
|
||||
}
|
||||
|
||||
QVariant SettingsHandler::valueFromGroup(const QString &group, const QString &key, const QVariant &defaultVal)
|
||||
{
|
||||
beginGroup(group);
|
||||
QVariant val = value(key, defaultVal);
|
||||
endGroup();
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void SettingsHandler::setValueToGroup(const QString &group, const QString &key, const QVariant &val)
|
||||
{
|
||||
beginGroup(group);
|
||||
setValue(key, val);
|
||||
endGroup();
|
||||
}
|
||||
|
||||
void SettingsHandler::setDefault(const QString &key, const QVariant &val)
|
||||
{
|
||||
_defaults.insert(key, val);
|
||||
}
|
||||
|
||||
QVariant SettingsHandler::defaultValue(const QString &key) const
|
||||
{
|
||||
if (_defaults.contains(key))
|
||||
return _defaults.value(key);
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
void SettingsHandler::reset()
|
||||
{
|
||||
/* Static method, so we have to create a QSettings object. */
|
||||
QSettings settings(SETTINGS_FILE, QSettings::IniFormat);
|
||||
settings.clear();
|
||||
}
|
||||
} // namespace resource_api
|
||||
|
59
libresapi/src/api/SettingsHandler.h
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef SETTINGSHANDLER_H
|
||||
#define SETTINGSHANDLER_H
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
#include <util/rsthreads.h>
|
||||
|
||||
#include "ResourceRouter.h"
|
||||
#include "StateTokenServer.h"
|
||||
|
||||
/* Reimplemented class RSettings*/
|
||||
namespace resource_api
|
||||
{
|
||||
class SettingsHandler : public ResourceRouter, public QSettings
|
||||
{
|
||||
public:
|
||||
SettingsHandler(StateTokenServer* sts, const QString group = QString());
|
||||
~SettingsHandler();
|
||||
|
||||
static void reset();
|
||||
|
||||
QVariant value(const QString &key,
|
||||
const QVariant &defaultVal = QVariant()) const;
|
||||
|
||||
void setValue(const QString &key, const QVariant &val);
|
||||
|
||||
QVariant valueFromGroup(const QString &group, const QString &key,
|
||||
const QVariant &defaultVal = QVariant());
|
||||
void setValueToGroup(const QString &group, const QString &key,
|
||||
const QVariant &val);
|
||||
|
||||
protected:
|
||||
void setDefault(const QString &key, const QVariant &val);
|
||||
QVariant defaultValue(const QString &key) const;
|
||||
|
||||
bool m_bValid;
|
||||
|
||||
private:
|
||||
void handleSettingsRequest(Request& req, Response& resp);
|
||||
|
||||
void handleGetAdvancedMode(Request& req, Response& resp);
|
||||
void handleSetAdvancedMode(Request& req, Response& resp);
|
||||
|
||||
void handleGetFlickableGridMode(Request& req, Response& resp);
|
||||
void handleSetFlickableGridMode(Request& req, Response& resp);
|
||||
|
||||
void handleGetAutoLogin(Request& req, Response& resp);
|
||||
void handleSetAutoLogin(Request& req, Response& resp);
|
||||
|
||||
QHash<QString, QVariant> _defaults;
|
||||
|
||||
StateTokenServer* mStateTokenServer;
|
||||
|
||||
RsMutex mMtx;
|
||||
StateToken mStateToken; // mutex protected
|
||||
};
|
||||
} // namespace resource_api
|
||||
|
||||
#endif // SETTINGSHANDLER_H
|
@ -10,6 +10,40 @@ DESTDIR = lib
|
||||
|
||||
INCLUDEPATH += ../../libretroshare/src
|
||||
|
||||
retroshare_android_service {
|
||||
win32 {
|
||||
OBJECTS_DIR = temp/obj
|
||||
|
||||
LIBS_DIR = $$PWD/../../libs/lib
|
||||
LIBS += $$OUT_PWD/../../libretroshare/src/lib/libretroshare.a
|
||||
LIBS += $$OUT_PWD/../../openpgpsdk/src/lib/libops.a
|
||||
|
||||
for(lib, LIB_DIR):LIBS += -L"$$lib"
|
||||
for(bin, BIN_DIR):LIBS += -L"$$bin"
|
||||
|
||||
|
||||
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
|
||||
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
|
||||
LIBS += -lwinmm
|
||||
|
||||
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
# Qt 5
|
||||
RC_INCLUDEPATH += $$_PRO_FILE_PWD_/../../libretroshare/src
|
||||
} else {
|
||||
# Qt 4
|
||||
QMAKE_RC += --include-dir=$$_PRO_FILE_PWD_/../../libretroshare/src
|
||||
}
|
||||
}
|
||||
|
||||
DEPENDPATH += . ../../libretroshare/src/
|
||||
INCLUDEPATH += ../../libretroshare/src/
|
||||
}
|
||||
|
||||
libresapihttpserver {
|
||||
CONFIG += libmicrohttpd
|
||||
|
||||
@ -183,3 +217,11 @@ libresapilocalserver {
|
||||
SOURCES *= api/ApiServerLocal.cpp
|
||||
HEADERS *= api/ApiServerLocal.h
|
||||
}
|
||||
|
||||
qt_dependencies {
|
||||
CONFIG *= qt
|
||||
QT *= core
|
||||
|
||||
SOURCES += api/SettingsHandler.cpp
|
||||
HEADERS += api/SettingsHandler.h
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ BUILD / DEVELOPMENT
|
||||
- the build process watches files for changes, and rebuilds and reloads the page. Build output is in ./public
|
||||
- use the --webinterface 9090 command line parameter to enable webui in retroshare-nogui
|
||||
- set the --docroot parameter of retroshare-nogui to point to the "libresapi/src/webui-src/public" directory
|
||||
(or symlink from /usr/share/RetroShare06/webui on Linux, ./webui on Windows)
|
||||
(or symlink from /usr/share/retroshare/webui on Linux, ./webui on Windows)
|
||||
- retroshare-gui does not have a --docroot parameter. Use symlinks then.
|
||||
|
||||
CONTRIBUTE
|
||||
|
@ -87,8 +87,87 @@ function getLobbyDetails(lobbyid){
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
function find_next(searchValue){
|
||||
var els = document.getElementsByClassName("chat msg text");
|
||||
var middle = document.getElementsByClassName("chat middle")[0];
|
||||
var find_hidden = document.getElementById("LastWordPos");
|
||||
var start_index = Number(find_hidden.innerText);
|
||||
|
||||
if(!Number.isInteger(start_index)){
|
||||
console.log(start_index + " is Not Integer");
|
||||
start_index = 0;
|
||||
}
|
||||
if(start_index > els.length)
|
||||
start_index = 0;
|
||||
|
||||
console.log(start_index);
|
||||
|
||||
for (var i = start_index; i < els.length; i++) {
|
||||
var start = els[i].innerHTML.indexOf(searchValue);
|
||||
if ( start > -1) {
|
||||
//match has been made
|
||||
middle.scrollTop = els[i].parentElement.offsetTop - middle.clientHeight/2;
|
||||
var end = searchValue.length + start;
|
||||
setSelectionRange(els[i], start, end);
|
||||
find_hidden.innerText = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setSelectionRange(el, start, end) {
|
||||
if (document.createRange && window.getSelection) {
|
||||
var range = document.createRange();
|
||||
range.selectNodeContents(el);
|
||||
var textNodes = getTextNodesIn(el);
|
||||
var foundStart = false;
|
||||
var charCount = 0, endCharCount;
|
||||
|
||||
for (var i = 0, textNode; textNode = textNodes[i++]; ) {
|
||||
endCharCount = charCount + textNode.length;
|
||||
if (!foundStart && start >= charCount && (start < endCharCount || (start == endCharCount && i <= textNodes.length))) {
|
||||
range.setStart(textNode, start - charCount);
|
||||
foundStart = true;
|
||||
}
|
||||
if (foundStart && end <= endCharCount) {
|
||||
range.setEnd(textNode, end - charCount);
|
||||
break;
|
||||
}
|
||||
charCount = endCharCount;
|
||||
}
|
||||
|
||||
var sel = window.getSelection();
|
||||
sel.removeAllRanges();
|
||||
sel.addRange(range);
|
||||
} else if (document.selection && document.body.createTextRange) {
|
||||
var textRange = document.body.createTextRange();
|
||||
textRange.moveToElementText(el);
|
||||
textRange.collapse(true);
|
||||
textRange.moveEnd("character", end);
|
||||
textRange.moveStart("character", start);
|
||||
textRange.select();
|
||||
}
|
||||
}
|
||||
|
||||
function getTextNodesIn(node) {
|
||||
var textNodes = [];
|
||||
if (node.nodeType == 3) {
|
||||
textNodes.push(node);
|
||||
} else {
|
||||
var children = node.childNodes;
|
||||
for (var i = 0, len = children.length; i < len; ++i) {
|
||||
textNodes.push.apply(textNodes, getTextNodesIn(children[i]));
|
||||
}
|
||||
}
|
||||
return textNodes;
|
||||
}
|
||||
|
||||
function sendmsg(msgid){
|
||||
var txtmsg = document.getElementById("txtNewMsg");
|
||||
var remove_whitespace = txtmsg.value.replace(/(\r\n|\n|\r|\s)+/g,'');
|
||||
if( remove_whitespace == '')
|
||||
return;
|
||||
rs.request("chat/send_message", {
|
||||
chat_id: msgid,
|
||||
msg: txtmsg.value
|
||||
@ -131,7 +210,7 @@ function lobby(lobbyid){
|
||||
});
|
||||
|
||||
var intro = [
|
||||
m("h2",lobdt.name),
|
||||
//m("h2",lobdt.name),
|
||||
m("p",lobdt.topic ? lobdt.topic: lobdt.location),
|
||||
m("hr")
|
||||
]
|
||||
@ -154,22 +233,61 @@ function lobby(lobbyid){
|
||||
}),
|
||||
];
|
||||
} else {
|
||||
|
||||
var el = document.getElementById("CharLobbyName");
|
||||
el.innerText = lobdt.name;
|
||||
|
||||
msg = m(".chat.bottom",[
|
||||
m("div","enter new message:"),
|
||||
m("input",{
|
||||
m("div","enter new message, Ctrl+Enter to submit:"),
|
||||
m("textarea",{
|
||||
id:"txtNewMsg",
|
||||
onkeydown: function(event){
|
||||
if (event.keyCode == 13){
|
||||
if (event.ctrlKey && event.keyCode == 13){
|
||||
sendmsg(lobbyid);
|
||||
}
|
||||
}
|
||||
}),
|
||||
m("div.btn2", {
|
||||
m("table.noBorderTable", [
|
||||
m("tr",[
|
||||
m("td.noBorderTD",[
|
||||
m("div.btnSmall", {
|
||||
style: {textAlign:"center"},
|
||||
onclick: function(){
|
||||
var els = document.getElementsByClassName("chat middle");
|
||||
var el = els[0];
|
||||
el.scrollTop = el.scrollHeight - el.clientHeight;
|
||||
}
|
||||
},"bottom")
|
||||
]),
|
||||
m("td.noBorderTD",[
|
||||
m("div.btnSmall", {
|
||||
style: {textAlign:"center"},
|
||||
onclick: function(){
|
||||
sendmsg(lobbyid);
|
||||
}
|
||||
},"submit")
|
||||
]),
|
||||
m("td.noBorderTD",[
|
||||
m("input",{
|
||||
id:"txtMsgKeyword"
|
||||
})
|
||||
]),
|
||||
m("td.noBorderTD", [
|
||||
m("div.btnSmall", {
|
||||
style: {textAlign:"center"},
|
||||
onclick: function(){
|
||||
var key = document.getElementById("txtMsgKeyword");
|
||||
var txtkeyword = key.value;
|
||||
find_next(txtkeyword);
|
||||
}
|
||||
},"Find")
|
||||
])
|
||||
])
|
||||
]),
|
||||
m("div.hidden", {
|
||||
id: "LastWordPos"
|
||||
},""
|
||||
),
|
||||
]);
|
||||
}
|
||||
if (lobdt.subscribed != undefined
|
||||
@ -256,12 +374,28 @@ module.exports = {
|
||||
},[
|
||||
m(".chat.container", [
|
||||
m(".chat.header", [
|
||||
m("table.noBorderTable",[
|
||||
m("tr",[
|
||||
m("td.noBorderTD",[
|
||||
m(
|
||||
"h2",
|
||||
{style:{margin:"0px"}},
|
||||
"chat"
|
||||
)
|
||||
]),
|
||||
m("td.noBorderTD",[
|
||||
m(
|
||||
"h2",
|
||||
{
|
||||
style:{margin:"0px"},
|
||||
id:"CharLobbyName"
|
||||
},
|
||||
"Lobby Name"
|
||||
)
|
||||
])
|
||||
])
|
||||
])
|
||||
]),
|
||||
m(".chat.left", [
|
||||
m("div.chat.header[style=position:relative]","lobbies:"),
|
||||
m("br"),
|
||||
|
@ -77,11 +77,41 @@ hr {
|
||||
background-color: midnightblue;
|
||||
}
|
||||
|
||||
.btnSmall{
|
||||
border-style: solid;
|
||||
/*border-color: lime;*/
|
||||
border-color: limeGreen;
|
||||
/*border-width: 1px;*/
|
||||
border-radius: 3mm;
|
||||
padding: 1mm;
|
||||
font-size: 100%;
|
||||
|
||||
cursor: pointer;
|
||||
margin-bottom: 0mm;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.noBorderTable{
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.noBorderTD{
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
.filelink{
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
input, textarea{
|
||||
|
||||
input,textarea{
|
||||
color: lime;
|
||||
font-family: monospace;
|
||||
background-color: black;
|
||||
@ -90,8 +120,8 @@ input, textarea{
|
||||
border-radius: 3mm;
|
||||
border-width: 1mm;
|
||||
padding: 2mm;
|
||||
margin-bottom: 2mm;
|
||||
margin-right: 2mm;
|
||||
margin-bottom: 1mm;
|
||||
margin-right: 1mm;
|
||||
|
||||
/* make the button the whole screen width */
|
||||
width: 100%;
|
||||
@ -102,6 +132,45 @@ input:hover{
|
||||
background-color: midnightblue;
|
||||
}
|
||||
|
||||
textarea#txtNewMsg{
|
||||
color: lime;
|
||||
font-family: monospace;
|
||||
background-color: black;
|
||||
border-color: lime;
|
||||
font-size: 100%;
|
||||
border-radius: 3mm;
|
||||
border-width: 1mm;
|
||||
padding: 2mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-right: 1mm;
|
||||
height:110px;
|
||||
resize: none;
|
||||
/* make the button the whole screen width */
|
||||
width: 100%;
|
||||
/*height: 100%;*/
|
||||
/* make the text input fit small screens*/
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
input#txtMsgKeyword{
|
||||
color: lime;
|
||||
font-family: monospace;
|
||||
background-color: black;
|
||||
border-color: lime;
|
||||
font-size: 100%;
|
||||
border-radius: 3mm;
|
||||
border-width: 1mm;
|
||||
padding: 1mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-right: 1mm;
|
||||
|
||||
/* make the button the whole screen width */
|
||||
width: 100%;
|
||||
/* make the text input fit small screens*/
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
width: auto;
|
||||
}
|
||||
|
294
libresapi/src/webui-src/app/orange.scss
Normal file
@ -0,0 +1,294 @@
|
||||
body {
|
||||
background-color: #CCC;
|
||||
color: #666;
|
||||
font-family: sans;
|
||||
margin: 0em;
|
||||
/*padding: 1.5em;*/
|
||||
padding: 2mm;
|
||||
font-size: 1.1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
z-index: 10;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.paddingbox {
|
||||
padding: 2mm;
|
||||
}
|
||||
|
||||
.nav {
|
||||
list-style-type: none;
|
||||
padding: 0em;
|
||||
margin: 0em;
|
||||
}
|
||||
|
||||
.nav li {
|
||||
display: inline;
|
||||
padding: 0.1em;
|
||||
margin-right: 1em;
|
||||
border-width: 0.1em;
|
||||
border-color: blue;
|
||||
border-bottom-style: solid;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0.3em;
|
||||
border-style: none;
|
||||
border-width: 0.1em;
|
||||
border-color: orange;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
input[type="button"] {
|
||||
border: solid 1px rgba(0, 0, 0, 0);
|
||||
border-radius: 10px;
|
||||
font-size: 6mm;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
background-color: #f79e3a;
|
||||
width: 26vw;
|
||||
display: inline-grid;
|
||||
margin: 0.2rem;
|
||||
padding: 0.5rem;
|
||||
text-align: center;
|
||||
text-transform: capitalize;
|
||||
box-shadow: 5px 5px 9px #aaa;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.btn2,
|
||||
.box,
|
||||
.btnSmall {
|
||||
border: solid 1px rgba(0, 0, 0, 0);
|
||||
border-radius: 10px;
|
||||
font-size: 6mm;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
background-color: #f79e3a;
|
||||
display: inline-grid;
|
||||
margin: 0.2rem;
|
||||
padding: 0.5rem;
|
||||
text-align: center;
|
||||
text-transform: capitalize;
|
||||
box-shadow: 5px 5px 9px #aaa;
|
||||
}
|
||||
|
||||
.btn2,
|
||||
.box
|
||||
{
|
||||
width: 12rem;
|
||||
}
|
||||
|
||||
.btnSmall {
|
||||
width: 7rem;
|
||||
}
|
||||
|
||||
.menu {
|
||||
border: solid 1px rgba(0, 0, 0, 0);
|
||||
border-radius: 10px;
|
||||
font-size: 0.8em;
|
||||
cursor: pointer;
|
||||
background-color: #f79e3a;
|
||||
display: inline-grid;
|
||||
margin: 0.2rem;
|
||||
padding: 0.5rem;
|
||||
text-align: center;
|
||||
text-transform: capitalize;
|
||||
width: 7rem;
|
||||
}
|
||||
|
||||
span.menu:nth-child(2) {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
width: 6.3rem;
|
||||
}
|
||||
|
||||
span.menu:nth-child(16) {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
li .menu {
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
div.btn2:nth-child(9) {
|
||||
border: rgba(0, 0, 0, 0);
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
text-decoration: underline;
|
||||
box-shadow: unset;
|
||||
margin-top: 1em;
|
||||
text-align: left !important;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.btn2:nth-child(9):hover {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.btn2:hover {
|
||||
background-color: orangered;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.noBorderTable {
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.noBorderTD {
|
||||
border: none;
|
||||
border-collapse: collapse;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
.filelink {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea {
|
||||
border-color: orange;
|
||||
font-size: 10mm;
|
||||
border-radius: 3mm;
|
||||
border-width: 1mm;
|
||||
padding: 2mm;
|
||||
margin-bottom: 1mm;
|
||||
margin-right: 1mm;
|
||||
/* make the button the whole screen width */
|
||||
width: 100%;
|
||||
/* make the text input fit small screens*/
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
input[type="button"]:hover {
|
||||
background-color: orangered;
|
||||
}
|
||||
|
||||
|
||||
/*chat*/
|
||||
|
||||
textarea#txtNewMsg {
|
||||
font-size: 100%;
|
||||
border-radius: 3mm;
|
||||
border-width: 1mm;
|
||||
padding: 2mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-right: 1mm;
|
||||
height: 110px;
|
||||
resize: none;
|
||||
/* make the button the whole screen width */
|
||||
width: 100%;
|
||||
/*height: 100%;*/
|
||||
/* make the text input fit small screens*/
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
input#txtMsgKeyword {
|
||||
/* color: orange;
|
||||
font-family: monospace;
|
||||
background-color: black;*/
|
||||
border-color: orange;
|
||||
font-size: 100%;
|
||||
border-radius: 3mm;
|
||||
border-width: 1mm;
|
||||
padding: 1mm;
|
||||
margin-bottom: 0mm;
|
||||
margin-right: 1mm;
|
||||
/* make the button the whole screen width */
|
||||
width: 100%;
|
||||
/* make the text input fit small screens*/
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: -webkit-box;
|
||||
/* OLD - iOS 6-, Safari 3.1-6 */
|
||||
display: -moz-box;
|
||||
/* OLD - Firefox 19- (buggy but mostly works) */
|
||||
display: -ms-flexbox;
|
||||
/* TWEENER - IE 10 */
|
||||
display: -webkit-flex;
|
||||
/* NEW - Chrome */
|
||||
display: flex;
|
||||
/* NEW, Spec - Opera 12.1, Firefox 20+ */
|
||||
}
|
||||
|
||||
.flexwidemember {
|
||||
-webkit-box-flex: 1;
|
||||
/* OLD - iOS 6-, Safari 3.1-6 */
|
||||
-moz-box-flex: 1;
|
||||
/* OLD - Firefox 19- */
|
||||
width: 20%;
|
||||
/* For old syntax, otherwise collapses. */
|
||||
-webkit-flex: 1;
|
||||
/* Chrome */
|
||||
-ms-flex: 1;
|
||||
/* IE 10 */
|
||||
flex: 1;
|
||||
/* NEW, Spec - Opera 12.1, Firefox 20+ */
|
||||
}
|
||||
|
||||
#logo_splash {
|
||||
-webkit-animation-fill-mode: forwards;
|
||||
/* Chrome, Safari, Opera */
|
||||
animation-fill-mode: forwards;
|
||||
-webkit-animation-name: logo_splash;
|
||||
/* Chrome, Safari, Opera */
|
||||
-webkit-animation-duration: 3s;
|
||||
/* Chrome, Safari, Opera */
|
||||
animation-name: logo_splash;
|
||||
animation-duration: 3s;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
/* Chrome, Safari, Opera */
|
||||
|
||||
@-webkit-keyframes logo_splash {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Standard syntax */
|
||||
|
||||
@keyframes logo_splash {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
@ -35,26 +35,39 @@
|
||||
#include "util/rsmemory.h"
|
||||
#include "util/rsprint.h"
|
||||
|
||||
#include <serialiser/rsmsgitems.h>
|
||||
#include "rsitems/rsmsgitems.h"
|
||||
|
||||
#include <retroshare/rsmsgs.h>
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rsiface.h>
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
|
||||
#include <rsserver/p3face.h>
|
||||
#include <services/p3idservice.h>
|
||||
#include <gxs/gxssecurity.h>
|
||||
#include <turtle/p3turtle.h>
|
||||
#include <retroshare/rsids.h>
|
||||
#include "rsserver/p3face.h"
|
||||
#include "services/p3idservice.h"
|
||||
#include "gxs/gxssecurity.h"
|
||||
#include "turtle/p3turtle.h"
|
||||
#include "retroshare/rsids.h"
|
||||
#include "distantchat.h"
|
||||
|
||||
//#define DEBUG_DISTANT_CHAT
|
||||
|
||||
static const uint32_t DISTANT_CHAT_KEEP_ALIVE_TIMEOUT = 6 ; // send keep alive packet so as to avoid tunnel breaks.
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
|
||||
static const uint32_t RS_DISTANT_CHAT_DH_STATUS_UNINITIALIZED = 0x0000 ;
|
||||
static const uint32_t RS_DISTANT_CHAT_DH_STATUS_HALF_KEY_DONE = 0x0001 ;
|
||||
static const uint32_t RS_DISTANT_CHAT_DH_STATUS_KEY_AVAILABLE = 0x0002 ;
|
||||
#include <sys/time.h>
|
||||
|
||||
uint32_t msecs_of_day()
|
||||
{
|
||||
timeval tv ;
|
||||
gettimeofday(&tv,NULL) ;
|
||||
return tv.tv_usec / 1000 ;
|
||||
}
|
||||
#define DISTANT_CHAT_DEBUG() std::cerr << time(NULL) << "." << std::setfill('0') << std::setw(3) << msecs_of_day() << " : DISTANT_CHAT : " << __FUNCTION__ << " : "
|
||||
#endif
|
||||
|
||||
//static const uint32_t DISTANT_CHAT_KEEP_ALIVE_TIMEOUT = 6 ; // send keep alive packet so as to avoid tunnel breaks.
|
||||
|
||||
//static const uint32_t RS_DISTANT_CHAT_DH_STATUS_UNINITIALIZED = 0x0000 ;
|
||||
//static const uint32_t RS_DISTANT_CHAT_DH_STATUS_HALF_KEY_DONE = 0x0001 ;
|
||||
//static const uint32_t RS_DISTANT_CHAT_DH_STATUS_KEY_AVAILABLE = 0x0002 ;
|
||||
|
||||
static const uint32_t DISTANT_CHAT_GXS_TUNNEL_SERVICE_ID = 0xa0001 ;
|
||||
|
||||
@ -86,19 +99,21 @@ bool DistantChatService::handleOutgoingItem(RsChatItem *item)
|
||||
}
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3ChatService::handleOutgoingItem(): sending to " << item->PeerId() << ": interpreted as a distant chat virtual peer id." << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << "p3ChatService::handleOutgoingItem(): sending to " << item->PeerId() << ": interpreted as a distant chat virtual peer id." << std::endl;
|
||||
#endif
|
||||
|
||||
uint32_t size = item->serial_size() ;
|
||||
uint32_t size = RsChatSerialiser().size(item) ;
|
||||
RsTemporaryMemory mem(size) ;
|
||||
|
||||
if(!item->serialise(mem,size))
|
||||
if(!RsChatSerialiser().serialise(item,mem,&size))
|
||||
{
|
||||
std::cerr << "(EE) serialisation error. Something's really wrong!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << " sending: " << RsUtil::BinToHex(mem,size) << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " sending: " << RsUtil::BinToHex(mem,size,100) << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " size: " << std::dec << size << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " hash: " << RsDirUtil::sha1sum(mem,size) << std::endl;
|
||||
#endif
|
||||
|
||||
mGxsTunnels->sendData( RsGxsTunnelId(item->PeerId()),DISTANT_CHAT_GXS_TUNNEL_SERVICE_ID,mem,size);
|
||||
@ -110,7 +125,7 @@ void DistantChatService::handleRecvChatStatusItem(RsChatStatusItem *cs)
|
||||
if(cs->flags & RS_CHAT_FLAG_CONNEXION_REFUSED)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "(II) Distant chat: received notification that peer refuses conversation." << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << "(II) Distant chat: received notification that peer refuses conversation." << std::endl;
|
||||
#endif
|
||||
RsServer::notify()->notifyChatStatus(ChatId(DistantChatPeerId(cs->PeerId())),"Connexion refused by distant peer!") ;
|
||||
}
|
||||
@ -140,7 +155,7 @@ bool DistantChatService::acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTun
|
||||
if(!res)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "(II) refusing distant chat from peer " << gxs_id << ". Sending a notification back to tunnel " << tunnel_id << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << "(II) refusing distant chat from peer " << gxs_id << ". Sending a notification back to tunnel " << tunnel_id << std::endl;
|
||||
#endif
|
||||
RsChatStatusItem *item = new RsChatStatusItem ;
|
||||
item->flags = RS_CHAT_FLAG_CONNEXION_REFUSED ;
|
||||
@ -149,16 +164,20 @@ bool DistantChatService::acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTun
|
||||
|
||||
// we do not use handleOutGoingItem() because there's no distant chat contact, as the chat is refused.
|
||||
|
||||
uint32_t size = item->serial_size() ;
|
||||
uint32_t size = RsChatSerialiser().size(item) ;
|
||||
RsTemporaryMemory mem(size) ;
|
||||
|
||||
if(!item->serialise(mem,size))
|
||||
if(!RsChatSerialiser().serialise(item,mem,&size))
|
||||
{
|
||||
std::cerr << "(EE) serialisation error. Something's really wrong!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::cerr << " sending: " << RsUtil::BinToHex(mem,size) << std::endl;
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
DISTANT_CHAT_DEBUG() << " sending: " << RsUtil::BinToHex(mem,size,100) << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " size: " << std::dec << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " hash: " << RsDirUtil::sha1sum(mem,size) << std::endl;
|
||||
#endif
|
||||
|
||||
mGxsTunnels->sendData( RsGxsTunnelId(item->PeerId()),DISTANT_CHAT_GXS_TUNNEL_SERVICE_ID,mem,size);
|
||||
}
|
||||
@ -169,7 +188,7 @@ bool DistantChatService::acceptDataFromPeer(const RsGxsId& gxs_id,const RsGxsTun
|
||||
void DistantChatService::notifyTunnelStatus(const RsGxsTunnelService::RsGxsTunnelId &tunnel_id, uint32_t tunnel_status)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "DistantChatService::notifyTunnelStatus(): got notification " << std::hex << tunnel_status << std::dec << " for tunnel " << tunnel_id << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << "DistantChatService::notifyTunnelStatus(): got notification " << std::hex << tunnel_status << std::dec << " for tunnel " << tunnel_id << std::endl;
|
||||
#endif
|
||||
|
||||
switch(tunnel_status)
|
||||
@ -195,9 +214,10 @@ void DistantChatService::notifyTunnelStatus(const RsGxsTunnelService::RsGxsTunne
|
||||
void DistantChatService::receiveData(const RsGxsTunnelService::RsGxsTunnelId &tunnel_id, unsigned char *data, uint32_t data_size)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "DistantChatService::receiveData(): got data of size " << data_size << " for tunnel " << tunnel_id << std::endl;
|
||||
std::cerr << " received: " << RsUtil::BinToHex(data,data_size) << std::endl;
|
||||
std::cerr << " deserialising..." << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << "DistantChatService::receiveData(): got data of size " << std::dec << data_size << " for tunnel " << tunnel_id << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " received: " << RsUtil::BinToHex(data,data_size,100) << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " hash: " << RsDirUtil::sha1sum(data,data_size) << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << " deserialising..." << std::endl;
|
||||
#endif
|
||||
|
||||
// always make the contact up to date. This is useful for server side, which doesn't know about the chat until it
|
||||
@ -243,7 +263,9 @@ void DistantChatService::markDistantChatAsClosed(const DistantChatPeerId& dcpid)
|
||||
mDistantChatContacts.erase(it) ;
|
||||
}
|
||||
|
||||
bool DistantChatService::initiateDistantChatConnexion(const RsGxsId& to_gxs_id, const RsGxsId& from_gxs_id, DistantChatPeerId& dcpid, uint32_t& error_code)
|
||||
bool DistantChatService::initiateDistantChatConnexion(
|
||||
const RsGxsId& to_gxs_id, const RsGxsId& from_gxs_id,
|
||||
DistantChatPeerId& dcpid, uint32_t& error_code, bool notify )
|
||||
{
|
||||
RsGxsTunnelId tunnel_id ;
|
||||
|
||||
@ -259,16 +281,18 @@ bool DistantChatService::initiateDistantChatConnexion(const RsGxsId& to_gxs_id,
|
||||
|
||||
error_code = RS_DISTANT_CHAT_ERROR_NO_ERROR ;
|
||||
|
||||
if(notify)
|
||||
{
|
||||
// Make a self message to raise the chat window
|
||||
|
||||
RsChatMsgItem *item = new RsChatMsgItem;
|
||||
item->message = "[Starting distant chat. Please wait for secure tunnel to be established]" ;
|
||||
item->chatFlags = RS_CHAT_FLAG_PRIVATE ;
|
||||
item->sendTime = time(NULL) ;
|
||||
item->PeerId(RsPeerId(tunnel_id)) ;
|
||||
handleRecvChatMsgItem(item) ;
|
||||
|
||||
delete item ; // item is replaced by NULL if partial, but this is not the case here.
|
||||
item->message = "[Starting distant chat. Please wait for secure tunnel";
|
||||
item->message += " to be established]";
|
||||
item->chatFlags = RS_CHAT_FLAG_PRIVATE;
|
||||
item->sendTime = time(NULL);
|
||||
item->PeerId(RsPeerId(tunnel_id));
|
||||
handleRecvChatMsgItem(item);
|
||||
delete item ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
@ -320,7 +344,7 @@ bool DistantChatService::setDistantChatPermissionFlags(uint32_t flags)
|
||||
{
|
||||
mDistantChatPermissions = flags ;
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "(II) Changing distant chat permissions to " << flags << ". Existing openned chats will however remain active until closed" << std::endl;
|
||||
DISTANT_CHAT_DEBUG() << "(II) Changing distant chat permissions to " << flags << ". Existing openned chats will however remain active until closed" << std::endl;
|
||||
#endif
|
||||
triggerConfigSave() ;
|
||||
}
|
||||
@ -350,7 +374,7 @@ bool DistantChatService::processLoadListItem(const RsItem *item)
|
||||
if(kit->key == "DISTANT_CHAT_PERMISSION_FLAGS")
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "Loaded distant chat permission flags: " << kit->value << std::endl ;
|
||||
DISTANT_CHAT_DEBUG() << "Loaded distant chat permission flags: " << kit->value << std::endl ;
|
||||
#endif
|
||||
if (!kit->value.empty())
|
||||
{
|
||||
|
@ -45,10 +45,15 @@ public:
|
||||
bool processLoadListItem(const RsItem *item) ;
|
||||
void addToSaveList(std::list<RsItem*>& list) const;
|
||||
|
||||
// Creates the invite if the public key of the distant peer is available.
|
||||
// Om success, stores the invite in the map above, so that we can respond to tunnel requests.
|
||||
//
|
||||
bool initiateDistantChatConnexion(const RsGxsId& to_gxs_id, const RsGxsId &from_gxs_id, DistantChatPeerId& dcpid, uint32_t &error_code) ;
|
||||
/**
|
||||
* Creates the invite if the public key of the distant peer is available.
|
||||
* On success, stores the invite in the map above, so that we can respond
|
||||
* to tunnel requests. */
|
||||
bool initiateDistantChatConnexion( const RsGxsId& to_gxs_id,
|
||||
const RsGxsId &from_gxs_id,
|
||||
DistantChatPeerId& dcpid,
|
||||
uint32_t &error_code,
|
||||
bool notify = true );
|
||||
bool closeDistantChatConnexion(const DistantChatPeerId &tunnel_id) ;
|
||||
|
||||
// Sets flags to only allow connexion from some people.
|
||||
|
@ -23,8 +23,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <math.h>
|
||||
#include <sstream>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "util/rsprint.h"
|
||||
@ -54,7 +55,7 @@ static const time_t MIN_DELAY_BETWEEN_PUBLIC_LOBBY_REQ = 20 ; // don't ask fo
|
||||
static const time_t LOBBY_LIST_AUTO_UPDATE_TIME = 121 ; // regularly ask for available lobbies every 5 minutes, to allow auto-subscribe to work
|
||||
|
||||
static const uint32_t MAX_ALLOWED_LOBBIES_IN_LIST_WARNING = 50 ;
|
||||
static const uint32_t MAX_MESSAGES_PER_SECONDS_NUMBER = 5 ; // max number of messages from a given peer in a window for duration below
|
||||
//static const uint32_t MAX_MESSAGES_PER_SECONDS_NUMBER = 5 ; // max number of messages from a given peer in a window for duration below
|
||||
static const uint32_t MAX_MESSAGES_PER_SECONDS_PERIOD = 10 ; // duration window for max number of messages before messages get dropped.
|
||||
|
||||
#define IS_PUBLIC_LOBBY(flags) (flags & RS_CHAT_LOBBY_FLAGS_PUBLIC )
|
||||
@ -222,7 +223,7 @@ bool DistributedChatService::checkSignature(RsChatLobbyBouncingObject *obj,const
|
||||
|
||||
mGixs->requestKey(obj->signature.keyId,peer_list,RsIdentityUsage(RS_SERVICE_TYPE_CHAT,RsIdentityUsage::CHAT_LOBBY_MSG_VALIDATION,RsGxsGroupId(),RsGxsMessageId(),obj->lobby_id));
|
||||
|
||||
uint32_t size = obj->signed_serial_size() ;
|
||||
uint32_t size = RsChatSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_SIGNATURE).size(dynamic_cast<RsItem*>(obj)) ;
|
||||
RsTemporaryMemory memory(size) ;
|
||||
|
||||
#ifdef DEBUG_CHAT_LOBBIES
|
||||
@ -230,7 +231,7 @@ bool DistributedChatService::checkSignature(RsChatLobbyBouncingObject *obj,const
|
||||
std::cerr << " signature id: " << obj->signature.keyId << std::endl;
|
||||
#endif
|
||||
|
||||
if(!obj->serialise_signed_part(memory,size))
|
||||
if(!RsChatSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_SIGNATURE).serialise(dynamic_cast<RsItem*>(obj),memory,&size))
|
||||
{
|
||||
std::cerr << " (EE) Cannot serialise message item. " << std::endl;
|
||||
return false ;
|
||||
@ -239,7 +240,7 @@ bool DistributedChatService::checkSignature(RsChatLobbyBouncingObject *obj,const
|
||||
uint32_t error_status ;
|
||||
RsIdentityUsage use_info(RS_SERVICE_TYPE_CHAT,RsIdentityUsage::CHAT_LOBBY_MSG_VALIDATION,RsGxsGroupId(),RsGxsMessageId(),obj->lobby_id) ;
|
||||
|
||||
if(!mGixs->validateData(memory,obj->signed_serial_size(),obj->signature,false,use_info,error_status))
|
||||
if(!mGixs->validateData(memory,size,obj->signature,false,use_info,error_status))
|
||||
{
|
||||
bool res = false ;
|
||||
|
||||
@ -415,7 +416,7 @@ void DistributedChatService::checkSizeAndSendLobbyMessage(RsChatItem *msg)
|
||||
//
|
||||
static const uint32_t MAX_ITEM_SIZE = 32000 ;
|
||||
|
||||
if(msg->serial_size() > MAX_ITEM_SIZE)
|
||||
if(RsChatSerialiser().size(msg) > MAX_ITEM_SIZE)
|
||||
{
|
||||
std::cerr << "(EE) Chat item exceeds maximum serial size. It will be dropped." << std::endl;
|
||||
delete msg ;
|
||||
@ -429,13 +430,13 @@ bool DistributedChatService::handleRecvItem(RsChatItem *item)
|
||||
switch(item->PacketSubType())
|
||||
{
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_SIGNED_EVENT: handleRecvChatLobbyEventItem (dynamic_cast<RsChatLobbyEventItem *>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE_DEPRECATED: handleRecvLobbyInvite_Deprecated (dynamic_cast<RsChatLobbyInviteItem_Deprecated*>(item)) ; break ; // to be removed (deprecated since May 2017)
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE: handleRecvLobbyInvite (dynamic_cast<RsChatLobbyInviteItem *>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_CHALLENGE: handleConnectionChallenge (dynamic_cast<RsChatLobbyConnectChallengeItem *>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_UNSUBSCRIBE: handleFriendUnsubscribeLobby (dynamic_cast<RsChatLobbyUnsubscribeItem *>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_LIST_REQUEST: handleRecvChatLobbyListRequest (dynamic_cast<RsChatLobbyListRequestItem *>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_LOBBY_LIST: handleRecvChatLobbyList (dynamic_cast<RsChatLobbyListItem *>(item)) ; break ;
|
||||
default:
|
||||
return false ;
|
||||
default: return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
@ -536,6 +537,7 @@ void DistributedChatService::handleRecvChatLobbyList(RsChatLobbyListItem *item)
|
||||
std::cerr << " lobby is flagged as autosubscribed. Adding it to subscribe list." << std::endl;
|
||||
#endif
|
||||
ChatLobbyId clid = item->lobbies[i].id;
|
||||
if(_chat_lobbys.find(clid) == _chat_lobbys.end())
|
||||
chatLobbyToSubscribe.push_back(clid);
|
||||
}
|
||||
|
||||
@ -556,7 +558,39 @@ void DistributedChatService::handleRecvChatLobbyList(RsChatLobbyListItem *item)
|
||||
|
||||
std::list<ChatLobbyId>::iterator it;
|
||||
for (it = chatLobbyToSubscribe.begin(); it != chatLobbyToSubscribe.end(); ++it)
|
||||
joinVisibleChatLobby(*it,_default_identity);
|
||||
{
|
||||
RsGxsId gxsId = _lobby_default_identity[*it];
|
||||
if (gxsId.isNull())
|
||||
gxsId = _default_identity;
|
||||
|
||||
//Check if gxsId can connect to this lobby
|
||||
ChatLobbyFlags flags(0);
|
||||
std::map<ChatLobbyId,VisibleChatLobbyRecord>::const_iterator vlIt = _visible_lobbies.find(*it) ;
|
||||
if(vlIt != _visible_lobbies.end())
|
||||
flags = vlIt->second.lobby_flags;
|
||||
else
|
||||
{
|
||||
std::map<ChatLobbyId,ChatLobbyEntry>::const_iterator clIt = _chat_lobbys.find(*it) ;
|
||||
|
||||
if(clIt != _chat_lobbys.end())
|
||||
flags = clIt->second.lobby_flags;
|
||||
}
|
||||
|
||||
RsIdentityDetails idd ;
|
||||
if(!rsIdentity->getIdDetails(gxsId,idd))
|
||||
std::cerr << "(EE) Lobby auto-subscribe: Can't get Id detail for:" << gxsId.toStdString().c_str() << std::endl;
|
||||
else
|
||||
{
|
||||
if(IS_PGP_SIGNED_LOBBY(flags)
|
||||
&& !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED) )
|
||||
{
|
||||
std::cerr << "(EE) Attempt to auto-subscribe to signed lobby with non signed Id. Remove it." << std::endl;
|
||||
setLobbyAutoSubscribe(*it, false);
|
||||
} else {
|
||||
joinVisibleChatLobby(*it,gxsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(std::list<ChatLobbyId>::const_iterator it = invitationNeeded.begin();it!=invitationNeeded.end();++it)
|
||||
invitePeerToLobby(*it,item->PeerId(),false) ;
|
||||
@ -970,10 +1004,10 @@ bool DistributedChatService::locked_initLobbyBouncableObject(const ChatLobbyId&
|
||||
|
||||
// now sign the object, if the lobby expects it
|
||||
|
||||
uint32_t size = item.signed_serial_size() ;
|
||||
uint32_t size = RsChatSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_SIGNATURE).size(dynamic_cast<RsItem*>(&item)) ;
|
||||
RsTemporaryMemory memory(size) ;
|
||||
|
||||
if(!item.serialise_signed_part(memory,size))
|
||||
if(!RsChatSerialiser(RsServiceSerializer::SERIALIZATION_FLAG_SIGNATURE).serialise(dynamic_cast<RsItem*>(&item),memory,&size))
|
||||
{
|
||||
std::cerr << "(EE) Cannot sign message item. " << std::endl;
|
||||
return false ;
|
||||
@ -1240,7 +1274,38 @@ void DistributedChatService::invitePeerToLobby(const ChatLobbyId& lobby_id, cons
|
||||
item->PeerId(peer_id) ;
|
||||
|
||||
sendChatItem(item) ;
|
||||
|
||||
//FOR BACKWARD COMPATIBILITY
|
||||
{// to be removed (deprecated since May 2017)
|
||||
RsChatLobbyInviteItem_Deprecated *item = new RsChatLobbyInviteItem_Deprecated ;
|
||||
|
||||
item->lobby_id = lobby_id ;
|
||||
item->lobby_name = it->second.lobby_name ;
|
||||
item->lobby_topic = it->second.lobby_topic ;
|
||||
item->lobby_flags = connexion_challenge?RS_CHAT_LOBBY_FLAGS_CHALLENGE:(it->second.lobby_flags) ;
|
||||
item->PeerId(peer_id) ;
|
||||
|
||||
sendChatItem(item) ;
|
||||
}
|
||||
}
|
||||
|
||||
// to be removed (deprecated since May 2017)
|
||||
void DistributedChatService::handleRecvLobbyInvite_Deprecated(RsChatLobbyInviteItem_Deprecated *item)
|
||||
{
|
||||
#ifdef DEBUG_CHAT_LOBBIES
|
||||
std::cerr << "Received deprecated invite to lobby from " << item->PeerId() << " to lobby " << std::hex << item->lobby_id << std::dec << ", named " << item->lobby_name << item->lobby_topic << std::endl;
|
||||
#endif
|
||||
RsChatLobbyInviteItem* newItem = new RsChatLobbyInviteItem();
|
||||
|
||||
newItem->lobby_id = item->lobby_id ;
|
||||
newItem->lobby_name = item->lobby_name ;
|
||||
newItem->lobby_topic = item->lobby_topic ;
|
||||
newItem->lobby_flags = item->lobby_flags ;
|
||||
newItem->PeerId( item->PeerId() );
|
||||
|
||||
handleRecvLobbyInvite(newItem);
|
||||
}
|
||||
|
||||
void DistributedChatService::handleRecvLobbyInvite(RsChatLobbyInviteItem *item)
|
||||
{
|
||||
#ifdef DEBUG_CHAT_LOBBIES
|
||||
@ -1262,7 +1327,7 @@ void DistributedChatService::handleRecvLobbyInvite(RsChatLobbyInviteItem *item)
|
||||
std::cerr << " privacy levels: " << item->lobby_flags << " vs. " << it->second.lobby_flags ;
|
||||
#endif
|
||||
|
||||
if((!IS_CONNEXION_CHALLENGE(item->lobby_flags)) && EXTRACT_PRIVACY_FLAGS(item->lobby_flags) != EXTRACT_PRIVACY_FLAGS(it->second.lobby_flags))
|
||||
if ((!IS_CONNEXION_CHALLENGE(item->lobby_flags)) && EXTRACT_PRIVACY_FLAGS(item->lobby_flags) != EXTRACT_PRIVACY_FLAGS(it->second.lobby_flags))
|
||||
{
|
||||
std::cerr << " : Don't match. Cancelling." << std::endl;
|
||||
return ;
|
||||
@ -1274,10 +1339,22 @@ void DistributedChatService::handleRecvLobbyInvite(RsChatLobbyInviteItem *item)
|
||||
std::cerr << " Adding new friend " << item->PeerId() << " to lobby." << std::endl;
|
||||
#endif
|
||||
|
||||
// to be removed (deprecated since May 2017)
|
||||
{ //Update Topics if have received deprecated before (withou topic)
|
||||
if(it->second.lobby_topic.empty() && !item->lobby_topic.empty())
|
||||
it->second.lobby_topic = item->lobby_topic;
|
||||
}
|
||||
|
||||
it->second.participating_friends.insert(item->PeerId()) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
// to be removed (deprecated since May 2017)
|
||||
{//check if invitation is already received by deprecated version
|
||||
std::map<ChatLobbyId,ChatLobbyInvite>::const_iterator it(_lobby_invites_queue.find( item->lobby_id)) ;
|
||||
if(it != _lobby_invites_queue.end())
|
||||
return ;
|
||||
}
|
||||
// Don't record the invitation if it's a challenge response item or a lobby we don't have.
|
||||
//
|
||||
if(IS_CONNEXION_CHALLENGE(item->lobby_flags))
|
||||
@ -1722,10 +1799,15 @@ bool DistributedChatService::setIdentityForChatLobby(const ChatLobbyId& lobby_id
|
||||
|
||||
void DistributedChatService::setLobbyAutoSubscribe(const ChatLobbyId& lobby_id, const bool autoSubscribe)
|
||||
{
|
||||
if(autoSubscribe)
|
||||
_known_lobbies_flags[lobby_id] |= RS_CHAT_LOBBY_FLAGS_AUTO_SUBSCRIBE ;
|
||||
else
|
||||
if(autoSubscribe){
|
||||
_known_lobbies_flags[lobby_id] |= RS_CHAT_LOBBY_FLAGS_AUTO_SUBSCRIBE;
|
||||
RsGxsId gxsId;
|
||||
if (getIdentityForChatLobby(lobby_id, gxsId))
|
||||
_lobby_default_identity[lobby_id] = gxsId;
|
||||
} else {
|
||||
_known_lobbies_flags[lobby_id] &= ~RS_CHAT_LOBBY_FLAGS_AUTO_SUBSCRIBE ;
|
||||
_lobby_default_identity.erase(lobby_id);
|
||||
}
|
||||
|
||||
RsServer::notify()->notifyListChange(NOTIFY_LIST_CHAT_LOBBY_LIST, NOTIFY_TYPE_ADD) ;
|
||||
triggerConfigSave();
|
||||
@ -1848,7 +1930,7 @@ void DistributedChatService::cleanLobbyCaches()
|
||||
void DistributedChatService::addToSaveList(std::list<RsItem*>& list) const
|
||||
{
|
||||
/* Save Lobby Auto Subscribe */
|
||||
for(std::map<ChatLobbyId,ChatLobbyFlags>::const_iterator it=_known_lobbies_flags.begin();it!=_known_lobbies_flags.end();++it)
|
||||
for(std::map<ChatLobbyId,ChatLobbyFlags>::const_iterator it=_known_lobbies_flags.begin(); it!=_known_lobbies_flags.end(); ++it)
|
||||
{
|
||||
RsChatLobbyConfigItem *clci = new RsChatLobbyConfigItem ;
|
||||
clci->lobby_Id=it->first;
|
||||
@ -1856,24 +1938,47 @@ void DistributedChatService::addToSaveList(std::list<RsItem*>& list) const
|
||||
|
||||
list.push_back(clci) ;
|
||||
}
|
||||
/* Save Default Nick Name */
|
||||
|
||||
/* Save Default Nick Name */
|
||||
{
|
||||
RsConfigKeyValueSet *vitem = new RsConfigKeyValueSet ;
|
||||
RsTlvKeyValue kv;
|
||||
kv.key = "DEFAULT_IDENTITY" ;
|
||||
kv.value = _default_identity.toStdString() ;
|
||||
vitem->tlvkvs.pairs.push_back(kv) ;
|
||||
kv.key = "DEFAULT_IDENTITY";
|
||||
kv.value = _default_identity.toStdString();
|
||||
vitem->tlvkvs.pairs.push_back(kv);
|
||||
list.push_back(vitem);
|
||||
}
|
||||
|
||||
/* Save Default Nick Name by Lobby*/
|
||||
for(std::map<ChatLobbyId,RsGxsId>::const_iterator it=_lobby_default_identity.begin(); it!=_lobby_default_identity.end(); ++it)
|
||||
{
|
||||
RsConfigKeyValueSet *vitem = new RsConfigKeyValueSet ;
|
||||
ChatLobbyId cli = it->first;
|
||||
RsGxsId gxsId = it->second;
|
||||
|
||||
std::stringstream stream;
|
||||
stream << std::setfill ('0') << std::setw(sizeof(ChatLobbyId)*2)
|
||||
<< std::hex << cli;
|
||||
std::string strCli( stream.str() );
|
||||
|
||||
RsTlvKeyValue kv;
|
||||
kv.key = "LOBBY_DEFAULT_IDENTITY:"+strCli;
|
||||
kv.value = gxsId.toStdString();
|
||||
vitem->tlvkvs.pairs.push_back(kv);
|
||||
list.push_back(vitem);
|
||||
}
|
||||
|
||||
list.push_back(vitem) ;
|
||||
}
|
||||
|
||||
bool DistributedChatService::processLoadListItem(const RsItem *item)
|
||||
{
|
||||
const RsConfigKeyValueSet *vitem = NULL ;
|
||||
const RsConfigKeyValueSet *vitem = NULL;
|
||||
const std::string strldID = "LOBBY_DEFAULT_IDENTITY:";
|
||||
|
||||
if(NULL != (vitem = dynamic_cast<const RsConfigKeyValueSet*>(item)))
|
||||
for(std::list<RsTlvKeyValue>::const_iterator kit = vitem->tlvkvs.pairs.begin(); kit != vitem->tlvkvs.pairs.end(); ++kit)
|
||||
if(kit->key == "DEFAULT_IDENTITY")
|
||||
{
|
||||
if( kit->key == "DEFAULT_IDENTITY" )
|
||||
{
|
||||
#ifdef DEBUG_CHAT_LOBBIES
|
||||
std::cerr << "Loaded config default nick name for distributed chat: " << kit->value << std::endl ;
|
||||
@ -1888,6 +1993,31 @@ bool DistributedChatService::processLoadListItem(const RsItem *item)
|
||||
return true;
|
||||
}
|
||||
|
||||
if( kit->key.compare(0, strldID.length(), strldID) == 0)
|
||||
{
|
||||
#ifdef DEBUG_CHAT_LOBBIES
|
||||
std::cerr << "Loaded config lobby default nick name: " << kit->key << " " << kit->value << std::endl ;
|
||||
#endif
|
||||
|
||||
std::string strCli = kit->key.substr(strldID.length());
|
||||
std::stringstream stream;
|
||||
stream << std::hex << strCli;
|
||||
ChatLobbyId cli = 0;
|
||||
stream >> cli;
|
||||
|
||||
if (!kit->value.empty() && (cli != 0))
|
||||
{
|
||||
RsGxsId gxsId(kit->value);
|
||||
if (gxsId.isNull())
|
||||
std::cerr << "ERROR: lobby default identity is malformed." << std::endl;
|
||||
else
|
||||
_lobby_default_identity[cli] = gxsId ;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const RsChatLobbyConfigItem *clci = NULL ;
|
||||
|
||||
if(NULL != (clci = dynamic_cast<const RsChatLobbyConfigItem*>(item)))
|
||||
|
@ -39,6 +39,7 @@ class RsChatLobbyListRequestItem ;
|
||||
class RsChatLobbyListItem ;
|
||||
class RsChatLobbyEventItem ;
|
||||
class RsChatLobbyBouncingObject ;
|
||||
class RsChatLobbyInviteItem_Deprecated ; // to be removed (deprecated since May 2017)
|
||||
class RsChatLobbyInviteItem ;
|
||||
class RsChatLobbyMsgItem ;
|
||||
class RsChatLobbyConnectChallengeItem ;
|
||||
@ -111,6 +112,7 @@ class DistributedChatService
|
||||
|
||||
/// receive and handle chat lobby item
|
||||
bool recvLobbyChat(RsChatLobbyMsgItem*,const RsPeerId& src_peer_id) ;
|
||||
void handleRecvLobbyInvite_Deprecated(RsChatLobbyInviteItem_Deprecated*) ; // to be removed (deprecated since May 2017)
|
||||
void handleRecvLobbyInvite(RsChatLobbyInviteItem*) ;
|
||||
void checkAndRedirectMsgToLobby(RsChatMsgItem*) ;
|
||||
void handleConnectionChallenge(RsChatLobbyConnectChallengeItem *item) ;
|
||||
@ -156,7 +158,8 @@ class DistributedChatService
|
||||
time_t last_lobby_challenge_time ; // prevents bruteforce attack
|
||||
time_t last_visible_lobby_info_request_time ; // allows to ask for updates
|
||||
bool _should_reset_lobby_counts ;
|
||||
RsGxsId _default_identity ;
|
||||
RsGxsId _default_identity;
|
||||
std::map<ChatLobbyId,RsGxsId> _lobby_default_identity;
|
||||
|
||||
uint32_t mServType ;
|
||||
RsMutex mDistributedChatMtx ;
|
||||
|
@ -40,9 +40,10 @@
|
||||
#include "pqi/p3historymgr.h"
|
||||
#include "rsserver/p3face.h"
|
||||
#include "services/p3idservice.h"
|
||||
#include "gxstrans/p3gxstrans.h"
|
||||
|
||||
#include "chat/p3chatservice.h"
|
||||
#include "serialiser/rsconfigitems.h"
|
||||
#include "rsitems/rsconfigitems.h"
|
||||
|
||||
/****
|
||||
* #define CHAT_DEBUG 1
|
||||
@ -53,40 +54,29 @@ static const uint32_t MAX_AVATAR_JPEG_SIZE = 32767; // Maximum size
|
||||
// don't transfer correctly and can kill the system.
|
||||
// Images are 96x96, which makes approx. 27000 bytes uncompressed.
|
||||
|
||||
p3ChatService::p3ChatService(p3ServiceControl *sc,p3IdService *pids, p3LinkMgr *lm, p3HistoryMgr *historyMgr)
|
||||
: DistributedChatService(getServiceInfo().mServiceType,sc,historyMgr,pids), mChatMtx("p3ChatService"),mServiceCtrl(sc), mLinkMgr(lm) , mHistoryMgr(historyMgr)
|
||||
p3ChatService::p3ChatService( p3ServiceControl *sc, p3IdService *pids,
|
||||
p3LinkMgr *lm, p3HistoryMgr *historyMgr,
|
||||
p3GxsTrans& gxsTransService ) :
|
||||
DistributedChatService(getServiceInfo().mServiceType, sc, historyMgr,pids),
|
||||
mChatMtx("p3ChatService"), mServiceCtrl(sc), mLinkMgr(lm),
|
||||
mHistoryMgr(historyMgr), _own_avatar(NULL),
|
||||
_serializer(new RsChatSerialiser()),
|
||||
mDGMutex("p3ChatService distant id - gxs id map mutex"),
|
||||
mGxsTransport(gxsTransService)
|
||||
{
|
||||
_serializer = new RsChatSerialiser() ;
|
||||
|
||||
_own_avatar = NULL ;
|
||||
_custom_status_string = "" ;
|
||||
|
||||
addSerialType(_serializer) ;
|
||||
addSerialType(_serializer);
|
||||
mGxsTransport.registerGxsTransClient( GxsTransSubServices::P3_CHAT_SERVICE,
|
||||
this );
|
||||
}
|
||||
|
||||
const std::string CHAT_APP_NAME = "chat";
|
||||
const uint16_t CHAT_APP_MAJOR_VERSION = 1;
|
||||
const uint16_t CHAT_APP_MINOR_VERSION = 0;
|
||||
const uint16_t CHAT_MIN_MAJOR_VERSION = 1;
|
||||
const uint16_t CHAT_MIN_MINOR_VERSION = 0;
|
||||
|
||||
RsServiceInfo p3ChatService::getServiceInfo()
|
||||
{
|
||||
return RsServiceInfo(RS_SERVICE_TYPE_CHAT,
|
||||
CHAT_APP_NAME,
|
||||
CHAT_APP_MAJOR_VERSION,
|
||||
CHAT_APP_MINOR_VERSION,
|
||||
CHAT_MIN_MAJOR_VERSION,
|
||||
CHAT_MIN_MINOR_VERSION);
|
||||
}
|
||||
{ return RsServiceInfo(RS_SERVICE_TYPE_CHAT, "chat", 1, 0, 1, 0); }
|
||||
|
||||
int p3ChatService::tick()
|
||||
{
|
||||
if(receivedItems())
|
||||
receiveChatQueue();
|
||||
if(receivedItems()) receiveChatQueue();
|
||||
|
||||
DistributedChatService::flush() ;
|
||||
//DistantChatService::flush() ;
|
||||
DistributedChatService::flush();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -156,7 +146,7 @@ class p3ChatService::AvatarInfo
|
||||
|
||||
~AvatarInfo()
|
||||
{
|
||||
delete[] _image_data ;
|
||||
free( _image_data );
|
||||
_image_data = NULL ;
|
||||
_image_size = 0 ;
|
||||
}
|
||||
@ -169,7 +159,7 @@ class p3ChatService::AvatarInfo
|
||||
void init(const unsigned char *jpeg_data,int size)
|
||||
{
|
||||
_image_size = size ;
|
||||
_image_data = new unsigned char[size] ;
|
||||
_image_data = (unsigned char*)rs_malloc(size) ;
|
||||
memcpy(_image_data,jpeg_data,size) ;
|
||||
}
|
||||
AvatarInfo(const unsigned char *jpeg_data,int size)
|
||||
@ -179,7 +169,13 @@ class p3ChatService::AvatarInfo
|
||||
|
||||
void toUnsignedChar(unsigned char *& data,uint32_t& size) const
|
||||
{
|
||||
data = new unsigned char[_image_size] ;
|
||||
if(_image_size == 0)
|
||||
{
|
||||
size = 0 ;
|
||||
data = NULL ;
|
||||
return ;
|
||||
}
|
||||
data = (unsigned char *)rs_malloc(_image_size) ;
|
||||
size = _image_size ;
|
||||
memcpy(data,_image_data,size*sizeof(unsigned char)) ;
|
||||
}
|
||||
@ -213,35 +209,36 @@ void p3ChatService::sendGroupChatStatusString(const std::string& status_string)
|
||||
}
|
||||
}
|
||||
|
||||
void p3ChatService::sendStatusString(const ChatId& id , const std::string& status_string)
|
||||
void p3ChatService::sendStatusString( const ChatId& id,
|
||||
const std::string& status_string )
|
||||
{
|
||||
if(id.isLobbyId())
|
||||
sendLobbyStatusString(id.toLobbyId(),status_string) ;
|
||||
else if(id.isBroadcast())
|
||||
sendGroupChatStatusString(status_string);
|
||||
if(id.isLobbyId()) sendLobbyStatusString(id.toLobbyId(),status_string);
|
||||
else if(id.isBroadcast()) sendGroupChatStatusString(status_string);
|
||||
else if(id.isPeerId() || id.isDistantChatId())
|
||||
{
|
||||
RsChatStatusItem *cs = new RsChatStatusItem ;
|
||||
|
||||
cs->status_string = status_string ;
|
||||
cs->flags = RS_CHAT_FLAG_PRIVATE ;
|
||||
RsPeerId vpid;
|
||||
if(id.isDistantChatId())
|
||||
vpid = RsPeerId(id.toDistantChatId());
|
||||
else
|
||||
vpid = id.toPeerId();
|
||||
if(id.isDistantChatId()) vpid = RsPeerId(id.toDistantChatId());
|
||||
else vpid = id.toPeerId();
|
||||
|
||||
if(isOnline(vpid))
|
||||
{
|
||||
RsChatStatusItem *cs = new RsChatStatusItem;
|
||||
|
||||
cs->status_string = status_string;
|
||||
cs->flags = RS_CHAT_FLAG_PRIVATE;
|
||||
cs->PeerId(vpid);
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "sending chat status packet:" << std::endl ;
|
||||
cs->print(std::cerr) ;
|
||||
std::cerr << "sending chat status packet:" << std::endl;
|
||||
cs->print(std::cerr);
|
||||
#endif
|
||||
sendChatItem(cs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "p3ChatService::sendStatusString() Error: chat id of this type is not handled, is it empty?" << std::endl;
|
||||
std::cerr << "p3ChatService::sendStatusString() Error: chat id of this "
|
||||
<< "type is not handled, is it empty?" << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -253,12 +250,12 @@ void p3ChatService::clearChatLobby(const ChatId& id)
|
||||
|
||||
void p3ChatService::sendChatItem(RsChatItem *item)
|
||||
{
|
||||
if(DistantChatService::handleOutgoingItem(item))
|
||||
return ;
|
||||
if(DistantChatService::handleOutgoingItem(item)) return;
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3ChatService::sendChatItem(): sending to " << item->PeerId() << ": interpreted as friend peer id." << std::endl;
|
||||
std::cerr << "p3ChatService::sendChatItem(): sending to " << item->PeerId()
|
||||
<< ": interpreted as friend peer id." << std::endl;
|
||||
#endif
|
||||
sendItem(item) ;
|
||||
sendItem(item);
|
||||
}
|
||||
|
||||
void p3ChatService::checkSizeAndSendMessage(RsChatMsgItem *msg)
|
||||
@ -267,6 +264,10 @@ void p3ChatService::checkSizeAndSendMessage(RsChatMsgItem *msg)
|
||||
|
||||
static const uint32_t MAX_STRING_SIZE = 15000 ;
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "Sending message: size=" << msg->message.size() << ", sha1sum=" << RsDirUtil::sha1sum((uint8_t*)msg->message.c_str(),msg->message.size()) << std::endl;
|
||||
#endif
|
||||
|
||||
while(msg->message.size() > MAX_STRING_SIZE)
|
||||
{
|
||||
// chop off the first 15000 wchars
|
||||
@ -281,11 +282,17 @@ void p3ChatService::checkSizeAndSendMessage(RsChatMsgItem *msg)
|
||||
//
|
||||
item->chatFlags &= (RS_CHAT_FLAG_PRIVATE | RS_CHAT_FLAG_PUBLIC | RS_CHAT_FLAG_LOBBY) ;
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "Creating slice of size " << item->message.size() << std::endl;
|
||||
#endif
|
||||
// Indicate that the message is to be continued.
|
||||
//
|
||||
item->chatFlags |= RS_CHAT_FLAG_PARTIAL_MESSAGE ;
|
||||
sendChatItem(item) ;
|
||||
}
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "Creating slice of size " << msg->message.size() << std::endl;
|
||||
#endif
|
||||
sendChatItem(msg) ;
|
||||
}
|
||||
|
||||
@ -338,12 +345,6 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg)
|
||||
|
||||
if(!isOnline(vpid))
|
||||
{
|
||||
/* peer is offline, add to outgoing list */
|
||||
{
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
privateOutgoingList.push_back(ci);
|
||||
}
|
||||
|
||||
message.online = false;
|
||||
RsServer::notify()->notifyChatMessage(message);
|
||||
|
||||
@ -351,13 +352,41 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg)
|
||||
// this is not very nice, because the user may think the message was send, while it is still in the queue
|
||||
mHistoryMgr->addMessage(message);
|
||||
|
||||
RsGxsTransId tId = RSRandom::random_u64();
|
||||
|
||||
if(destination.isDistantChatId())
|
||||
{
|
||||
RS_STACK_MUTEX(mDGMutex);
|
||||
DIDEMap::const_iterator it =
|
||||
mDistantGxsMap.find(destination.toDistantChatId());
|
||||
if(it != mDistantGxsMap.end())
|
||||
{
|
||||
const DistantEndpoints& de(it->second);
|
||||
uint32_t sz = _serializer->size(ci);
|
||||
std::vector<uint8_t> data; data.resize(sz);
|
||||
_serializer->serialise(ci, &data[0], &sz);
|
||||
mGxsTransport.sendData(tId, GxsTransSubServices::P3_CHAT_SERVICE,
|
||||
de.from, de.to, &data[0], sz);
|
||||
}
|
||||
else
|
||||
std::cout << "p3ChatService::sendChat(...) can't find distant"
|
||||
<< "chat id in mDistantGxsMap this is unxpected!"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
// peer is offline, add to outgoing list
|
||||
{
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
privateOutgoingMap.insert(outMP::value_type(tId, ci));
|
||||
}
|
||||
|
||||
IndicateConfigChanged();
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
std::map<RsPeerId,AvatarInfo*>::iterator it = _avatars.find(vpid) ;
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
std::map<RsPeerId,AvatarInfo*>::iterator it = _avatars.find(vpid);
|
||||
|
||||
if(it == _avatars.end())
|
||||
{
|
||||
@ -367,7 +396,7 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg)
|
||||
if(it->second->_own_is_new)
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3ChatService::sendChat: new avatar never sent to peer " << id << ". Setting <new> flag to packet." << std::endl;
|
||||
std::cerr << "p3ChatService::sendChat: new avatar never sent to peer " << vpid << ". Setting <new> flag to packet." << std::endl;
|
||||
#endif
|
||||
|
||||
ci->chatFlags |= RS_CHAT_FLAG_AVATAR_AVAILABLE ;
|
||||
@ -376,7 +405,7 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg)
|
||||
}
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "Sending msg to (maybe virtual) peer " << id << ", flags = " << ci->chatFlags << std::endl ;
|
||||
std::cerr << "Sending msg to (maybe virtual) peer " << vpid << ", flags = " << ci->chatFlags << std::endl ;
|
||||
std::cerr << "p3ChatService::sendChat() Item:";
|
||||
std::cerr << std::endl;
|
||||
ci->print(std::cerr);
|
||||
@ -416,7 +445,7 @@ bool p3ChatService::sendChat(ChatId destination, std::string msg)
|
||||
if(should_send_state_string)
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "own status string is new for peer " << id << ": sending it." << std::endl ;
|
||||
std::cerr << "own status string is new for peer " << vpid << ": sending it." << std::endl ;
|
||||
#endif
|
||||
RsChatStatusItem *cs = makeOwnCustomStateStringItem() ;
|
||||
cs->PeerId(vpid) ;
|
||||
@ -474,7 +503,7 @@ bool p3ChatService::locked_checkAndRebuildPartialMessage(RsChatMsgItem *& ci)
|
||||
else
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "Message is complete, using it now." << std::endl;
|
||||
std::cerr << "Message is complete, using it now. Size = " << ci->message.size() << ", hash=" << RsDirUtil::sha1sum((uint8_t*)ci->message.c_str(),ci->message.size()) << std::endl;
|
||||
#endif
|
||||
return true ;
|
||||
}
|
||||
@ -505,50 +534,50 @@ class MsgCounter
|
||||
void p3ChatService::handleIncomingItem(RsItem *item)
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3ChatService::receiveChatQueue() Item:" << (void*)item << std::endl ;
|
||||
std::cerr << "p3ChatService::receiveChatQueue() Item:" << (void*)item
|
||||
<< std::endl ;
|
||||
#endif
|
||||
|
||||
// RsChatMsgItems needs dynamic_cast, since they have derived siblings.
|
||||
//
|
||||
RsChatMsgItem *ci = dynamic_cast<RsChatMsgItem*>(item) ;
|
||||
if(ci != NULL)
|
||||
RsChatMsgItem* ci = dynamic_cast<RsChatMsgItem*>(item);
|
||||
if(ci)
|
||||
{
|
||||
handleRecvChatMsgItem(ci);
|
||||
|
||||
if(ci)
|
||||
/* +ci+ deletion is handled by handleRecvChatMsgItem ONLY in some
|
||||
* specific cases, in case +ci+ has not been handled deleted it here */
|
||||
delete ci ;
|
||||
|
||||
return ; // don't delete! It's handled by handleRecvChatMsgItem in some specific cases only.
|
||||
return;
|
||||
}
|
||||
|
||||
// if(DistantChatService::handleRecvItem(dynamic_cast<RsChatItem*>(item)))
|
||||
// {
|
||||
// delete item ;
|
||||
// return ;
|
||||
// }
|
||||
|
||||
if(DistributedChatService::handleRecvItem(dynamic_cast<RsChatItem*>(item)))
|
||||
{
|
||||
delete item ;
|
||||
return ;
|
||||
delete item;
|
||||
return;
|
||||
}
|
||||
|
||||
switch(item->PacketSubType())
|
||||
{
|
||||
case RS_PKT_SUBTYPE_CHAT_STATUS: handleRecvChatStatusItem(dynamic_cast<RsChatStatusItem*>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_AVATAR: handleRecvChatAvatarItem(dynamic_cast<RsChatAvatarItem*>(item)) ; break ;
|
||||
case RS_PKT_SUBTYPE_CHAT_STATUS:
|
||||
handleRecvChatStatusItem(dynamic_cast<RsChatStatusItem*>(item));
|
||||
break;
|
||||
case RS_PKT_SUBTYPE_CHAT_AVATAR:
|
||||
handleRecvChatAvatarItem(dynamic_cast<RsChatAvatarItem*>(item));
|
||||
break;
|
||||
default:
|
||||
{
|
||||
static int already = false ;
|
||||
|
||||
static int already = false;
|
||||
if(!already)
|
||||
{
|
||||
std::cerr << "Unhandled item subtype " << (int)item->PacketSubType() << " in p3ChatService: " << std::endl;
|
||||
already = true ;
|
||||
std::cerr << "Unhandled item subtype "
|
||||
<< static_cast<int>(item->PacketSubType())
|
||||
<< " in p3ChatService: " << std::endl;
|
||||
already = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
delete item ;
|
||||
delete item;
|
||||
}
|
||||
|
||||
void p3ChatService::handleRecvChatAvatarItem(RsChatAvatarItem *ca)
|
||||
@ -676,35 +705,103 @@ bool p3ChatService::checkForMessageSecurity(RsChatMsgItem *ci)
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool p3ChatService::initiateDistantChatConnexion( const RsGxsId& to_gxs_id,
|
||||
const RsGxsId& from_gxs_id,
|
||||
DistantChatPeerId& pid,
|
||||
uint32_t& error_code,
|
||||
bool notify )
|
||||
{
|
||||
if(DistantChatService::initiateDistantChatConnexion( to_gxs_id,
|
||||
from_gxs_id, pid,
|
||||
error_code, notify ))
|
||||
{
|
||||
RS_STACK_MUTEX(mDGMutex);
|
||||
DistantEndpoints ep; ep.from = from_gxs_id; ep.to = to_gxs_id;
|
||||
mDistantGxsMap.insert(DIDEMap::value_type(pid, ep));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool p3ChatService::receiveGxsTransMail( const RsGxsId& authorId,
|
||||
const RsGxsId& recipientId,
|
||||
const uint8_t* data,
|
||||
uint32_t dataSize )
|
||||
{
|
||||
DistantChatPeerId pid;
|
||||
uint32_t error_code;
|
||||
if(initiateDistantChatConnexion(
|
||||
authorId, recipientId, pid, error_code, false ))
|
||||
{
|
||||
RsChatMsgItem* item = static_cast<RsChatMsgItem*>(
|
||||
_serializer->deserialise(
|
||||
const_cast<uint8_t*>(data), &dataSize ));
|
||||
RsPeerId rd(p3GxsTunnelService::makeGxsTunnelId(authorId, recipientId));
|
||||
item->PeerId(rd);
|
||||
handleRecvChatMsgItem(item);
|
||||
delete item;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::cerr << __PRETTY_FUNCTION__ << " (EE) failed initiating"
|
||||
<< " distant chat connection error: "<< error_code
|
||||
<< std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool p3ChatService::notifyGxsTransSendStatus(RsGxsTransId mailId,
|
||||
GxsTransSendStatus status )
|
||||
{
|
||||
if ( status != GxsTransSendStatus::RECEIPT_RECEIVED ) return true;
|
||||
|
||||
bool changed = false;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
auto it = privateOutgoingMap.find(mailId);
|
||||
if( it != privateOutgoingMap.end() )
|
||||
{
|
||||
privateOutgoingMap.erase(it);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(changed)
|
||||
{
|
||||
RsServer::notify()->notifyListChange(
|
||||
NOTIFY_LIST_PRIVATE_OUTGOING_CHAT, NOTIFY_TYPE_DEL );
|
||||
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *& ci)
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
std::string name;
|
||||
uint32_t popupChatFlag = RS_POPUP_CHAT;
|
||||
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
|
||||
if(!locked_checkAndRebuildPartialMessage(ci)) // we make sure this call does not take control over the memory
|
||||
return true ; // message is a subpart of an existing message. So everything ok, but we need to return.
|
||||
// we make sure this call does not take control over the memory
|
||||
if(!locked_checkAndRebuildPartialMessage(ci)) return true;
|
||||
/* message is a subpart of an existing message.
|
||||
* So everything ok, but we need to return. */
|
||||
}
|
||||
|
||||
// Check for security. This avoids bombing messages, and so on.
|
||||
if(!checkForMessageSecurity(ci)) return false;
|
||||
|
||||
if(!checkForMessageSecurity(ci))
|
||||
return false ;
|
||||
|
||||
// If it's a lobby item, we need to bounce it and possibly check for timings etc.
|
||||
|
||||
if(!DistributedChatService::handleRecvChatLobbyMsgItem(ci))
|
||||
return false ;
|
||||
/* If it's a lobby item, we need to bounce it and possibly check for timings
|
||||
* etc. */
|
||||
if(!DistributedChatService::handleRecvChatLobbyMsgItem(ci)) return false;
|
||||
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3ChatService::receiveChatQueue() Item:";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3ChatService::receiveChatQueue() Item:" << std::endl;
|
||||
ci->print(std::cerr);
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "Got msg. Flags = " << ci->chatFlags << std::endl ;
|
||||
std::cerr << std::endl << "Got msg. Flags = " << ci->chatFlags << std::endl;
|
||||
#endif
|
||||
|
||||
// Now treat normal chat stuff such as avatar requests, except for chat lobbies.
|
||||
@ -759,7 +856,7 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *& ci)
|
||||
}
|
||||
}
|
||||
|
||||
ci->recvTime = now;
|
||||
ci->recvTime = time(NULL);
|
||||
|
||||
ChatMessage cm;
|
||||
initChatMessage(ci, cm);
|
||||
@ -1087,6 +1184,7 @@ RsChatStatusItem *p3ChatService::makeOwnCustomStateStringItem()
|
||||
|
||||
return ci ;
|
||||
}
|
||||
|
||||
RsChatAvatarItem *p3ChatService::makeOwnAvatarItem()
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
@ -1100,9 +1198,9 @@ RsChatAvatarItem *p3ChatService::makeOwnAvatarItem()
|
||||
|
||||
void p3ChatService::sendAvatarJpegData(const RsPeerId& peer_id)
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3chatservice: sending requested for peer " << peer_id << ", data=" << (void*)_own_avatar << std::endl ;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(_own_avatar != NULL)
|
||||
{
|
||||
@ -1144,19 +1242,34 @@ bool p3ChatService::loadList(std::list<RsItem*>& load)
|
||||
|
||||
for(std::list<RsItem*>::const_iterator it(load.begin());it!=load.end();++it)
|
||||
{
|
||||
if(PrivateOugoingMapItem* om=dynamic_cast<PrivateOugoingMapItem*>(*it))
|
||||
{
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
for( auto& pair : om->store )
|
||||
{
|
||||
privateOutgoingMap.insert(
|
||||
outMP::value_type(pair.first,
|
||||
new RsChatMsgItem(pair.second)) );
|
||||
}
|
||||
|
||||
delete om; continue;
|
||||
}
|
||||
|
||||
|
||||
RsChatAvatarItem *ai = NULL ;
|
||||
|
||||
if(NULL != (ai = dynamic_cast<RsChatAvatarItem *>(*it)))
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
|
||||
if(ai->image_size <= MAX_AVATAR_JPEG_SIZE)
|
||||
_own_avatar = new AvatarInfo(ai->image_data,ai->image_size) ;
|
||||
else
|
||||
std::cerr << "Dropping avatar image, because its size is " << ai->image_size << ", and the maximum allowed size is " << MAX_AVATAR_JPEG_SIZE << std::endl;
|
||||
std::cerr << "Dropping avatar image, because its size is "
|
||||
<< ai->image_size << ", and the maximum allowed size "
|
||||
<< "is " << MAX_AVATAR_JPEG_SIZE << std::endl;
|
||||
|
||||
delete *it;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1164,40 +1277,42 @@ bool p3ChatService::loadList(std::list<RsItem*>& load)
|
||||
|
||||
if(NULL != (mitem = dynamic_cast<RsChatStatusItem *>(*it)))
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
|
||||
_custom_status_string = mitem->status_string ;
|
||||
|
||||
delete *it;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
RsPrivateChatMsgConfigItem *citem = NULL ;
|
||||
|
||||
if(NULL != (citem = dynamic_cast<RsPrivateChatMsgConfigItem *>(*it)))
|
||||
/* TODO: G10h4ck 2017/02/27 this block is kept for retrocompatibility,
|
||||
* and will be used just first time, to load messages in the old format
|
||||
* should be removed in the following RS version */
|
||||
if( RsPrivateChatMsgConfigItem *citem =
|
||||
dynamic_cast<RsPrivateChatMsgConfigItem *>(*it) )
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
|
||||
if (citem->chatFlags & RS_CHAT_FLAG_PRIVATE) {
|
||||
if (std::find(ssl_peers.begin(), ssl_peers.end(), citem->configPeerId) != ssl_peers.end()) {
|
||||
if ( citem->chatFlags & RS_CHAT_FLAG_PRIVATE )
|
||||
{
|
||||
if ( std::find(ssl_peers.begin(), ssl_peers.end(),
|
||||
citem->configPeerId) != ssl_peers.end() )
|
||||
{
|
||||
RsChatMsgItem *ci = new RsChatMsgItem();
|
||||
citem->get(ci);
|
||||
|
||||
if (citem->configFlags & RS_CHATMSG_CONFIGFLAG_INCOMING) {
|
||||
if (citem->configFlags & RS_CHATMSG_CONFIGFLAG_INCOMING)
|
||||
{
|
||||
locked_storeIncomingMsg(ci);
|
||||
} else {
|
||||
privateOutgoingList.push_back(ci);
|
||||
}
|
||||
} else {
|
||||
// no friends
|
||||
else privateOutgoingMap.insert(
|
||||
outMP::value_type(RSRandom::random_u64(), ci) );
|
||||
}
|
||||
} else {
|
||||
// ignore all other items
|
||||
else { /* no friends */ }
|
||||
}
|
||||
else { /* ignore all other items */ }
|
||||
|
||||
delete *it;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1228,21 +1343,18 @@ bool p3ChatService::saveList(bool& cleanup, std::list<RsItem*>& list)
|
||||
|
||||
mChatMtx.lock(); /****** MUTEX LOCKED *******/
|
||||
|
||||
PrivateOugoingMapItem* om = new PrivateOugoingMapItem;
|
||||
typedef std::map<uint64_t, RsChatMsgItem>::value_type vT;
|
||||
for( auto& pair : privateOutgoingMap )
|
||||
om->store.insert(vT(pair.first, *pair.second));
|
||||
list.push_back(om);
|
||||
|
||||
|
||||
RsChatStatusItem *di = new RsChatStatusItem ;
|
||||
di->status_string = _custom_status_string ;
|
||||
di->flags = RS_CHAT_FLAG_CUSTOM_STATE ;
|
||||
|
||||
list.push_back(di) ;
|
||||
|
||||
/* save outgoing private chat messages */
|
||||
std::list<RsChatMsgItem *>::iterator it;
|
||||
for (it = privateOutgoingList.begin(); it != privateOutgoingList.end(); it++) {
|
||||
RsPrivateChatMsgConfigItem *ci = new RsPrivateChatMsgConfigItem;
|
||||
|
||||
ci->set(*it, (*it)->PeerId(), 0);
|
||||
|
||||
list.push_back(ci);
|
||||
}
|
||||
list.push_back(di);
|
||||
|
||||
DistributedChatService::addToSaveList(list) ;
|
||||
DistantChatService::addToSaveList(list) ;
|
||||
@ -1269,54 +1381,51 @@ RsSerialiser *p3ChatService::setupSerialiser()
|
||||
|
||||
void p3ChatService::statusChange(const std::list<pqiServicePeer> &plist)
|
||||
{
|
||||
std::list<pqiServicePeer>::const_iterator it;
|
||||
for (it = plist.begin(); it != plist.end(); ++it) {
|
||||
for (auto it = plist.cbegin(); it != plist.cend(); ++it)
|
||||
{
|
||||
if (it->actions & RS_SERVICE_PEER_CONNECTED)
|
||||
{
|
||||
/* send the saved outgoing messages */
|
||||
bool changed = false;
|
||||
|
||||
std::vector<RsChatMsgItem*> to_send ;
|
||||
std::vector<RsChatMsgItem*> to_send;
|
||||
|
||||
if (privateOutgoingList.size())
|
||||
{
|
||||
RsStackMutex stack(mChatMtx); /********** STACK LOCKED MTX ******/
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
|
||||
RsPeerId ownId = mServiceCtrl->getOwnId();
|
||||
|
||||
std::list<RsChatMsgItem *>::iterator cit = privateOutgoingList.begin();
|
||||
while (cit != privateOutgoingList.end()) {
|
||||
RsChatMsgItem *c = *cit;
|
||||
|
||||
if (c->PeerId() == it->id) {
|
||||
for( auto cit = privateOutgoingMap.begin();
|
||||
cit != privateOutgoingMap.end(); )
|
||||
{
|
||||
RsChatMsgItem *c = cit->second;
|
||||
if (c->PeerId() == it->id)
|
||||
{
|
||||
//mHistoryMgr->addMessage(false, c->PeerId(), ownId, c);
|
||||
|
||||
to_send.push_back(c) ;
|
||||
|
||||
changed = true;
|
||||
|
||||
cit = privateOutgoingList.erase(cit);
|
||||
|
||||
cit = privateOutgoingMap.erase(cit);
|
||||
continue;
|
||||
}
|
||||
|
||||
++cit;
|
||||
}
|
||||
} /* UNLOCKED */
|
||||
}
|
||||
|
||||
for(uint32_t i=0;i<to_send.size();++i)
|
||||
for(auto toIt = to_send.begin(); toIt != to_send.end(); ++toIt)
|
||||
{
|
||||
ChatMessage message;
|
||||
initChatMessage(to_send[i], message);
|
||||
initChatMessage(*toIt, message);
|
||||
message.incoming = false;
|
||||
message.online = true;
|
||||
RsServer::notify()->notifyChatMessage(message);
|
||||
|
||||
checkSizeAndSendMessage(to_send[i]); // delete item
|
||||
checkSizeAndSendMessage(*toIt); // delete item
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
RsServer::notify()->notifyListChange(NOTIFY_LIST_PRIVATE_OUTGOING_CHAT, NOTIFY_TYPE_DEL);
|
||||
if (changed)
|
||||
{
|
||||
RsServer::notify()->notifyListChange(
|
||||
NOTIFY_LIST_PRIVATE_OUTGOING_CHAT, NOTIFY_TYPE_DEL);
|
||||
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
@ -1326,14 +1435,13 @@ void p3ChatService::statusChange(const std::list<pqiServicePeer> &plist)
|
||||
/* now handle remove */
|
||||
mHistoryMgr->clear(ChatId(it->id));
|
||||
|
||||
std::list<RsChatMsgItem *>::iterator cit = privateOutgoingList.begin();
|
||||
while (cit != privateOutgoingList.end()) {
|
||||
RsChatMsgItem *c = *cit;
|
||||
if (c->PeerId() == it->id) {
|
||||
cit = privateOutgoingList.erase(cit);
|
||||
continue;
|
||||
}
|
||||
++cit;
|
||||
RS_STACK_MUTEX(mChatMtx);
|
||||
for ( auto cit = privateOutgoingMap.begin();
|
||||
cit != privateOutgoingMap.end(); )
|
||||
{
|
||||
RsChatMsgItem *c = cit->second;
|
||||
if (c->PeerId() == it->id) cit = privateOutgoingMap.erase(cit);
|
||||
else ++cit;
|
||||
}
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
|
@ -31,12 +31,14 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "serialiser/rsmsgitems.h"
|
||||
#include "rsitems/rsmsgitems.h"
|
||||
#include "services/p3service.h"
|
||||
#include "pqi/pqiservicemonitor.h"
|
||||
#include "chat/distantchat.h"
|
||||
#include "chat/distributedchat.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "gxstrans/p3gxstrans.h"
|
||||
#include "util/rsdeprecate.h"
|
||||
|
||||
class p3ServiceControl;
|
||||
class p3LinkMgr;
|
||||
@ -51,10 +53,13 @@ typedef RsPeerId ChatLobbyVirtualPeerId ;
|
||||
* This service uses rsnotify (callbacks librs clients (e.g. rs-gui))
|
||||
* @see NotifyBase
|
||||
*/
|
||||
class p3ChatService: public p3Service, public DistantChatService, public DistributedChatService, public p3Config, public pqiServiceMonitor
|
||||
class p3ChatService :
|
||||
public p3Service, public DistantChatService, public DistributedChatService, public p3Config,
|
||||
public pqiServiceMonitor, GxsTransClient
|
||||
{
|
||||
public:
|
||||
p3ChatService(p3ServiceControl *cs, p3IdService *pids,p3LinkMgr *cm, p3HistoryMgr *historyMgr);
|
||||
p3ChatService(p3ServiceControl *cs, p3IdService *pids, p3LinkMgr *cm,
|
||||
p3HistoryMgr *historyMgr, p3GxsTrans& gxsTransService );
|
||||
|
||||
virtual RsServiceInfo getServiceInfo();
|
||||
|
||||
@ -91,11 +96,11 @@ public:
|
||||
*/
|
||||
bool sendPrivateChat(const RsPeerId &id, const std::string &msg);
|
||||
|
||||
/*!
|
||||
* can be used to send 'immediate' status msgs, these status updates are meant for immediate use by peer (not saved by rs)
|
||||
* e.g currently used to update user when a peer 'is typing' during a chat
|
||||
*/
|
||||
void sendStatusString(const ChatId& id,const std::string& status_str) ;
|
||||
/**
|
||||
* can be used to send 'immediate' status msgs, these status updates are
|
||||
* meant for immediate use by peer (not saved by rs) e.g currently used to
|
||||
* update user when a peer 'is typing' during a chat */
|
||||
void sendStatusString( const ChatId& id, const std::string& status_str );
|
||||
|
||||
/**
|
||||
* @brief clearChatLobby: Signal chat was cleared by GUI.
|
||||
@ -161,6 +166,22 @@ public:
|
||||
*/
|
||||
bool clearPrivateChatQueue(bool incoming, const RsPeerId &id);
|
||||
|
||||
virtual bool initiateDistantChatConnexion( const RsGxsId& to_gxs_id,
|
||||
const RsGxsId& from_gxs_id,
|
||||
DistantChatPeerId &pid,
|
||||
uint32_t& error_code,
|
||||
bool notify = true );
|
||||
|
||||
/// @see GxsTransClient::receiveGxsTransMail(...)
|
||||
virtual bool receiveGxsTransMail( const RsGxsId& authorId,
|
||||
const RsGxsId& recipientId,
|
||||
const uint8_t* data, uint32_t dataSize );
|
||||
|
||||
/// @see GxsTransClient::notifySendMailStatus(...)
|
||||
virtual bool notifyGxsTransSendStatus( RsGxsTransId mailId,
|
||||
GxsTransSendStatus status );
|
||||
|
||||
|
||||
protected:
|
||||
/************* from p3Config *******************/
|
||||
virtual RsSerialiser *setupSerialiser() ;
|
||||
@ -177,8 +198,9 @@ protected:
|
||||
|
||||
/// This is to be used by subclasses/parents to call IndicateConfigChanged()
|
||||
virtual void triggerConfigSave() { IndicateConfigChanged() ; }
|
||||
|
||||
/// Same, for storing messages in incoming list
|
||||
virtual void locked_storeIncomingMsg(RsChatMsgItem *) ;
|
||||
RS_DEPRECATED virtual void locked_storeIncomingMsg(RsChatMsgItem *) ;
|
||||
|
||||
private:
|
||||
RsMutex mChatMtx;
|
||||
@ -231,16 +253,25 @@ private:
|
||||
p3LinkMgr *mLinkMgr;
|
||||
p3HistoryMgr *mHistoryMgr;
|
||||
|
||||
std::list<RsChatMsgItem *> privateOutgoingList; // messages waiting to be send when peer comes online
|
||||
/// messages waiting to be send when peer comes online
|
||||
typedef std::map<uint64_t, RsChatMsgItem *> outMP;
|
||||
outMP privateOutgoingMap;
|
||||
|
||||
AvatarInfo *_own_avatar ;
|
||||
std::map<RsPeerId,AvatarInfo *> _avatars ;
|
||||
std::map<RsPeerId,RsChatMsgItem *> _pendingPartialMessages ;
|
||||
std::map<RsPeerId,RsChatMsgItem *> _pendingPartialMessages;
|
||||
|
||||
std::string _custom_status_string ;
|
||||
std::map<RsPeerId,StateStringInfo> _state_strings ;
|
||||
|
||||
RsChatSerialiser *_serializer ;
|
||||
RsChatSerialiser *_serializer;
|
||||
|
||||
struct DistantEndpoints { RsGxsId from; RsGxsId to; };
|
||||
typedef std::map<DistantChatPeerId, DistantEndpoints> DIDEMap;
|
||||
DIDEMap mDistantGxsMap;
|
||||
RsMutex mDGMutex;
|
||||
|
||||
p3GxsTrans& mGxsTransport;
|
||||
};
|
||||
|
||||
class p3ChatService::StateStringInfo
|
||||
|
@ -27,9 +27,13 @@
|
||||
|
||||
#include "openssl/bn.h"
|
||||
#include "retroshare/rstypes.h"
|
||||
#include "serialiser/rsserializer.h"
|
||||
#include "serialiser/rstlvkeys.h"
|
||||
#include "serialiser/rsserviceids.h"
|
||||
#include "rsitems/rsserviceids.h"
|
||||
#include "rsitems/itempriorities.h"
|
||||
#include "rsitems/rsitem.h"
|
||||
#include "serialiser/rsserial.h"
|
||||
#include "util/rsdeprecate.h"
|
||||
|
||||
#include "serialiser/rstlvidset.h"
|
||||
#include "serialiser/rstlvfileitem.h"
|
||||
@ -74,7 +78,12 @@ const uint8_t RS_PKT_SUBTYPE_DISTANT_CHAT_DH_PUBLIC_KEY = 0x16 ;
|
||||
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_SIGNED_MSG = 0x17 ;
|
||||
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_SIGNED_EVENT = 0x18 ;
|
||||
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_LIST = 0x19 ;
|
||||
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE = 0x1A ;
|
||||
|
||||
RS_DEPRECATED_FOR(RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE) \
|
||||
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE_DEPRECATED = 0x1A ; // to be removed (deprecated since May 2017)
|
||||
|
||||
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE = 0x1B ;
|
||||
const uint8_t RS_PKT_SUBTYPE_OUTGOING_MAP = 0x1C ;
|
||||
|
||||
typedef uint64_t ChatLobbyId ;
|
||||
typedef uint64_t ChatLobbyMsgId ;
|
||||
@ -90,11 +99,9 @@ class RsChatItem: public RsItem
|
||||
}
|
||||
|
||||
virtual ~RsChatItem() {}
|
||||
virtual void clear() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0) = 0 ;
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t /*indent*/ = 0) { return out; } // derived from RsItem, but should be removed
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) = 0 ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() = 0 ; // deserialise is handled using a constructor
|
||||
virtual void clear() {}
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -107,14 +114,14 @@ public:
|
||||
RsChatMsgItem() :RsChatItem(RS_PKT_SUBTYPE_DEFAULT) {}
|
||||
RsChatMsgItem(uint8_t subtype) :RsChatItem(subtype) {}
|
||||
|
||||
RsChatMsgItem(void *data,uint32_t size,uint8_t subtype = RS_PKT_SUBTYPE_DEFAULT) ; // deserialization
|
||||
//RsChatMsgItem() {}
|
||||
|
||||
virtual ~RsChatMsgItem() {}
|
||||
virtual void clear() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
// derived from RsItem
|
||||
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
virtual void clear() {}
|
||||
|
||||
uint32_t chatFlags;
|
||||
uint32_t sendTime;
|
||||
@ -137,21 +144,15 @@ public:
|
||||
RsTlvKeySignature signature ;
|
||||
|
||||
virtual RsChatLobbyBouncingObject *duplicate() const = 0 ;
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
// returns the size in bytes of the data chunk to sign.
|
||||
|
||||
virtual uint32_t signed_serial_size() =0;
|
||||
virtual bool serialise_signed_part(void *data,uint32_t& size) = 0;
|
||||
|
||||
protected:
|
||||
// The functions below handle the serialisation of data that is specific to the bouncing object level.
|
||||
// They are called by serial_size() and serialise() from children, but should not overload the serial_size() and
|
||||
// serialise() methods, otherwise the wrong method will be called when serialising from this top level class.
|
||||
|
||||
uint32_t serialized_size(bool include_signature) ;
|
||||
bool serialise_to_memory(void *data,uint32_t tlvsize,uint32_t& offset,bool include_signature) ;
|
||||
bool deserialise_from_memory(void *data,uint32_t rssize,uint32_t& offset) ;
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
virtual uint32_t PacketId() const= 0;
|
||||
};
|
||||
|
||||
class RsChatLobbyMsgItem: public RsChatMsgItem, public RsChatLobbyBouncingObject
|
||||
@ -159,55 +160,44 @@ class RsChatLobbyMsgItem: public RsChatMsgItem, public RsChatLobbyBouncingObject
|
||||
public:
|
||||
RsChatLobbyMsgItem() :RsChatMsgItem(RS_PKT_SUBTYPE_CHAT_LOBBY_SIGNED_MSG) {}
|
||||
|
||||
RsChatLobbyMsgItem(void *data,uint32_t size) ; // deserialization /// TODO!!!
|
||||
|
||||
virtual ~RsChatLobbyMsgItem() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
virtual RsChatLobbyBouncingObject *duplicate() const { return new RsChatLobbyMsgItem(*this) ; }
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
|
||||
virtual uint32_t signed_serial_size() ;
|
||||
virtual bool serialise_signed_part(void *data,uint32_t& size) ;// Isn't it better that items can serialize themselves ?
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
ChatLobbyMsgId parent_msg_id ; // Used for threaded chat.
|
||||
|
||||
protected:
|
||||
virtual uint32_t PacketId() const { return RsChatMsgItem::PacketId() ; }
|
||||
};
|
||||
|
||||
class RsChatLobbyEventItem: public RsChatItem, public RsChatLobbyBouncingObject
|
||||
{
|
||||
public:
|
||||
public:
|
||||
RsChatLobbyEventItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_SIGNED_EVENT) {}
|
||||
RsChatLobbyEventItem(void *data,uint32_t size) ; // deserialization /// TODO!!!
|
||||
|
||||
virtual ~RsChatLobbyEventItem() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
virtual RsChatLobbyBouncingObject *duplicate() const { return new RsChatLobbyEventItem(*this) ; }
|
||||
//
|
||||
virtual bool serialise(void *data,uint32_t& size) ;
|
||||
virtual uint32_t serial_size() ;
|
||||
|
||||
virtual uint32_t signed_serial_size() ;
|
||||
virtual bool serialise_signed_part(void *data,uint32_t& size) ;
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
// members.
|
||||
//
|
||||
uint8_t event_type ; // used for defining the type of event.
|
||||
std::string string1; // used for any string
|
||||
uint32_t sendTime; // used to check for old looping messages
|
||||
|
||||
protected:
|
||||
virtual uint32_t PacketId() const { return RsChatItem::PacketId() ; }
|
||||
};
|
||||
|
||||
class RsChatLobbyListRequestItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyListRequestItem() : RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_LIST_REQUEST) {}
|
||||
RsChatLobbyListRequestItem(void *data,uint32_t size) ;
|
||||
virtual ~RsChatLobbyListRequestItem() {}
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ;
|
||||
virtual uint32_t serial_size() ;
|
||||
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
};
|
||||
|
||||
struct VisibleChatLobbyInfo
|
||||
@ -223,13 +213,9 @@ class RsChatLobbyListItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyListItem() : RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_LIST) {}
|
||||
RsChatLobbyListItem(void *data,uint32_t size) ;
|
||||
virtual ~RsChatLobbyListItem() {}
|
||||
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ;
|
||||
virtual uint32_t serial_size() ;
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
std::vector<VisibleChatLobbyInfo> lobbies ;
|
||||
};
|
||||
@ -238,70 +224,73 @@ class RsChatLobbyUnsubscribeItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyUnsubscribeItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_UNSUBSCRIBE) {}
|
||||
RsChatLobbyUnsubscribeItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsChatLobbyUnsubscribeItem() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
uint64_t lobby_id ;
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
};
|
||||
|
||||
class RsChatLobbyConnectChallengeItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyConnectChallengeItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_CHALLENGE) {}
|
||||
RsChatLobbyConnectChallengeItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsChatLobbyConnectChallengeItem() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
uint64_t challenge_code ;
|
||||
};
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
/// @deprecated since May 2017, to be removed
|
||||
class RsChatLobbyInviteItem_Deprecated : public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyInviteItem_Deprecated() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE_DEPRECATED) {}
|
||||
virtual ~RsChatLobbyInviteItem_Deprecated() {}
|
||||
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
ChatLobbyId lobby_id ;
|
||||
std::string lobby_name ;
|
||||
std::string lobby_topic ;
|
||||
ChatLobbyFlags lobby_flags ;
|
||||
};
|
||||
|
||||
class RsChatLobbyInviteItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyInviteItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE) {}
|
||||
RsChatLobbyInviteItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsChatLobbyInviteItem() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
ChatLobbyId lobby_id ;
|
||||
std::string lobby_name ;
|
||||
std::string lobby_topic ;
|
||||
ChatLobbyFlags lobby_flags ;
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
};
|
||||
|
||||
/*!
|
||||
* For saving incoming and outgoing chat msgs
|
||||
* @see p3ChatService
|
||||
*/
|
||||
class RsPrivateChatMsgConfigItem: public RsChatItem
|
||||
struct RsPrivateChatMsgConfigItem : RsChatItem
|
||||
{
|
||||
public:
|
||||
RsPrivateChatMsgConfigItem() :RsChatItem(RS_PKT_SUBTYPE_PRIVATECHATMSG_CONFIG) {}
|
||||
RsPrivateChatMsgConfigItem(void *data,uint32_t size) ; // deserialization
|
||||
RsPrivateChatMsgConfigItem() :
|
||||
RsChatItem(RS_PKT_SUBTYPE_PRIVATECHATMSG_CONFIG) {}
|
||||
|
||||
virtual ~RsPrivateChatMsgConfigItem() {}
|
||||
virtual void clear() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
virtual void serial_process( RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx );
|
||||
|
||||
/* set data from RsChatMsgItem to RsPrivateChatMsgConfigItem */
|
||||
/** set data from RsChatMsgItem to RsPrivateChatMsgConfigItem */
|
||||
void set(RsChatMsgItem *ci, const RsPeerId &peerId, uint32_t confFlags);
|
||||
/* get data from RsPrivateChatMsgConfigItem to RsChatMsgItem */
|
||||
/** get data from RsPrivateChatMsgConfigItem to RsChatMsgItem */
|
||||
void get(RsChatMsgItem *ci);
|
||||
|
||||
RsPeerId configPeerId;
|
||||
@ -311,40 +300,17 @@ class RsPrivateChatMsgConfigItem: public RsChatItem
|
||||
std::string message;
|
||||
uint32_t recvTime;
|
||||
};
|
||||
class RsPrivateChatDistantInviteConfigItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsPrivateChatDistantInviteConfigItem() :RsChatItem(RS_PKT_SUBTYPE_DISTANT_INVITE_CONFIG) {}
|
||||
RsPrivateChatDistantInviteConfigItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsPrivateChatDistantInviteConfigItem() {}
|
||||
virtual void clear() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
|
||||
unsigned char aes_key[16] ;
|
||||
RsFileHash hash ;
|
||||
std::string encrypted_radix64_string ;
|
||||
RsPgpId destination_pgp_id ;
|
||||
uint32_t time_of_validity ;
|
||||
uint32_t last_hit_time ;
|
||||
uint32_t flags ;
|
||||
};
|
||||
class RsChatLobbyConfigItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatLobbyConfigItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_LOBBY_CONFIG) { lobby_Id = 0; }
|
||||
RsChatLobbyConfigItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsChatLobbyConfigItem() {}
|
||||
|
||||
virtual void clear() { lobby_Id = 0; }
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
uint64_t lobby_Id;
|
||||
uint32_t flags ;
|
||||
@ -356,13 +322,10 @@ class RsChatStatusItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatStatusItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_STATUS) {}
|
||||
RsChatStatusItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsChatStatusItem() {}
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
uint32_t flags ;
|
||||
std::string status_string;
|
||||
@ -374,58 +337,31 @@ class RsChatAvatarItem: public RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatAvatarItem() :RsChatItem(RS_PKT_SUBTYPE_CHAT_AVATAR) {setPriorityLevel(QOS_PRIORITY_RS_CHAT_AVATAR_ITEM) ;}
|
||||
RsChatAvatarItem(void *data,uint32_t size) ; // deserialization
|
||||
|
||||
virtual ~RsChatAvatarItem() ;
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
uint32_t image_size ; // size of data in bytes
|
||||
unsigned char *image_data ; // image
|
||||
};
|
||||
|
||||
// This class contains the public Diffie-Hellman parameters to be sent
|
||||
// when performing a DH agreement over a distant chat tunnel.
|
||||
//
|
||||
class RsChatDHPublicKeyItem: public RsChatItem
|
||||
|
||||
struct PrivateOugoingMapItem : RsChatItem
|
||||
{
|
||||
public:
|
||||
RsChatDHPublicKeyItem() :RsChatItem(RS_PKT_SUBTYPE_DISTANT_CHAT_DH_PUBLIC_KEY) {setPriorityLevel(QOS_PRIORITY_RS_CHAT_ITEM) ;}
|
||||
RsChatDHPublicKeyItem(void *data,uint32_t size) ; // deserialization
|
||||
PrivateOugoingMapItem() : RsChatItem(RS_PKT_SUBTYPE_OUTGOING_MAP) {}
|
||||
|
||||
virtual ~RsChatDHPublicKeyItem() { BN_free(public_key) ; }
|
||||
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0);
|
||||
void serial_process( RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx );
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) ; // Isn't it better that items can serialize themselves ?
|
||||
virtual uint32_t serial_size() ; // deserialise is handled using a constructor
|
||||
|
||||
// Private data to DH public key item
|
||||
//
|
||||
BIGNUM *public_key ;
|
||||
|
||||
RsTlvKeySignature signature ; // signs the public key in a row.
|
||||
RsTlvPublicRSAKey gxs_key ; // public key of the signer
|
||||
|
||||
private:
|
||||
RsChatDHPublicKeyItem(const RsChatDHPublicKeyItem&) : RsChatItem(RS_PKT_SUBTYPE_DISTANT_CHAT_DH_PUBLIC_KEY) {} // make the object non copy-able
|
||||
const RsChatDHPublicKeyItem& operator=(const RsChatDHPublicKeyItem&) { return *this ;}
|
||||
std::map<uint64_t, RsChatMsgItem> store;
|
||||
};
|
||||
|
||||
class RsChatSerialiser: public RsSerialType
|
||||
struct RsChatSerialiser : RsServiceSerializer
|
||||
{
|
||||
public:
|
||||
RsChatSerialiser() :RsSerialType(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_CHAT) {}
|
||||
RsChatSerialiser(SerializationFlags flags = SERIALIZATION_FLAG_NONE) :
|
||||
RsServiceSerializer( RS_SERVICE_TYPE_CHAT,
|
||||
RsGenericSerializer::FORMAT_BINARY, flags ) {}
|
||||
|
||||
virtual uint32_t size (RsItem *item)
|
||||
{
|
||||
return static_cast<RsChatItem *>(item)->serial_size() ;
|
||||
}
|
||||
virtual bool serialise(RsItem *item, void *data, uint32_t *size)
|
||||
{
|
||||
return static_cast<RsChatItem *>(item)->serialise(data,*size) ;
|
||||
}
|
||||
virtual RsItem *deserialise (void *data, uint32_t *size) ;
|
||||
virtual RsItem *create_item(uint16_t service_id,uint8_t item_sub_id) const;
|
||||
};
|
||||
|
||||
|
@ -44,6 +44,12 @@
|
||||
|
||||
//#define DEBUG_CHACHA20
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define AEAD_chacha20_poly1305_openssl AEAD_chacha20_poly1305
|
||||
#else
|
||||
#define AEAD_chacha20_poly1305_rs AEAD_chacha20_poly1305
|
||||
#endif
|
||||
|
||||
namespace librs {
|
||||
namespace crypto {
|
||||
|
||||
@ -273,6 +279,7 @@ static void quotient(const uint256_32& n,const uint256_32& p,uint256_32& q,uint2
|
||||
q += m ;
|
||||
}
|
||||
}
|
||||
|
||||
static void remainder(const uint256_32& n,const uint256_32& p,uint256_32& r)
|
||||
{
|
||||
// simple algorithm: add up multiples of u while keeping below *this. Once done, substract.
|
||||
@ -356,7 +363,7 @@ static void print(const chacha20_state& s)
|
||||
}
|
||||
#endif
|
||||
|
||||
void chacha20_encrypt(uint8_t key[32], uint32_t block_counter, uint8_t nonce[12], uint8_t *data, uint32_t size)
|
||||
void chacha20_encrypt_rs(uint8_t key[32], uint32_t block_counter, uint8_t nonce[12], uint8_t *data, uint32_t size)
|
||||
{
|
||||
for(uint32_t i=0;i<size/64 + 1;++i)
|
||||
{
|
||||
@ -379,6 +386,50 @@ void chacha20_encrypt(uint8_t key[32], uint32_t block_counter, uint8_t nonce[12]
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
void chacha20_encrypt_openssl(uint8_t key[32], uint32_t block_counter, uint8_t nonce[12], uint8_t *data, uint32_t size)
|
||||
{
|
||||
EVP_CIPHER_CTX *ctx;
|
||||
|
||||
int len;
|
||||
int tmp_len;
|
||||
uint8_t tmp[size];
|
||||
uint8_t iv[16];
|
||||
|
||||
// create iv with nonce and block counter
|
||||
memcpy(iv, &block_counter, 4);
|
||||
memcpy(iv + 4, nonce, 12);
|
||||
|
||||
/* Create and initialise the context */
|
||||
if(!(ctx = EVP_CIPHER_CTX_new())) return;
|
||||
|
||||
/* Initialise the encryption operation. IMPORTANT - ensure you use a key
|
||||
* and IV size appropriate for your cipher
|
||||
* In this example we are using 256 bit AES (i.e. a 256 bit key). The
|
||||
* IV size for *most* modes is the same as the block size. For AES this
|
||||
* is 128 bits */
|
||||
if(1 != EVP_EncryptInit_ex(ctx, EVP_chacha20(), NULL, key, iv)) goto out;
|
||||
|
||||
/* Provide the message to be encrypted, and obtain the encrypted output.
|
||||
* EVP_EncryptUpdate can be called multiple times if necessary
|
||||
*/
|
||||
if(1 != EVP_EncryptUpdate(ctx, tmp, &len, data, size)) goto out;
|
||||
tmp_len = len;
|
||||
|
||||
/* Finalise the encryption. Further ciphertext bytes may be written at
|
||||
* this stage.
|
||||
*/
|
||||
if(1 != EVP_EncryptFinal_ex(ctx, tmp + len, &len)) goto out;
|
||||
tmp_len += len;
|
||||
|
||||
memcpy(data, tmp, tmp_len);
|
||||
|
||||
out:
|
||||
/* Clean up */
|
||||
EVP_CIPHER_CTX_free(ctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
struct poly1305_state
|
||||
{
|
||||
uint256_32 r ;
|
||||
@ -475,7 +526,7 @@ bool constant_time_memory_compare(const uint8_t *m1,const uint8_t *m2,uint32_t s
|
||||
return !CRYPTO_memcmp(m1,m2,size) ;
|
||||
}
|
||||
|
||||
bool AEAD_chacha20_poly1305(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint32_t data_size,uint8_t *aad,uint32_t aad_size,uint8_t tag[16],bool encrypt)
|
||||
bool AEAD_chacha20_poly1305_rs(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint32_t data_size,uint8_t *aad,uint32_t aad_size,uint8_t tag[16],bool encrypt)
|
||||
{
|
||||
// encrypt + tag. See RFC7539-2.8
|
||||
|
||||
@ -492,7 +543,7 @@ bool AEAD_chacha20_poly1305(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uin
|
||||
|
||||
if(encrypt)
|
||||
{
|
||||
chacha20_encrypt(key,1,nonce,data,data_size);
|
||||
chacha20_encrypt_rs(key,1,nonce,data,data_size);
|
||||
|
||||
poly1305_state pls ;
|
||||
|
||||
@ -520,24 +571,112 @@ bool AEAD_chacha20_poly1305(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uin
|
||||
|
||||
// decrypt
|
||||
|
||||
chacha20_encrypt(key,1,nonce,data,data_size);
|
||||
chacha20_encrypt_rs(key,1,nonce,data,data_size);
|
||||
|
||||
return constant_time_memory_compare(tag,computed_tag,16) ;
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define errorOut {ret = false; goto out;}
|
||||
|
||||
bool AEAD_chacha20_poly1305_openssl(uint8_t key[32], uint8_t nonce[12], uint8_t *data, uint32_t data_size, uint8_t *aad, uint32_t aad_size, uint8_t tag[16], bool encrypt_or_decrypt)
|
||||
{
|
||||
EVP_CIPHER_CTX *ctx;
|
||||
|
||||
bool ret = true;
|
||||
int len;
|
||||
const uint8_t tag_len = 16;
|
||||
int tmp_len;
|
||||
uint8_t tmp[data_size];
|
||||
|
||||
/* Create and initialise the context */
|
||||
if(!(ctx = EVP_CIPHER_CTX_new())) return false;
|
||||
|
||||
if (encrypt_or_decrypt) {
|
||||
/* Initialise the encryption operation. */
|
||||
if(1 != EVP_EncryptInit_ex(ctx, EVP_chacha20_poly1305(), NULL, NULL, NULL)) errorOut
|
||||
|
||||
/* Initialise key and IV */
|
||||
if(1 != EVP_EncryptInit_ex(ctx, NULL, NULL, key, nonce)) errorOut
|
||||
|
||||
/* Provide any AAD data. This can be called zero or more times as
|
||||
* required
|
||||
*/
|
||||
if(1 != EVP_EncryptUpdate(ctx, NULL, &len, aad, aad_size)) errorOut
|
||||
|
||||
/* Provide the message to be encrypted, and obtain the encrypted output.
|
||||
* EVP_EncryptUpdate can be called multiple times if necessary
|
||||
*/
|
||||
if(1 != EVP_EncryptUpdate(ctx, tmp, &len, data, data_size)) errorOut
|
||||
tmp_len = len;
|
||||
|
||||
/* Finalise the encryption. Normally ciphertext bytes may be written at
|
||||
* this stage, but this does not occur in GCM mode
|
||||
*/
|
||||
if(1 != EVP_EncryptFinal_ex(ctx, data + len, &len)) errorOut
|
||||
tmp_len += len;
|
||||
|
||||
/* Get the tag */
|
||||
if(1 != EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, tag_len, tag)) errorOut
|
||||
} else {
|
||||
/* Initialise the decryption operation. */
|
||||
if(!EVP_DecryptInit_ex(ctx, EVP_chacha20_poly1305(), NULL, key, nonce)) errorOut
|
||||
|
||||
/* Provide any AAD data. This can be called zero or more times as
|
||||
* required
|
||||
*/
|
||||
if(!EVP_DecryptUpdate(ctx, NULL, &len, aad, aad_size)) errorOut
|
||||
|
||||
/* Provide the message to be decrypted, and obtain the plaintext output.
|
||||
* EVP_DecryptUpdate can be called multiple times if necessary
|
||||
*/
|
||||
if(!EVP_DecryptUpdate(ctx, tmp, &len, data, data_size)) errorOut
|
||||
tmp_len = len;
|
||||
|
||||
/* Set expected tag value. Works in OpenSSL 1.0.1d and later */
|
||||
if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, tag_len, tag)) errorOut
|
||||
|
||||
/* Finalise the decryption. A positive return value indicates success,
|
||||
* anything else is a failure - the plaintext is not trustworthy.
|
||||
*/
|
||||
if(EVP_DecryptFinal_ex(ctx, tmp + len, &len) > 0) {
|
||||
/* Success */
|
||||
tmp_len += len;
|
||||
ret = true;
|
||||
} else {
|
||||
/* Verify failed */
|
||||
errorOut
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(data, tmp, tmp_len);
|
||||
|
||||
out:
|
||||
/* Clean up */
|
||||
EVP_CIPHER_CTX_free(ctx);
|
||||
return !!ret;
|
||||
}
|
||||
|
||||
#undef errorOut
|
||||
#endif
|
||||
|
||||
bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint32_t data_size,uint8_t *aad,uint32_t aad_size,uint8_t tag[16],bool encrypt)
|
||||
{
|
||||
// encrypt + tag. See RFC7539-2.8
|
||||
|
||||
if(encrypt)
|
||||
{
|
||||
chacha20_encrypt(key,1,nonce,data,data_size);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
chacha20_encrypt_rs(key,1,nonce,data,data_size);
|
||||
#else
|
||||
chacha20_encrypt_openssl(key, 1, nonce, data, data_size);
|
||||
#endif
|
||||
|
||||
uint8_t computed_tag[EVP_MAX_MD_SIZE];
|
||||
unsigned int md_size ;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
HMAC_CTX hmac_ctx ;
|
||||
HMAC_CTX_init(&hmac_ctx) ;
|
||||
|
||||
@ -570,7 +709,7 @@ bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint3
|
||||
uint8_t computed_tag[EVP_MAX_MD_SIZE];
|
||||
unsigned int md_size ;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
HMAC_CTX hmac_ctx ;
|
||||
HMAC_CTX_init(&hmac_ctx) ;
|
||||
|
||||
@ -594,7 +733,11 @@ bool AEAD_chacha20_sha256(uint8_t key[32], uint8_t nonce[12],uint8_t *data,uint3
|
||||
|
||||
// decrypt
|
||||
|
||||
chacha20_encrypt(key,1,nonce,data,data_size);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
chacha20_encrypt_rs(key,1,nonce,data,data_size);
|
||||
#else
|
||||
chacha20_encrypt_openssl(key, 1, nonce, data, data_size);
|
||||
#endif
|
||||
|
||||
return constant_time_memory_compare(tag,computed_tag,16) ;
|
||||
}
|
||||
@ -674,7 +817,7 @@ bool perform_tests()
|
||||
0x74, 0x2e
|
||||
};
|
||||
|
||||
chacha20_encrypt(key,1,nounce2,plaintext,7*16+2) ;
|
||||
chacha20_encrypt_rs(key,1,nounce2,plaintext,7*16+2) ;
|
||||
|
||||
#ifdef DEBUG_CHACHA20
|
||||
fprintf(stdout,"CipherText: \n") ;
|
||||
@ -832,7 +975,7 @@ bool perform_tests()
|
||||
fprintf(stdout,"result: q=") ; uint256_32::print(q1) ; fprintf(stdout," r=") ; uint256_32::print(r1) ; fprintf(stdout,"\n") ;
|
||||
#endif
|
||||
|
||||
uint256_32 res(q1) ;
|
||||
//uint256_32 res(q1) ;
|
||||
q1 *= p1 ;
|
||||
q1 += r1 ;
|
||||
|
||||
@ -1154,12 +1297,12 @@ bool perform_tests()
|
||||
uint8_t tag[16] ;
|
||||
uint8_t test_tag[16] = { 0x1a,0xe1,0x0b,0x59,0x4f,0x09,0xe2,0x6a,0x7e,0x90,0x2e,0xcb,0xd0,0x60,0x06,0x91 };
|
||||
|
||||
AEAD_chacha20_poly1305(key,nonce,msg,7*16+2,aad,12,tag,true) ;
|
||||
AEAD_chacha20_poly1305_rs(key,nonce,msg,7*16+2,aad,12,tag,true) ;
|
||||
|
||||
if(!constant_time_memory_compare(msg,test_msg,7*16+2)) return false ;
|
||||
if(!constant_time_memory_compare(tag,test_tag,16)) return false ;
|
||||
|
||||
bool res = AEAD_chacha20_poly1305(key,nonce,msg,7*16+2,aad,12,tag,false) ;
|
||||
bool res = AEAD_chacha20_poly1305_rs(key,nonce,msg,7*16+2,aad,12,tag,false) ;
|
||||
|
||||
if(!res) return false ;
|
||||
}
|
||||
@ -1197,7 +1340,7 @@ bool perform_tests()
|
||||
|
||||
uint8_t received_tag[16] = { 0xee,0xad,0x9d,0x67,0x89,0x0c,0xbb,0x22,0x39,0x23,0x36,0xfe,0xa1,0x85,0x1f,0x38 };
|
||||
|
||||
if(!AEAD_chacha20_poly1305(key,nonce,ciphertext,16*16+9,aad,12,received_tag,false))
|
||||
if(!AEAD_chacha20_poly1305_rs(key,nonce,ciphertext,16*16+9,aad,12,received_tag,false))
|
||||
return false ;
|
||||
|
||||
uint8_t cleartext[16*16+9] = {
|
||||
@ -1243,18 +1386,26 @@ bool perform_tests()
|
||||
|
||||
{
|
||||
RsScopeTimer s("AEAD1") ;
|
||||
chacha20_encrypt(key, 1, nonce, ten_megabyte_data,SIZE) ;
|
||||
chacha20_encrypt_rs(key, 1, nonce, ten_megabyte_data,SIZE) ;
|
||||
|
||||
std::cerr << " Chacha20 encryption speed : " << SIZE / (1024.0*1024.0) / s.duration() << " MB/s" << std::endl;
|
||||
}
|
||||
{
|
||||
RsScopeTimer s("AEAD2") ;
|
||||
AEAD_chacha20_poly1305(key,nonce,ten_megabyte_data,SIZE,aad,12,received_tag,true) ;
|
||||
AEAD_chacha20_poly1305_rs(key,nonce,ten_megabyte_data,SIZE,aad,12,received_tag,true) ;
|
||||
|
||||
std::cerr << " AEAD/poly1305 encryption speed: " << SIZE / (1024.0*1024.0) / s.duration() << " MB/s" << std::endl;
|
||||
std::cerr << " AEAD/poly1305 own encryption speed : " << SIZE / (1024.0*1024.0) / s.duration() << " MB/s" << std::endl;
|
||||
}
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x010100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
{
|
||||
RsScopeTimer s("AEAD3") ;
|
||||
AEAD_chacha20_poly1305_openssl(key,nonce,ten_megabyte_data,SIZE,aad,12,received_tag,true) ;
|
||||
|
||||
std::cerr << " AEAD/poly1305 openssl encryption speed: " << SIZE / (1024.0*1024.0) / s.duration() << " MB/s" << std::endl;
|
||||
}
|
||||
#endif
|
||||
{
|
||||
RsScopeTimer s("AEAD4") ;
|
||||
AEAD_chacha20_sha256(key,nonce,ten_megabyte_data,SIZE,aad,12,received_tag,true) ;
|
||||
|
||||
std::cerr << " AEAD/sha256 encryption speed : " << SIZE / (1024.0*1024.0) / s.duration() << " MB/s" << std::endl;
|
||||
|
@ -398,6 +398,7 @@ uint32_t PeerConnectStateBox::connectCb_direct()
|
||||
break;
|
||||
}
|
||||
} /* FALLTHROUGH TO START CASE */
|
||||
/* fallthrough */
|
||||
default:
|
||||
case CSB_REVERSE_WAIT:
|
||||
case CSB_PROXY_WAIT:
|
||||
@ -411,6 +412,7 @@ uint32_t PeerConnectStateBox::connectCb_direct()
|
||||
}
|
||||
|
||||
} /* FALLTHROUGH TO START CASE */
|
||||
/* fallthrough */
|
||||
case CSB_START:
|
||||
{
|
||||
/* starting up the connection */
|
||||
@ -537,6 +539,7 @@ uint32_t PeerConnectStateBox::connectCb_unreachable()
|
||||
break;
|
||||
}
|
||||
} /* FALLTHROUGH TO START CASE */
|
||||
/* fallthrough */
|
||||
default:
|
||||
case CSB_DIRECT_WAIT:
|
||||
{
|
||||
@ -548,6 +551,7 @@ uint32_t PeerConnectStateBox::connectCb_unreachable()
|
||||
}
|
||||
|
||||
} /* FALLTHROUGH TO START CASE */
|
||||
/* fallthrough */
|
||||
case CSB_START:
|
||||
{
|
||||
/* starting up the connection */
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "tcponudp/udprelay.h"
|
||||
#include "bitdht/bdstddht.h"
|
||||
|
||||
#include "serialiser/rsconfigitems.h"
|
||||
#include "rsitems/rsconfigitems.h"
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
|
@ -923,7 +923,12 @@ bool RemoteDirectoryStorage::deserialiseUpdateDirEntry(const EntryIndex& indx,co
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
||||
int RemoteDirectoryStorage::searchHash(const RsFileHash& hash, EntryIndex& result) const
|
||||
{
|
||||
RS_STACK_MUTEX(mDirStorageMtx) ;
|
||||
|
||||
return mFileHierarchy->searchHash(hash,result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -203,6 +203,18 @@ public:
|
||||
* \return
|
||||
*/
|
||||
time_t& lastSweepTime() { return mLastSweepTime ; }
|
||||
|
||||
/*!
|
||||
* \brief searchHash
|
||||
* Looks into local database of shared files for the given hash.
|
||||
* \param hash hash to look for
|
||||
* \param results Entry index of the file that is found
|
||||
* \return
|
||||
* true is a file is found
|
||||
* false otherwise.
|
||||
*/
|
||||
virtual int searchHash(const RsFileHash& hash, EntryIndex& results) const ;
|
||||
|
||||
private:
|
||||
time_t mLastSweepTime ;
|
||||
};
|
||||
|
@ -36,20 +36,14 @@
|
||||
//=============================================================================================================//
|
||||
|
||||
LocalDirectoryUpdater::LocalDirectoryUpdater(HashStorage *hc,LocalDirectoryStorage *lds)
|
||||
: mHashCache(hc),mSharedDirectories(lds)
|
||||
: mHashCache(hc), mSharedDirectories(lds)
|
||||
, mLastSweepTime(0), mLastTSUpdateTime(0)
|
||||
, mDelayBetweenDirectoryUpdates(DELAY_BETWEEN_DIRECTORY_UPDATES)
|
||||
, mIsEnabled(false), mFollowSymLinks(FOLLOW_SYMLINKS_DEFAULT)
|
||||
/* Can be left to false, but setting it to true will force to re-hash any file that has been left unhashed in the last session.*/
|
||||
, mNeedsFullRecheck(true)
|
||||
, mIsChecking(false), mForceUpdate(false), mIgnoreFlags (0)
|
||||
{
|
||||
mLastSweepTime = 0;
|
||||
mLastTSUpdateTime = 0;
|
||||
|
||||
mDelayBetweenDirectoryUpdates = DELAY_BETWEEN_DIRECTORY_UPDATES;
|
||||
mIsEnabled = false ;
|
||||
mFollowSymLinks = FOLLOW_SYMLINKS_DEFAULT ;
|
||||
|
||||
// Can be left to false, but setting it to true will force to re-hash any file that has been left unhashed in the last session.
|
||||
|
||||
mNeedsFullRecheck = true ;
|
||||
mIsChecking = false ;
|
||||
mForceUpdate = false ;
|
||||
}
|
||||
|
||||
bool LocalDirectoryUpdater::isEnabled() const
|
||||
@ -102,6 +96,9 @@ void LocalDirectoryUpdater::forceUpdate()
|
||||
{
|
||||
mForceUpdate = true ;
|
||||
mLastSweepTime = 0 ;
|
||||
|
||||
if(mHashCache != NULL && mHashCache->hashingProcessPaused())
|
||||
mHashCache->togglePauseHashingProcess();
|
||||
}
|
||||
|
||||
bool LocalDirectoryUpdater::sweepSharedDirectories()
|
||||
@ -199,6 +196,7 @@ void LocalDirectoryUpdater::recursUpdateSharedDir(const std::string& cumulated_p
|
||||
std::set<std::string> subdirs ;
|
||||
|
||||
for(;dirIt.isValid();dirIt.next())
|
||||
if(filterFile(dirIt.file_name()))
|
||||
{
|
||||
switch(dirIt.file_type())
|
||||
{
|
||||
@ -237,7 +235,7 @@ void LocalDirectoryUpdater::recursUpdateSharedDir(const std::string& cumulated_p
|
||||
|
||||
RsFileHash hash ;
|
||||
|
||||
// mSharedDirectories des two things: store H(F), and compute H(H(F)), which is used in FT. The later is always needed.
|
||||
// mSharedDirectories does two things: store H(F), and compute H(H(F)), which is used in FT. The later is always needed.
|
||||
|
||||
if(mHashCache->requestHash(cumulated_path + "/" + dit.name(),dit.size(),dit.modtime(),hash,this,*dit))
|
||||
mSharedDirectories->updateHash(*dit,hash,hash != dit.hash());
|
||||
@ -259,6 +257,36 @@ void LocalDirectoryUpdater::recursUpdateSharedDir(const std::string& cumulated_p
|
||||
}
|
||||
}
|
||||
|
||||
bool LocalDirectoryUpdater::filterFile(const std::string& fname) const
|
||||
{
|
||||
if(mIgnoreFlags & RS_FILE_SHARE_FLAGS_IGNORE_SUFFIXES)
|
||||
for(auto it(mIgnoredSuffixes.begin());it!=mIgnoredSuffixes.end();++it)
|
||||
if(fname.size() >= (*it).size() && fname.substr( fname.size() - (*it).size()) == *it)
|
||||
{
|
||||
std::cerr << "(II) ignoring file " << fname << ", because it matches suffix \"" << *it << "\"" << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
if(mIgnoreFlags & RS_FILE_SHARE_FLAGS_IGNORE_PREFIXES)
|
||||
for(auto it(mIgnoredPrefixes.begin());it!=mIgnoredPrefixes.end();++it)
|
||||
if(fname.size() >= (*it).size() && fname.substr( 0,(*it).size()) == *it)
|
||||
{
|
||||
std::cerr << "(II) ignoring file " << fname << ", because it matches prefix \"" << *it << "\"" << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
void LocalDirectoryUpdater::togglePauseHashingProcess()
|
||||
{
|
||||
mHashCache->togglePauseHashingProcess() ;
|
||||
}
|
||||
bool LocalDirectoryUpdater::hashingProcessPaused()
|
||||
{
|
||||
return mHashCache->hashingProcessPaused();
|
||||
}
|
||||
|
||||
bool LocalDirectoryUpdater::inDirectoryCheck() const
|
||||
{
|
||||
return mHashCache->isRunning();
|
||||
@ -301,5 +329,19 @@ bool LocalDirectoryUpdater::followSymLinks() const
|
||||
return mFollowSymLinks ;
|
||||
}
|
||||
|
||||
void LocalDirectoryUpdater::setIgnoreLists(const std::list<std::string>& ignored_prefixes,const std::list<std::string>& ignored_suffixes,uint32_t ignore_flags)
|
||||
{
|
||||
mIgnoredPrefixes = ignored_prefixes ;
|
||||
mIgnoredSuffixes = ignored_suffixes ;
|
||||
mIgnoreFlags = ignore_flags;
|
||||
}
|
||||
bool LocalDirectoryUpdater::getIgnoreLists(std::list<std::string>& ignored_prefixes,std::list<std::string>& ignored_suffixes,uint32_t& ignore_flags) const
|
||||
{
|
||||
ignored_prefixes = mIgnoredPrefixes;
|
||||
ignored_suffixes = mIgnoredSuffixes;
|
||||
ignore_flags = mIgnoreFlags ;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,6 +40,8 @@ public:
|
||||
|
||||
void forceUpdate();
|
||||
bool inDirectoryCheck() const ;
|
||||
void togglePauseHashingProcess();
|
||||
bool hashingProcessPaused();
|
||||
|
||||
void setHashSalt(const RsFileHash& hash) { mHashSalt = hash; }
|
||||
const RsFileHash& hashSalt() const { return mHashSalt; }
|
||||
@ -53,6 +55,9 @@ public:
|
||||
void setEnabled(bool b) ;
|
||||
bool isEnabled() const ;
|
||||
|
||||
void setIgnoreLists(const std::list<std::string>& ignored_prefixes,const std::list<std::string>& ignored_suffixes,uint32_t ignore_flags) ;
|
||||
bool getIgnoreLists(std::list<std::string>& ignored_prefixes,std::list<std::string>& ignored_suffixes,uint32_t& ignore_flags) const ;
|
||||
|
||||
protected:
|
||||
virtual void data_tick() ;
|
||||
|
||||
@ -63,6 +68,8 @@ protected:
|
||||
bool sweepSharedDirectories();
|
||||
|
||||
private:
|
||||
bool filterFile(const std::string& fname) const ; // reponds true if the file passes the ignore lists test.
|
||||
|
||||
HashStorage *mHashCache ;
|
||||
LocalDirectoryStorage *mSharedDirectories ;
|
||||
|
||||
@ -77,5 +84,9 @@ private:
|
||||
bool mNeedsFullRecheck ;
|
||||
bool mIsChecking ;
|
||||
bool mForceUpdate ;
|
||||
|
||||
uint32_t mIgnoreFlags ;
|
||||
std::list<std::string> mIgnoredPrefixes ;
|
||||
std::list<std::string> mIgnoredSuffixes ;
|
||||
};
|
||||
|
||||
|
@ -39,6 +39,9 @@ static const std::string WATCH_FILE_DURATION_SS = "WATCH_FILES_DELAY" ; // key
|
||||
static const std::string WATCH_FILE_ENABLED_SS = "WATCH_FILES_ENABLED"; // key to store ON/OFF flags for file whatch
|
||||
static const std::string FOLLOW_SYMLINKS_SS = "FOLLOW_SYMLINKS"; // dereference symbolic links, or just ignore them.
|
||||
static const std::string WATCH_HASH_SALT_SS = "WATCH_HASH_SALT"; // Salt that is used to hash directory names
|
||||
static const std::string IGNORED_PREFIXES_SS = "IGNORED_PREFIXES"; // ignore file prefixes
|
||||
static const std::string IGNORED_SUFFIXES_SS = "IGNORED_SUFFIXES"; // ignore file suffixes
|
||||
static const std::string IGNORE_LIST_FLAGS_SS = "IGNORED_FLAGS"; // ignore file flags
|
||||
|
||||
static const std::string FILE_SHARING_DIR_NAME = "file_sharing" ; // hard-coded directory name to store friend file lists, hash cache, etc.
|
||||
static const std::string HASH_CACHE_FILE_NAME = "hash_cache.bin" ; // hard-coded directory name to store encrypted hash cache.
|
||||
@ -50,9 +53,14 @@ static const uint32_t MIN_INTERVAL_BETWEEN_REMOTE_DIRECTORY_SAVE = 23 ; //
|
||||
static const uint32_t MAX_DIR_SYNC_RESPONSE_DATA_SIZE = 20000 ; // Maximum RsItem data size in bytes for serialised directory transmission
|
||||
static const uint32_t DEFAULT_HASH_STORAGE_DURATION_DAYS = 30 ; // remember deleted/inaccessible files for 30 days
|
||||
|
||||
static const uint32_t NB_FRIEND_INDEX_BITS = 10 ; // Do not change this!
|
||||
static const uint32_t NB_ENTRY_INDEX_BITS = 22 ; // Do not change this!
|
||||
static const uint32_t ENTRY_INDEX_BIT_MASK = 0x003fffff ; // used for storing (EntryIndex,Friend) couples into a 32bits pointer. Depends on the two values just before. Dont change!
|
||||
static const uint32_t NB_FRIEND_INDEX_BITS_32BITS = 10 ; // Do not change this!
|
||||
static const uint32_t NB_ENTRY_INDEX_BITS_32BITS = 22 ; // Do not change this!
|
||||
static const uint32_t ENTRY_INDEX_BIT_MASK_32BITS = 0x003fffff ; // used for storing (EntryIndex,Friend) couples into a 32bits pointer. Depends on the two values just before. Dont change!
|
||||
|
||||
static const uint64_t NB_FRIEND_INDEX_BITS_64BITS = 24 ; // Do not change this!
|
||||
static const uint64_t NB_ENTRY_INDEX_BITS_64BITS = 40 ; // Do not change this!
|
||||
static const uint64_t ENTRY_INDEX_BIT_MASK_64BITS = 0x0000000fffffffff ; // used for storing (EntryIndex,Friend) couples into a 32bits pointer. Depends on the two values just before. Dont change!
|
||||
|
||||
static const uint32_t DELAY_BEFORE_DROP_REQUEST = 600; // every 10 min
|
||||
|
||||
static const bool FOLLOW_SYMLINKS_DEFAULT = true;
|
||||
|
@ -44,6 +44,7 @@ HashStorage::HashStorage(const std::string& save_file_name)
|
||||
mTotalSizeToHash = 0;
|
||||
mTotalFilesToHash = 0;
|
||||
mMaxStorageDurationDays = DEFAULT_HASH_STORAGE_DURATION_DAYS ;
|
||||
mHashingProcessPaused = false;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mHashMtx) ;
|
||||
@ -52,6 +53,18 @@ HashStorage::HashStorage(const std::string& save_file_name)
|
||||
try_load_import_old_hash_cache();
|
||||
}
|
||||
}
|
||||
|
||||
void HashStorage::togglePauseHashingProcess()
|
||||
{
|
||||
RS_STACK_MUTEX(mHashMtx) ;
|
||||
mHashingProcessPaused = !mHashingProcessPaused ;
|
||||
}
|
||||
bool HashStorage::hashingProcessPaused()
|
||||
{
|
||||
RS_STACK_MUTEX(mHashMtx) ;
|
||||
return mHashingProcessPaused;
|
||||
}
|
||||
|
||||
static std::string friendlyUnit(uint64_t val)
|
||||
{
|
||||
const std::string units[5] = {"B","KB","MB","GB","TB"};
|
||||
@ -78,12 +91,14 @@ void HashStorage::data_tick()
|
||||
RsFileHash hash;
|
||||
uint64_t size = 0;
|
||||
|
||||
|
||||
{
|
||||
bool empty ;
|
||||
uint32_t st ;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mHashMtx) ;
|
||||
|
||||
if(mChanged && mLastSaveTime + MIN_INTERVAL_BETWEEN_HASH_CACHE_SAVE < time(NULL))
|
||||
{
|
||||
locked_save();
|
||||
@ -136,6 +151,19 @@ void HashStorage::data_tick()
|
||||
}
|
||||
mInactivitySleepTime = DEFAULT_INACTIVITY_SLEEP_TIME;
|
||||
|
||||
bool paused = false ;
|
||||
{
|
||||
RS_STACK_MUTEX(mHashMtx) ;
|
||||
paused = mHashingProcessPaused ;
|
||||
}
|
||||
|
||||
if(paused) // we need to wait off mutex!!
|
||||
{
|
||||
usleep(MAX_INACTIVITY_SLEEP_TIME) ;
|
||||
std::cerr << "Hashing process currently paused." << std::endl;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
RS_STACK_MUTEX(mHashMtx) ;
|
||||
|
||||
|
@ -84,6 +84,8 @@ public:
|
||||
uint32_t rememberHashFilesDuration() const { return mMaxStorageDurationDays ; }
|
||||
void clear() { mFiles.clear(); mChanged=true; } // drop all known hashes. Not something to do, except if you want to rehash the entire database
|
||||
bool empty() const { return mFiles.empty() ; }
|
||||
void togglePauseHashingProcess() ;
|
||||
bool hashingProcessPaused();
|
||||
|
||||
// Functions called by the thread
|
||||
|
||||
@ -112,6 +114,7 @@ private:
|
||||
std::map<std::string, HashStorageInfo> mFiles ; // stored as (full_path, hash_info)
|
||||
std::string mFilePath ; // file where the hash database is stored
|
||||
bool mChanged ;
|
||||
bool mHashingProcessPaused ;
|
||||
|
||||
struct FileHashJob
|
||||
{
|
||||
|
@ -22,7 +22,7 @@
|
||||
* Please report all bugs and problems to "retroshare.project@gmail.com".
|
||||
*
|
||||
*/
|
||||
#include "serialiser/rsserviceids.h"
|
||||
#include "rsitems/rsserviceids.h"
|
||||
|
||||
#include "file_sharing/p3filelists.h"
|
||||
#include "file_sharing/directory_storage.h"
|
||||
@ -81,6 +81,19 @@ p3FileDatabase::p3FileDatabase(p3ServiceControl *mpeers)
|
||||
addSerialType(new RsFileListsSerialiser()) ;
|
||||
}
|
||||
|
||||
void p3FileDatabase::setIgnoreLists(const std::list<std::string>& ignored_prefixes,const std::list<std::string>& ignored_suffixes, uint32_t ignore_flags)
|
||||
{
|
||||
RS_STACK_MUTEX(mFLSMtx) ;
|
||||
mLocalDirWatcher->setIgnoreLists(ignored_prefixes,ignored_suffixes,ignore_flags) ;
|
||||
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
bool p3FileDatabase::getIgnoreLists(std::list<std::string>& ignored_prefixes,std::list<std::string>& ignored_suffixes, uint32_t& ignore_flags)
|
||||
{
|
||||
RS_STACK_MUTEX(mFLSMtx) ;
|
||||
return mLocalDirWatcher->getIgnoreLists(ignored_prefixes,ignored_suffixes,ignore_flags) ;
|
||||
}
|
||||
|
||||
RsSerialiser *p3FileDatabase::setupSerialiser()
|
||||
{
|
||||
// This one is for saveList/loadList
|
||||
@ -345,6 +358,28 @@ cleanup = true;
|
||||
|
||||
rskv->tlvkvs.pairs.push_back(kv);
|
||||
}
|
||||
{
|
||||
std::list<std::string> prefix_list,suffix_list;
|
||||
uint32_t flags ;
|
||||
|
||||
mLocalDirWatcher->getIgnoreLists(prefix_list,suffix_list,flags) ;
|
||||
|
||||
std::string prefix_string, suffix_string ;
|
||||
|
||||
for(auto it(prefix_list.begin());it!=prefix_list.end();++it) prefix_string += *it + ";" ;
|
||||
for(auto it(suffix_list.begin());it!=suffix_list.end();++it) suffix_string += *it + ";" ;
|
||||
|
||||
RsTlvKeyValue kv;
|
||||
|
||||
kv.key = IGNORED_PREFIXES_SS; kv.value = prefix_string; rskv->tlvkvs.pairs.push_back(kv);
|
||||
kv.key = IGNORED_SUFFIXES_SS; kv.value = suffix_string; rskv->tlvkvs.pairs.push_back(kv);
|
||||
|
||||
std::string s ;
|
||||
rs_sprintf(s, "%lu", flags) ;
|
||||
|
||||
kv.key = IGNORE_LIST_FLAGS_SS; kv.value = s; rskv->tlvkvs.pairs.push_back(kv);
|
||||
}
|
||||
|
||||
/* Add KeyValue to saveList */
|
||||
sList.push_back(rskv);
|
||||
|
||||
@ -363,6 +398,17 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
#endif
|
||||
|
||||
std::list<SharedDirInfo> dirList;
|
||||
std::list<std::string> ignored_prefixes,ignored_suffixes ;
|
||||
uint32_t ignore_flags = RS_FILE_SHARE_FLAGS_IGNORE_PREFIXES | RS_FILE_SHARE_FLAGS_IGNORE_SUFFIXES ;
|
||||
|
||||
// OS-dependent default ignore lists
|
||||
#ifdef WINDOWS_SYS
|
||||
ignored_suffixes.push_back( ".bak" );
|
||||
#else
|
||||
ignored_prefixes.push_back( "." );
|
||||
ignored_suffixes.push_back( "~" );
|
||||
ignored_suffixes.push_back( ".part" );
|
||||
#endif
|
||||
|
||||
for(std::list<RsItem *>::iterator it = load.begin(); it != load.end(); ++it)
|
||||
{
|
||||
@ -400,6 +446,41 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
std::cerr << "Initing directory watcher with saved secret salt..." << std::endl;
|
||||
mLocalDirWatcher->setHashSalt(RsFileHash(kit->value)) ;
|
||||
}
|
||||
else if(kit->key == IGNORED_PREFIXES_SS)
|
||||
{
|
||||
ignored_prefixes.clear();
|
||||
|
||||
std::string b ;
|
||||
for(uint32_t i=0;i<kit->value.size();++i)
|
||||
if(kit->value[i] == ';')
|
||||
{
|
||||
ignored_prefixes.push_back(b) ;
|
||||
b.clear();
|
||||
}
|
||||
else
|
||||
b.push_back(kit->value[i]) ;
|
||||
}
|
||||
else if(kit->key == IGNORED_SUFFIXES_SS)
|
||||
{
|
||||
ignored_suffixes.clear();
|
||||
|
||||
std::string b ;
|
||||
for(uint32_t i=0;i<kit->value.size();++i)
|
||||
if(kit->value[i] == ';')
|
||||
{
|
||||
ignored_suffixes.push_back(b) ;
|
||||
b.clear();
|
||||
}
|
||||
else
|
||||
b.push_back(kit->value[i]) ;
|
||||
}
|
||||
else if(kit->key == IGNORE_LIST_FLAGS_SS)
|
||||
{
|
||||
int t=0 ;
|
||||
if(sscanf(kit->value.c_str(),"%d",&t) == 1)
|
||||
ignore_flags = (uint32_t)t ;
|
||||
}
|
||||
|
||||
delete *it ;
|
||||
continue ;
|
||||
}
|
||||
@ -427,6 +508,8 @@ bool p3FileDatabase::loadList(std::list<RsItem *>& load)
|
||||
|
||||
/* set directories */
|
||||
mLocalSharedDirs->setSharedDirectoryList(dirList);
|
||||
mLocalDirWatcher->setIgnoreLists(ignored_prefixes,ignored_suffixes,ignore_flags) ;
|
||||
|
||||
load.clear() ;
|
||||
|
||||
return true;
|
||||
@ -586,10 +669,15 @@ uint32_t p3FileDatabase::locked_getFriendIndex(const RsPeerId& pid)
|
||||
#endif
|
||||
}
|
||||
|
||||
if(mRemoteDirectories.size() >= (1 << NB_FRIEND_INDEX_BITS) )
|
||||
if(sizeof(void*)==4 && mRemoteDirectories.size() >= (1u << NB_FRIEND_INDEX_BITS_32BITS) )
|
||||
{
|
||||
std::cerr << "(EE) FriendIndexTab is full. This is weird. Do you really have more than " << (1<<NB_FRIEND_INDEX_BITS) << " friends??" << std::endl;
|
||||
return 1 << NB_FRIEND_INDEX_BITS ;
|
||||
std::cerr << "(EE) FriendIndexTab is full. This is weird. Do you really have more than " << (1<<NB_FRIEND_INDEX_BITS_32BITS) << " friends??" << std::endl;
|
||||
return 1 << NB_FRIEND_INDEX_BITS_32BITS ;
|
||||
}
|
||||
else if(sizeof(void*)==8 && mRemoteDirectories.size() >= (1ull << NB_FRIEND_INDEX_BITS_64BITS) )
|
||||
{
|
||||
std::cerr << "(EE) FriendIndexTab is full. This is weird. Do you really have more than " << (1<<NB_FRIEND_INDEX_BITS_64BITS) << " friends??" << std::endl;
|
||||
return 1 << NB_FRIEND_INDEX_BITS_64BITS ;
|
||||
}
|
||||
|
||||
mFriendIndexMap[pid] = found;
|
||||
@ -617,12 +705,14 @@ uint32_t p3FileDatabase::locked_getFriendIndex(const RsPeerId& pid)
|
||||
}
|
||||
}
|
||||
|
||||
bool p3FileDatabase::convertPointerToEntryIndex(const void *p, EntryIndex& e, uint32_t& friend_index)
|
||||
template<> bool p3FileDatabase::convertPointerToEntryIndex<4>(const void *p, EntryIndex& e, uint32_t& friend_index)
|
||||
{
|
||||
// trust me, I can do this ;-)
|
||||
|
||||
e = EntryIndex( *reinterpret_cast<uint32_t*>(&p) & ENTRY_INDEX_BIT_MASK ) ;
|
||||
friend_index = (*reinterpret_cast<uint32_t*>(&p)) >> NB_ENTRY_INDEX_BITS ;
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
e = EntryIndex( *reinterpret_cast<uint32_t*>(&p) & ENTRY_INDEX_BIT_MASK_32BITS ) ;
|
||||
friend_index = (*reinterpret_cast<uint32_t*>(&p)) >> NB_ENTRY_INDEX_BITS_32BITS ;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if(friend_index == 0)
|
||||
{
|
||||
@ -633,7 +723,7 @@ bool p3FileDatabase::convertPointerToEntryIndex(const void *p, EntryIndex& e, ui
|
||||
|
||||
return true;
|
||||
}
|
||||
bool p3FileDatabase::convertEntryIndexToPointer(const EntryIndex& e, uint32_t fi, void *& p)
|
||||
template<> bool p3FileDatabase::convertEntryIndexToPointer<4>(const EntryIndex& e, uint32_t fi, void *& p)
|
||||
{
|
||||
// the pointer is formed the following way:
|
||||
//
|
||||
@ -645,23 +735,69 @@ bool p3FileDatabase::convertEntryIndexToPointer(const EntryIndex& e, uint32_t fi
|
||||
|
||||
uint32_t fe = (uint32_t)e ;
|
||||
|
||||
if(fi+1 >= (1<<NB_FRIEND_INDEX_BITS) || fe >= (1<< NB_ENTRY_INDEX_BITS))
|
||||
if(fi+1 >= (1u<<NB_FRIEND_INDEX_BITS_32BITS) || fe >= (1u<< NB_ENTRY_INDEX_BITS_32BITS))
|
||||
{
|
||||
P3FILELISTS_ERROR() << "(EE) cannot convert entry index " << e << " of friend with index " << fi << " to pointer." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
p = reinterpret_cast<void*>( ( (1+fi) << NB_ENTRY_INDEX_BITS ) + (fe & ENTRY_INDEX_BIT_MASK)) ;
|
||||
p = reinterpret_cast<void*>( ( (1u+fi) << NB_ENTRY_INDEX_BITS_32BITS ) + (fe & ENTRY_INDEX_BIT_MASK_32BITS)) ;
|
||||
|
||||
return true;
|
||||
}
|
||||
template<> bool p3FileDatabase::convertPointerToEntryIndex<8>(const void *p, EntryIndex& e, uint32_t& friend_index)
|
||||
{
|
||||
// trust me, I can do this ;-)
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
e = EntryIndex( *reinterpret_cast<uint64_t*>(&p) & ENTRY_INDEX_BIT_MASK_64BITS ) ;
|
||||
friend_index = (*reinterpret_cast<uint64_t*>(&p)) >> NB_ENTRY_INDEX_BITS_64BITS ;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if(friend_index == 0)
|
||||
{
|
||||
std::cerr << "(EE) Cannot find friend index in pointer. Encoded value is zero!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
friend_index--;
|
||||
|
||||
#ifdef DEBUG_P3FILELISTS
|
||||
std::cerr << "Generated index " << e <<" friend " << friend_index << " from pointer " << p << std::endl;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
template<> bool p3FileDatabase::convertEntryIndexToPointer<8>(const EntryIndex& e, uint32_t fi, void *& p)
|
||||
{
|
||||
// the pointer is formed the following way:
|
||||
//
|
||||
// [ 24 bits | 40 bits ]
|
||||
//
|
||||
// This means that the whoel software has the following build-in limitation:
|
||||
// * 1.6M friends
|
||||
// * 1T shared files.
|
||||
|
||||
uint64_t fe = (uint64_t)e ;
|
||||
|
||||
if(fi+1 >= (1ull<<NB_FRIEND_INDEX_BITS_64BITS) || fe >= (1ull<< NB_ENTRY_INDEX_BITS_64BITS))
|
||||
{
|
||||
P3FILELISTS_ERROR() << "(EE) cannot convert entry index " << e << " of friend with index " << fi << " to pointer." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
p = reinterpret_cast<void*>( ( (1ull+fi) << NB_ENTRY_INDEX_BITS_64BITS ) + (fe & ENTRY_INDEX_BIT_MASK_64BITS)) ;
|
||||
|
||||
#ifdef DEBUG_P3FILELISTS
|
||||
std::cerr << "Generated pointer " << p << " from friend " << fi << " and index " << e << std::endl;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
void p3FileDatabase::requestDirUpdate(void *ref)
|
||||
{
|
||||
uint32_t fi;
|
||||
DirectoryStorage::EntryIndex e ;
|
||||
|
||||
convertPointerToEntryIndex(ref,e,fi);
|
||||
convertPointerToEntryIndex<sizeof(void*)>(ref,e,fi);
|
||||
|
||||
if(fi == 0)
|
||||
return ; // not updating current directory (should we?)
|
||||
@ -690,13 +826,13 @@ bool p3FileDatabase::findChildPointer( void *ref, int row, void *& result,
|
||||
if(row != 0)
|
||||
return false ;
|
||||
|
||||
convertEntryIndexToPointer(0,0,result);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(0,0,result);
|
||||
|
||||
return true ;
|
||||
}
|
||||
else if((uint32_t)row < mRemoteDirectories.size())
|
||||
{
|
||||
convertEntryIndexToPointer(mRemoteDirectories[row]->root(),row+1,result);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(mRemoteDirectories[row]->root(),row+1,result);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -706,7 +842,7 @@ bool p3FileDatabase::findChildPointer( void *ref, int row, void *& result,
|
||||
uint32_t fi;
|
||||
DirectoryStorage::EntryIndex e ;
|
||||
|
||||
convertPointerToEntryIndex(ref,e,fi);
|
||||
convertPointerToEntryIndex<sizeof(void*)>(ref,e,fi);
|
||||
|
||||
// check consistency
|
||||
if( (fi == 0 && !(flags & RS_FILE_HINTS_LOCAL)) || (fi > 0 && (flags & RS_FILE_HINTS_LOCAL)))
|
||||
@ -721,7 +857,7 @@ bool p3FileDatabase::findChildPointer( void *ref, int row, void *& result,
|
||||
EntryIndex c = 0;
|
||||
bool res = storage->getChildIndex(e,row,c);
|
||||
|
||||
convertEntryIndexToPointer(c,fi,result) ;
|
||||
convertEntryIndexToPointer<sizeof(void*)>(c,fi,result) ;
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -785,7 +921,7 @@ int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags
|
||||
if(flags & RS_FILE_HINTS_LOCAL)
|
||||
{
|
||||
void *p;
|
||||
convertEntryIndexToPointer(0,0,p);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(0,0,p);
|
||||
|
||||
DirStub stub;
|
||||
stub.type = DIR_TYPE_PERSON;
|
||||
@ -797,7 +933,7 @@ int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags
|
||||
if(mRemoteDirectories[i] != NULL)
|
||||
{
|
||||
void *p;
|
||||
convertEntryIndexToPointer(mRemoteDirectories[i]->root(),i+1,p);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(mRemoteDirectories[i]->root(),i+1,p);
|
||||
|
||||
DirStub stub;
|
||||
stub.type = DIR_TYPE_PERSON;
|
||||
@ -818,7 +954,7 @@ int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags
|
||||
uint32_t fi;
|
||||
DirectoryStorage::EntryIndex e ;
|
||||
|
||||
convertPointerToEntryIndex(ref,e,fi);
|
||||
convertPointerToEntryIndex<sizeof(void*)>(ref,e,fi);
|
||||
|
||||
// check consistency
|
||||
if( (fi == 0 && !(flags & RS_FILE_HINTS_LOCAL)) || (fi > 0 && (flags & RS_FILE_HINTS_LOCAL)))
|
||||
@ -841,10 +977,10 @@ int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags
|
||||
// update indexes. This is a bit hacky, but does the job. The cast to intptr_t is the proper way to convert
|
||||
// a pointer into an int.
|
||||
|
||||
convertEntryIndexToPointer((intptr_t)d.ref,fi,d.ref) ;
|
||||
convertEntryIndexToPointer<sizeof(void*)>((intptr_t)d.ref,fi,d.ref) ;
|
||||
|
||||
for(uint32_t i=0;i<d.children.size();++i)
|
||||
convertEntryIndexToPointer((intptr_t)d.children[i].ref,fi,d.children[i].ref);
|
||||
convertEntryIndexToPointer<sizeof(void*)>((intptr_t)d.children[i].ref,fi,d.children[i].ref);
|
||||
|
||||
if(e == 0) // root
|
||||
{
|
||||
@ -858,7 +994,7 @@ int p3FileDatabase::RequestDirDetails(void *ref, DirDetails& d, FileSearchFlags
|
||||
else
|
||||
d.prow = storage->parentRow(e) ;
|
||||
|
||||
convertEntryIndexToPointer((intptr_t)d.parent,fi,d.parent) ;
|
||||
convertEntryIndexToPointer<sizeof(void*)>((intptr_t)d.parent,fi,d.parent) ;
|
||||
}
|
||||
|
||||
d.id = storage->peerId();
|
||||
@ -891,7 +1027,7 @@ uint32_t p3FileDatabase::getType(void *ref) const
|
||||
if(ref == NULL)
|
||||
return DIR_TYPE_ROOT ;
|
||||
|
||||
convertPointerToEntryIndex(ref,e,fi);
|
||||
convertPointerToEntryIndex<sizeof(void*)>(ref,e,fi);
|
||||
|
||||
if(e == 0)
|
||||
return DIR_TYPE_PERSON ;
|
||||
@ -908,6 +1044,16 @@ void p3FileDatabase::forceDirectoryCheck() // Force re-sweep the di
|
||||
{
|
||||
mLocalDirWatcher->forceUpdate();
|
||||
}
|
||||
void p3FileDatabase::togglePauseHashingProcess()
|
||||
{
|
||||
RS_STACK_MUTEX(mFLSMtx) ;
|
||||
mLocalDirWatcher->togglePauseHashingProcess();
|
||||
}
|
||||
bool p3FileDatabase::hashingProcessPaused()
|
||||
{
|
||||
RS_STACK_MUTEX(mFLSMtx) ;
|
||||
return mLocalDirWatcher->hashingProcessPaused();
|
||||
}
|
||||
bool p3FileDatabase::inDirectoryCheck()
|
||||
{
|
||||
RS_STACK_MUTEX(mFLSMtx) ;
|
||||
@ -961,7 +1107,7 @@ int p3FileDatabase::SearchKeywords(const std::list<std::string>& keywords, std::
|
||||
for(std::list<EntryIndex>::iterator it(firesults.begin());it!=firesults.end();++it)
|
||||
{
|
||||
void *p=NULL;
|
||||
convertEntryIndexToPointer(*it,0,p);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(*it,0,p);
|
||||
*it = (intptr_t)p ;
|
||||
}
|
||||
}
|
||||
@ -985,7 +1131,7 @@ int p3FileDatabase::SearchKeywords(const std::list<std::string>& keywords, std::
|
||||
for(std::list<EntryIndex>::iterator it(local_results.begin());it!=local_results.end();++it)
|
||||
{
|
||||
void *p=NULL;
|
||||
convertEntryIndexToPointer(*it,i+1,p);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(*it,i+1,p);
|
||||
firesults.push_back((intptr_t)p) ;
|
||||
}
|
||||
}
|
||||
@ -1019,7 +1165,7 @@ int p3FileDatabase::SearchBoolExp(RsRegularExpression::Expression *exp, std::lis
|
||||
for(std::list<EntryIndex>::iterator it(firesults.begin());it!=firesults.end();++it)
|
||||
{
|
||||
void *p=NULL;
|
||||
convertEntryIndexToPointer(*it,0,p);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(*it,0,p);
|
||||
*it = (intptr_t)p ;
|
||||
}
|
||||
}
|
||||
@ -1043,7 +1189,7 @@ int p3FileDatabase::SearchBoolExp(RsRegularExpression::Expression *exp, std::lis
|
||||
for(std::list<EntryIndex>::iterator it(local_results.begin());it!=local_results.end();++it)
|
||||
{
|
||||
void *p=NULL;
|
||||
convertEntryIndexToPointer(*it,i+1,p);
|
||||
convertEntryIndexToPointer<sizeof(void*)>(*it,i+1,p);
|
||||
firesults.push_back((intptr_t)p) ;
|
||||
}
|
||||
|
||||
@ -1073,9 +1219,8 @@ bool p3FileDatabase::search(const RsFileHash &hash, FileSearchFlags hintflags, F
|
||||
RsFileHash real_hash ;
|
||||
EntryIndex indx;
|
||||
|
||||
if(!mLocalSharedDirs->searchHash(hash,real_hash,indx))
|
||||
return false;
|
||||
|
||||
if(mLocalSharedDirs->searchHash(hash,real_hash,indx))
|
||||
{
|
||||
mLocalSharedDirs->getFileInfo(indx,info) ;
|
||||
|
||||
if(!real_hash.isNull())
|
||||
@ -1086,11 +1231,27 @@ bool p3FileDatabase::search(const RsFileHash &hash, FileSearchFlags hintflags, F
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(hintflags & RS_FILE_HINTS_REMOTE)
|
||||
{
|
||||
NOT_IMPLEMENTED();
|
||||
return false;
|
||||
EntryIndex indx;
|
||||
bool found = false ;
|
||||
|
||||
for(uint32_t i=0;i<mRemoteDirectories.size();++i)
|
||||
if(mRemoteDirectories[i] != NULL && mRemoteDirectories[i]->searchHash(hash,indx))
|
||||
{
|
||||
TransferInfo ti ;
|
||||
ti.peerId = mRemoteDirectories[i]->peerId();
|
||||
|
||||
info.hash = hash ;
|
||||
info.peers.push_back(ti) ;
|
||||
|
||||
found = true ;
|
||||
}
|
||||
|
||||
if(found)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1193,6 +1354,7 @@ void p3FileDatabase::tickRecv()
|
||||
{
|
||||
RsFileListsSyncResponseItem *sitem = dynamic_cast<RsFileListsSyncResponseItem*>(item);
|
||||
handleDirSyncResponse(sitem) ;
|
||||
item = sitem ;
|
||||
}
|
||||
break ;
|
||||
default:
|
||||
|
@ -127,6 +127,9 @@ class p3FileDatabase: public p3Service, public p3Config, public ftSearch //, pub
|
||||
void updateShareFlags(const SharedDirInfo& info) ;
|
||||
bool convertSharedFilePath(const std::string& path,std::string& fullpath);
|
||||
|
||||
void setIgnoreLists(const std::list<std::string>& ignored_prefixes,const std::list<std::string>& ignored_suffixes, uint32_t ignore_flags) ;
|
||||
bool getIgnoreLists(std::list<std::string>& ignored_prefixes,std::list<std::string>& ignored_suffixes, uint32_t& ignore_flags) ;
|
||||
|
||||
// computes/gathers statistics about shared directories
|
||||
|
||||
int getSharedDirStatistics(const RsPeerId& pid,SharedDirStats& stats);
|
||||
@ -145,6 +148,8 @@ class p3FileDatabase: public p3Service, public p3Config, public ftSearch //, pub
|
||||
|
||||
void forceDirectoryCheck(); // Force re-sweep the directories and see what's changed
|
||||
bool inDirectoryCheck();
|
||||
void togglePauseHashingProcess();
|
||||
bool hashingProcessPaused();
|
||||
|
||||
protected:
|
||||
|
||||
@ -200,8 +205,9 @@ class p3FileDatabase: public p3Service, public p3Config, public ftSearch //, pub
|
||||
|
||||
// utility functions to make/get a pointer out of an (EntryIndex,PeerId) pair. This is further documented in the .cc
|
||||
|
||||
static bool convertEntryIndexToPointer(const EntryIndex &e, uint32_t friend_index, void *& p);
|
||||
static bool convertPointerToEntryIndex(const void *p, EntryIndex& e, uint32_t& friend_index) ;
|
||||
template<int BYTES> static bool convertEntryIndexToPointer(const EntryIndex &e, uint32_t friend_index, void *& p);
|
||||
template<int BYTES> static bool convertPointerToEntryIndex(const void *p, EntryIndex& e, uint32_t& friend_index) ;
|
||||
|
||||
uint32_t locked_getFriendIndex(const RsPeerId& pid);
|
||||
|
||||
void handleDirSyncRequest (RsFileListsSyncRequestItem *) ;
|
||||
|
@ -24,342 +24,41 @@
|
||||
*/
|
||||
#include "serialiser/rsbaseserial.h"
|
||||
|
||||
#include "serialiser/rstypeserializer.h"
|
||||
|
||||
#include "file_sharing/rsfilelistitems.h"
|
||||
|
||||
RsItem* RsFileListsSerialiser::deserialise(void *data, uint32_t *size)
|
||||
void RsFileListsSyncRequestItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::deserialise()" << std::endl;
|
||||
#endif
|
||||
/* get the type and size */
|
||||
uint32_t rstype = getRsItemId(data);
|
||||
RsTypeSerializer::serial_process (j,ctx,entry_hash,"entry_hash") ;
|
||||
RsTypeSerializer::serial_process<uint32_t>(j,ctx,flags ,"flags") ;
|
||||
RsTypeSerializer::serial_process<uint32_t>(j,ctx,last_known_recurs_modf_TS,"last_known_recurs_modf_TS") ;
|
||||
RsTypeSerializer::serial_process<uint64_t>(j,ctx,request_id,"request_id") ;
|
||||
}
|
||||
void RsFileListsSyncResponseItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
RsTypeSerializer::serial_process (j,ctx,entry_hash,"entry_hash") ;
|
||||
RsTypeSerializer::serial_process (j,ctx,checksum,"checksum") ;
|
||||
RsTypeSerializer::serial_process<uint32_t> (j,ctx,flags ,"flags") ;
|
||||
RsTypeSerializer::serial_process<uint32_t> (j,ctx,last_known_recurs_modf_TS,"last_known_recurs_modf_TS") ;
|
||||
RsTypeSerializer::serial_process<uint64_t> (j,ctx,request_id,"request_id") ;
|
||||
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,directory_content_data,"directory_content_data") ;
|
||||
}
|
||||
|
||||
if ((RS_PKT_VERSION_SERVICE != getRsItemVersion(rstype)) || (getRsItemService(rstype) != RS_SERVICE_TYPE_FILE_DATABASE))
|
||||
return NULL; /* wrong type */
|
||||
RsItem *RsFileListsSerialiser::create_item(uint16_t service,uint8_t type) const
|
||||
{
|
||||
if(service != RS_SERVICE_TYPE_FILE_DATABASE)
|
||||
return NULL ;
|
||||
|
||||
switch(getRsItemSubType(rstype))
|
||||
switch(type)
|
||||
{
|
||||
case RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM: return deserialFileListsSyncRequestItem(data, size);
|
||||
case RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM: return deserialFileListsSyncResponseItem(data, size);
|
||||
// case RS_PKT_SUBTYPE_FILELISTS_CONFIG_ITEM: return deserialFileListsConfigItem (data, size);
|
||||
|
||||
case RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM: return new RsFileListsSyncRequestItem();
|
||||
case RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM: return new RsFileListsSyncResponseItem();
|
||||
default:
|
||||
{
|
||||
std::cerr << "(WW) RsFileListsSerialiser::deserialise() : unhandled item type " << getRsItemSubType(rstype) << std::endl;
|
||||
return NULL;
|
||||
|
||||
return NULL ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t RsFileListsSerialiser::size(RsItem *item)
|
||||
{
|
||||
RsFileListsItem *flst_item = dynamic_cast<RsFileListsItem*>(item) ;
|
||||
|
||||
if(flst_item != NULL)
|
||||
return flst_item->serial_size() ;
|
||||
else
|
||||
{
|
||||
std::cerr << "RsFileListsSerialiser::serialise(): Not an RsFileListsItem!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool RsFileListsSerialiser::serialise(RsItem *item, void *data, uint32_t *size)
|
||||
{
|
||||
RsFileListsItem *flst_item = dynamic_cast<RsFileListsItem*>(item) ;
|
||||
|
||||
if(flst_item != NULL)
|
||||
return flst_item->serialise(data,*size) ;
|
||||
else
|
||||
{
|
||||
std::cerr << "RsFileListsSerialiser::serialise(): Not an RsFileListsItem!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool RsFileListsItem::serialise_header(void *data,uint32_t& pktsize,uint32_t& tlvsize, uint32_t& offset) const
|
||||
{
|
||||
tlvsize = serial_size() ;
|
||||
offset = 0;
|
||||
|
||||
if (pktsize < tlvsize)
|
||||
return false; /* not enough space */
|
||||
|
||||
pktsize = tlvsize;
|
||||
|
||||
if(!setRsItemHeader(data, tlvsize, PacketId(), tlvsize))
|
||||
{
|
||||
std::cerr << "RsFileTransferItem::serialise_header(): ERROR. Not enough size!" << std::endl;
|
||||
return false ;
|
||||
}
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileItemSerialiser::serialiseData() Header: " << ok << std::endl;
|
||||
#endif
|
||||
offset += 8;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool RsFileListsSyncRequestItem::serialise(void *data, uint32_t& size) const
|
||||
{
|
||||
uint32_t tlvsize,offset=0;
|
||||
bool ok = true;
|
||||
|
||||
if(!serialise_header(data,size,tlvsize,offset))
|
||||
return false ;
|
||||
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::serialiseFileListsSyncReqItem()" << std::endl;
|
||||
#endif
|
||||
|
||||
/* RsFileListsSyncMsgItem */
|
||||
|
||||
ok &= entry_hash.serialise(data, size, offset);
|
||||
ok &= setRawUInt32(data, size, &offset, flags );
|
||||
ok &= setRawUInt32(data, size, &offset, last_known_recurs_modf_TS);
|
||||
ok &= setRawUInt64(data, size, &offset, request_id);
|
||||
|
||||
if(offset != tlvsize){
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::serialiseNxsSynMsgItem() FAIL Size Error! " << std::endl;
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
if (!ok)
|
||||
{
|
||||
std::cerr << "RsFileListsSerialiser::serialiseNxsSynMsgItem() NOK" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool RsFileListsSyncResponseItem::serialise(void *data, uint32_t& size) const
|
||||
{
|
||||
uint32_t tlvsize,offset=0;
|
||||
bool ok = true;
|
||||
|
||||
if(!serialise_header(data,size,tlvsize,offset))
|
||||
return false ;
|
||||
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::serialiseFileListsSyncReqItem()" << std::endl;
|
||||
#endif
|
||||
|
||||
/* RsFileListsSyncMsgItem */
|
||||
|
||||
ok &= entry_hash.serialise(data, size, offset);
|
||||
ok &= checksum.serialise(data, size, offset);
|
||||
ok &= setRawUInt32(data, size, &offset, flags );
|
||||
ok &= setRawUInt32(data, size, &offset, last_known_recurs_modf_TS);
|
||||
ok &= setRawUInt64(data, size, &offset, request_id);
|
||||
ok &= directory_content_data.SetTlv(data,size,&offset) ;
|
||||
|
||||
if(offset != tlvsize){
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::serialiseNxsSynMsgItem() FAIL Size Error! " << std::endl;
|
||||
#endif
|
||||
ok = false;
|
||||
}
|
||||
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
if (!ok)
|
||||
{
|
||||
std::cerr << "RsFileListsSerialiser::serialiseNxsSynMsgItem() NOK" << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
//============================================================================================================================//
|
||||
// Deserialisation //
|
||||
//============================================================================================================================//
|
||||
|
||||
//RsFileListsConfigItem* RsFileListsSerialiser::deserialFileListsConfigItem(void *data, uint32_t *size)
|
||||
//{
|
||||
// NOT_IMPLEMENTED();
|
||||
//
|
||||
// return NULL ;
|
||||
//}
|
||||
|
||||
RsFileListsSyncRequestItem* RsFileListsSerialiser::deserialFileListsSyncRequestItem(void *data, uint32_t *size)
|
||||
{
|
||||
bool ok = checkItemHeader(data,size,RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM);
|
||||
uint32_t offset = 8;
|
||||
|
||||
RsFileListsSyncRequestItem* item = new RsFileListsSyncRequestItem();
|
||||
|
||||
ok &= item->entry_hash.deserialise(data, *size, offset);
|
||||
ok &= getRawUInt32(data, *size, &offset, &item->flags);
|
||||
ok &= getRawUInt32(data, *size, &offset, &item->last_known_recurs_modf_TS);
|
||||
ok &= getRawUInt64(data, *size, &offset, &item->request_id);
|
||||
|
||||
if (offset != *size)
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::deserialNxsGrp() FAIL size mismatch" << std::endl;
|
||||
#endif
|
||||
/* error */
|
||||
delete item;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::deserialNxsGrp() NOK" << std::endl;
|
||||
#endif
|
||||
delete item;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
RsFileListsSyncResponseItem* RsFileListsSerialiser::deserialFileListsSyncResponseItem(void *data, uint32_t *size)
|
||||
{
|
||||
bool ok = checkItemHeader(data,size,RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM);
|
||||
uint32_t offset = 8;
|
||||
|
||||
RsFileListsSyncResponseItem* item = new RsFileListsSyncResponseItem();
|
||||
|
||||
/*
|
||||
uint32_t entry_index ; // index of the directory to sync
|
||||
uint32_t flags; // used to say that it's a request or a response, say that the directory has been removed, ask for further update, etc.
|
||||
uint32_t last_known_recurs_modf_TS; // time of last modification, computed over all files+directories below.
|
||||
uint64_t request_id; // use to determine if changes that have occured since last hash
|
||||
*/
|
||||
|
||||
ok &= item->entry_hash.deserialise(data, *size, offset);
|
||||
ok &= item->checksum.deserialise(data, *size, offset);
|
||||
ok &= getRawUInt32(data, *size, &offset, &item->flags);
|
||||
ok &= getRawUInt32(data, *size, &offset, &item->last_known_recurs_modf_TS);
|
||||
ok &= getRawUInt64(data, *size, &offset, &item->request_id);
|
||||
|
||||
ok &= item->directory_content_data.GetTlv(data,*size,&offset) ;
|
||||
|
||||
if (offset != *size)
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::deserialNxsGrp() FAIL size mismatch" << std::endl;
|
||||
#endif
|
||||
/* error */
|
||||
delete item;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::deserialNxsGrp() NOK" << std::endl;
|
||||
#endif
|
||||
delete item;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
bool RsFileListsSerialiser::checkItemHeader(void *data,uint32_t *size,uint8_t subservice_type)
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::checkItemHeader()" << std::endl;
|
||||
#endif
|
||||
/* get the type and size */
|
||||
uint32_t rstype = getRsItemId(data);
|
||||
uint32_t rssize = getRsItemSize(data);
|
||||
|
||||
if ((RS_PKT_VERSION_SERVICE != getRsItemVersion(rstype)) || (RS_SERVICE_TYPE_FILE_DATABASE != getRsItemService(rstype)) || (subservice_type != getRsItemSubType(rstype)))
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::checkItemHeader() FAIL wrong type" << std::endl;
|
||||
#endif
|
||||
return false; /* wrong type */
|
||||
}
|
||||
|
||||
if (*size < rssize) /* check size */
|
||||
{
|
||||
#ifdef RSSERIAL_DEBUG
|
||||
std::cerr << "RsFileListsSerialiser::checkItemHeader() FAIL wrong size" << std::endl;
|
||||
#endif
|
||||
return false; /* not enough data */
|
||||
}
|
||||
|
||||
/* set the packet length */
|
||||
*size = rssize;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//============================================================================================================================//
|
||||
// Sizes //
|
||||
//============================================================================================================================//
|
||||
|
||||
uint32_t RsFileListsSyncRequestItem::serial_size()const
|
||||
{
|
||||
|
||||
uint32_t s = 8; //header size
|
||||
|
||||
s += RsFileHash::serial_size(); // entry hash
|
||||
s += 4; // flags
|
||||
s += 4; // last_known_recurs_modf_TS
|
||||
s += 8; // request_id
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
uint32_t RsFileListsSyncResponseItem::serial_size()const
|
||||
{
|
||||
|
||||
uint32_t s = 8; //header size
|
||||
|
||||
s += RsFileHash::serial_size(); // entry hash
|
||||
s += RsFileHash::serial_size(); // checksum
|
||||
s += 4; // flags
|
||||
s += 4; // last_known_recurs_modf_TS
|
||||
s += 8; // request_id
|
||||
s += directory_content_data.TlvSize();
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
void RsFileListsSyncRequestItem::clear()
|
||||
{
|
||||
}
|
||||
void RsFileListsSyncResponseItem::clear()
|
||||
{
|
||||
directory_content_data.TlvClear();
|
||||
}
|
||||
std::ostream& RsFileListsSyncRequestItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsFileListsSyncReqItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
printIndent(out , int_Indent); out << "Entry hash: " << entry_hash << std::endl;
|
||||
printIndent(out , int_Indent); out << "Flags: " << (uint32_t) flags << std::endl;
|
||||
printIndent(out , int_Indent); out << "Last modf TS: " << last_known_recurs_modf_TS << std::endl;
|
||||
printIndent(out , int_Indent); out << "request id: " << std::hex << request_id << std::dec << std::endl;
|
||||
|
||||
printRsItemEnd(out ,"RsFileListsSyncReqItem", indent);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
std::ostream& RsFileListsSyncResponseItem::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsFileListsSyncDirItem", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
printIndent(out , int_Indent); out << "Entry hash: " << entry_hash << std::endl;
|
||||
printIndent(out , int_Indent); out << "Checksum : " << checksum << std::endl;
|
||||
printIndent(out , int_Indent); out << "Flags: " << (uint32_t) flags << std::endl;
|
||||
printIndent(out , int_Indent); out << "Last modf TS: " << last_known_recurs_modf_TS << std::endl;
|
||||
printIndent(out , int_Indent); out << "request id: " << std::hex << request_id << std::dec << std::endl;
|
||||
printIndent(out , int_Indent); out << "Data size: " << directory_content_data.bin_len << std::endl;
|
||||
|
||||
printRsItemEnd(out ,"RsFileListsSyncDirItem", indent);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -27,13 +27,16 @@
|
||||
#include <map>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#include "serialiser/rsserviceids.h"
|
||||
#include "rsitems/rsserviceids.h"
|
||||
#include "rsitems/itempriorities.h"
|
||||
#include "serialiser/rsserial.h"
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "serialiser/rstlvitem.h"
|
||||
#include "serialiser/rstlvkeys.h"
|
||||
#include "gxs/rsgxsdata.h"
|
||||
|
||||
#include "serialiser/rsserializer.h"
|
||||
|
||||
// These items have "flag type" numbers, but this is not used.
|
||||
|
||||
const uint8_t RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM = 0x01;
|
||||
@ -54,12 +57,7 @@ public:
|
||||
}
|
||||
virtual ~RsFileListsItem(){}
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) const = 0 ;
|
||||
virtual uint32_t serial_size() const = 0 ;
|
||||
virtual void clear() = 0;
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent = 0) = 0;
|
||||
|
||||
bool serialise_header(void *data,uint32_t& pktsize,uint32_t& tlvsize, uint32_t& offset) const;
|
||||
|
||||
static const uint32_t FLAGS_SYNC_REQUEST = 0x0001 ;
|
||||
static const uint32_t FLAGS_SYNC_RESPONSE = 0x0002 ;
|
||||
@ -79,11 +77,9 @@ public:
|
||||
|
||||
RsFileListsSyncRequestItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_SYNC_REQ_ITEM) {}
|
||||
|
||||
virtual void clear();
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
||||
virtual void clear(){}
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) const;
|
||||
virtual uint32_t serial_size() const ;
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
RsFileHash entry_hash ; // hash of the directory to sync
|
||||
uint32_t flags; // used to say that it's a request or a response, say that the directory has been removed, ask for further update, etc.
|
||||
@ -98,10 +94,8 @@ public:
|
||||
RsFileListsSyncResponseItem() : RsFileListsItem(RS_PKT_SUBTYPE_FILELISTS_SYNC_RSP_ITEM) {}
|
||||
|
||||
virtual void clear();
|
||||
virtual std::ostream &print(std::ostream &out, uint16_t indent);
|
||||
|
||||
virtual bool serialise(void *data,uint32_t& size) const;
|
||||
virtual uint32_t serial_size() const ;
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
RsFileHash entry_hash ; // hash of the directory to sync
|
||||
RsFileHash checksum ; // checksum of the bindary data, for checking
|
||||
@ -112,24 +106,15 @@ public:
|
||||
RsTlvBinaryData directory_content_data ; // encoded binary data. This allows to vary the encoding format, in a way that is transparent to the serialiser.
|
||||
};
|
||||
|
||||
class RsFileListsSerialiser : public RsSerialType
|
||||
class RsFileListsSerialiser : public RsServiceSerializer
|
||||
{
|
||||
public:
|
||||
|
||||
RsFileListsSerialiser() : RsSerialType(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_FILE_DATABASE) {}
|
||||
RsFileListsSerialiser() : RsServiceSerializer(RS_SERVICE_TYPE_FILE_DATABASE) {}
|
||||
|
||||
virtual ~RsFileListsSerialiser() {}
|
||||
|
||||
virtual uint32_t size(RsItem *item);
|
||||
virtual bool serialise(RsItem *item, void *data, uint32_t *size);
|
||||
virtual RsItem* deserialise(void *data, uint32_t *size);
|
||||
|
||||
private:
|
||||
RsFileListsSyncRequestItem *deserialFileListsSyncRequestItem(void *data, uint32_t *size); /* RS_PKT_SUBTYPE_SYNC_GRP */
|
||||
RsFileListsSyncResponseItem *deserialFileListsSyncResponseItem(void *data, uint32_t *size); /* RS_PKT_SUBTYPE_SYNC_GRP */
|
||||
// RsFileListsSyncResponseItem *deserialFileListsConfigItem (void *data, uint32_t *size); /* RS_PKT_SUBTYPE_SYNC_GRP */
|
||||
|
||||
bool checkItemHeader(void *data, uint32_t *size, uint8_t subservice_type);
|
||||
virtual RsItem *create_item(uint16_t service,uint8_t type) const ;
|
||||
};
|
||||
|
||||
|
||||
|
@ -188,6 +188,7 @@ void ChunkMap::updateTotalDownloaded()
|
||||
switch(_map[i])
|
||||
{
|
||||
case FileChunksInfo::CHUNK_CHECKING: _file_is_complete = false ;
|
||||
/* fallthrough */
|
||||
case FileChunksInfo::CHUNK_DONE: _total_downloaded += sizeOfChunk(i) ;
|
||||
break ;
|
||||
default:
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
|
||||
#include "serialiser/rsconfigitems.h"
|
||||
#include "rsitems/rsconfigitems.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h> /* for (u)sleep() */
|
||||
#include <time.h>
|
||||
@ -75,6 +75,7 @@ static const int32_t INACTIVE_CHUNKS_CHECK_DELAY = 240 ; // time after which an
|
||||
static const int32_t MAX_TIME_INACTIVE_REQUEUED = 120 ; // time after which an inactive ftFileControl is bt-queued
|
||||
|
||||
static const int32_t FT_FILECONTROL_QUEUE_ADD_END = 0 ;
|
||||
static const int32_t FT_FILECONTROL_MAX_UPLOAD_SLOTS_DEFAULT= 0 ;
|
||||
|
||||
const uint32_t FT_CNTRL_STANDARD_RATE = 10 * 1024 * 1024;
|
||||
const uint32_t FT_CNTRL_SLOW_RATE = 100 * 1024;
|
||||
@ -101,20 +102,24 @@ ftController::ftController(ftDataMultiplex *dm, p3ServiceControl *sc, uint32_t f
|
||||
: p3Config(),
|
||||
last_save_time(0),
|
||||
last_clean_time(0),
|
||||
mSearch(NULL),
|
||||
mDataplex(dm),
|
||||
mExtraList(NULL),
|
||||
mTurtle(NULL),
|
||||
mFtServer(NULL),
|
||||
mServiceCtrl(sc),
|
||||
mFtServiceType(ftServiceId),
|
||||
mDefaultEncryptionPolicy(RS_FILE_CTRL_ENCRYPTION_POLICY_PERMISSIVE),
|
||||
mFilePermDirectDLPolicy(RS_FILE_PERM_DIRECT_DL_PER_USER),
|
||||
cnt(0),
|
||||
ctrlMutex("ftController"),
|
||||
doneMutex("ftController"),
|
||||
mFtActive(false),
|
||||
mDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE)
|
||||
mFtPendingDone(false),
|
||||
mDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE),
|
||||
_max_active_downloads(5), // default queue size
|
||||
_max_uploads_per_friend(FT_FILECONTROL_MAX_UPLOAD_SLOTS_DEFAULT)
|
||||
{
|
||||
_max_active_downloads = 5 ; // default queue size
|
||||
mDefaultEncryptionPolicy = RS_FILE_CTRL_ENCRYPTION_POLICY_PERMISSIVE;
|
||||
/* TODO */
|
||||
cnt = 0 ;
|
||||
}
|
||||
|
||||
void ftController::setTurtleRouter(p3turtle *pt) { mTurtle = pt ; }
|
||||
@ -217,8 +222,8 @@ void ftController::data_tick()
|
||||
usleep(1*1000*1000); // 1 sec
|
||||
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::run()";
|
||||
std::cerr << std::endl;
|
||||
//std::cerr << "ftController::run()";
|
||||
//std::cerr << std::endl;
|
||||
#endif
|
||||
bool doPending = false;
|
||||
{
|
||||
@ -229,14 +234,14 @@ void ftController::data_tick()
|
||||
time_t now = time(NULL) ;
|
||||
if(now > last_save_time + SAVE_TRANSFERS_DELAY)
|
||||
{
|
||||
searchForDirectSources() ;
|
||||
|
||||
IndicateConfigChanged() ;
|
||||
last_save_time = now ;
|
||||
}
|
||||
|
||||
if(now > last_clean_time + INACTIVE_CHUNKS_CHECK_DELAY)
|
||||
{
|
||||
searchForDirectSources() ;
|
||||
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
|
||||
for(std::map<RsFileHash,ftFileControl*>::iterator it(mDownloads.begin());it!=mDownloads.end();++it)
|
||||
@ -275,19 +280,51 @@ void ftController::data_tick()
|
||||
|
||||
void ftController::searchForDirectSources()
|
||||
{
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::searchForDirectSources()" << std::endl;
|
||||
#endif
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
|
||||
for(std::map<RsFileHash,ftFileControl*>::iterator it(mDownloads.begin()); it != mDownloads.end(); ++it)
|
||||
if(it->second->mState != ftFileControl::QUEUED && it->second->mState != ftFileControl::PAUSED)
|
||||
if (!mSearch)
|
||||
{
|
||||
FileInfo info ; // info needs to be re-allocated each time, to start with a clear list of peers (it's not cleared down there)
|
||||
|
||||
if(mSearch->search(it->first, RS_FILE_HINTS_REMOTE | RS_FILE_HINTS_SPEC_ONLY, info))
|
||||
for(std::list<TransferInfo>::const_iterator pit = info.peers.begin(); pit != info.peers.end(); ++pit)
|
||||
if(rsPeers->servicePermissionFlags(pit->peerId) & RS_NODE_PERM_DIRECT_DL)
|
||||
if(it->second->mTransfer->addFileSource(pit->peerId)) /* if the sources don't exist already - add in */
|
||||
setPeerState(it->second->mTransfer, pit->peerId, FT_CNTRL_STANDARD_RATE, mServiceCtrl->isPeerConnected(mFtServiceType, pit->peerId));
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << " search module not available!" << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
for(std::map<RsFileHash,ftFileControl*>::iterator it(mDownloads.begin()); it != mDownloads.end(); ++it )
|
||||
if(it->second->mState != ftFileControl::QUEUED && it->second->mState != ftFileControl::PAUSED )
|
||||
{
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << " file " << it->first << ":" << std::endl;
|
||||
#endif
|
||||
FileInfo info ; // Info needs to be re-allocated each time, to start with a clear list of peers (it's not cleared down there)
|
||||
|
||||
if( mSearch->search(it->first, RS_FILE_HINTS_REMOTE | RS_FILE_HINTS_SPEC_ONLY, info) )
|
||||
for( std::list<TransferInfo>::const_iterator pit = info.peers.begin(); pit != info.peers.end(); ++pit )
|
||||
{
|
||||
bool bAllowDirectDL = false;
|
||||
switch (mFilePermDirectDLPolicy) {
|
||||
case RS_FILE_PERM_DIRECT_DL_YES: bAllowDirectDL = true; break;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO: bAllowDirectDL = false; break;
|
||||
default:bAllowDirectDL = (rsPeers->servicePermissionFlags(pit->peerId) & RS_NODE_PERM_DIRECT_DL); break;
|
||||
}
|
||||
if( bAllowDirectDL )
|
||||
if( it->second->mTransfer->addFileSource(pit->peerId) ) /* if the sources don't exist already - add in */
|
||||
setPeerState( it->second->mTransfer, pit->peerId, FT_CNTRL_STANDARD_RATE, mServiceCtrl->isPeerConnected(mFtServiceType, pit->peerId) );
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << " found source " << pit->peerId << ", allowDirectDL=" << bAllowDirectDL << ". " << (bAllowDirectDL?"adding":"not adding") << std::endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef CONTROL_DEBUG
|
||||
else
|
||||
std::cerr << " search returned empty.: " << std::endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef CONTROL_DEBUG
|
||||
else
|
||||
std::cerr << " file " << it->first << ": state is " << it->second->mState << ": ignored." << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
void ftController::tickTransfers()
|
||||
@ -297,7 +334,7 @@ void ftController::tickTransfers()
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ticking transfers." << std::endl ;
|
||||
// std::cerr << "ticking transfers." << std::endl ;
|
||||
#endif
|
||||
// Collect all non queued files.
|
||||
//
|
||||
@ -746,6 +783,7 @@ bool ftController::completeFile(const RsFileHash& hash)
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
if(mExtraList)
|
||||
mExtraList->addExtraFile(path, hash, size, period, extraflags);
|
||||
}
|
||||
else
|
||||
@ -788,14 +826,15 @@ bool ftController::isActiveAndNoPending()
|
||||
|
||||
bool ftController::handleAPendingRequest()
|
||||
{
|
||||
uint32_t nb_requests_handled = 0 ;
|
||||
static const uint32_t MAX_SIMULTANEOUS_PENDING_REQUESTS = 100 ;
|
||||
|
||||
while(!mPendingRequests.empty() && nb_requests_handled++ < MAX_SIMULTANEOUS_PENDING_REQUESTS)
|
||||
{
|
||||
ftPendingRequest req;
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
|
||||
if (mPendingRequests.size() < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
req = mPendingRequests.front();
|
||||
mPendingRequests.pop_front();
|
||||
}
|
||||
@ -842,8 +881,8 @@ bool ftController::handleAPendingRequest()
|
||||
std::cerr << "No pending chunkmap for hash " << req.mHash << std::endl ;
|
||||
#endif
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
return !mPendingRequests.empty();
|
||||
}
|
||||
|
||||
bool ftController::alreadyHaveFile(const RsFileHash& hash, FileInfo &info)
|
||||
@ -853,6 +892,7 @@ bool ftController::alreadyHaveFile(const RsFileHash& hash, FileInfo &info)
|
||||
return true ;
|
||||
|
||||
// check for file lists
|
||||
if (!mSearch) return false;
|
||||
if (mSearch->search(hash, RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_SPEC_ONLY, info))
|
||||
return true ;
|
||||
|
||||
@ -943,15 +983,24 @@ bool ftController::FileRequest(const std::string& fname, const RsFileHash& hash
|
||||
// remove the sources from the list, if they don't have clearance for direct transfer. This happens only for non cache files.
|
||||
//
|
||||
for(std::list<RsPeerId>::iterator it = srcIds.begin(); it != srcIds.end(); )
|
||||
if(!(rsPeers->servicePermissionFlags(*it) & RS_NODE_PERM_DIRECT_DL))
|
||||
{
|
||||
std::list<RsPeerId>::iterator tmp(it) ;
|
||||
++tmp ;
|
||||
srcIds.erase(it) ;
|
||||
it = tmp ;
|
||||
bool bAllowDirectDL = false;
|
||||
switch (mFilePermDirectDLPolicy) {
|
||||
case RS_FILE_PERM_DIRECT_DL_YES: bAllowDirectDL = true; break;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO: bAllowDirectDL = false; break;
|
||||
default:bAllowDirectDL = (rsPeers->servicePermissionFlags(*it) & RS_NODE_PERM_DIRECT_DL); break;
|
||||
}
|
||||
|
||||
if(!bAllowDirectDL)
|
||||
{
|
||||
std::list<RsPeerId>::iterator tmp(it);
|
||||
++tmp;
|
||||
srcIds.erase(it);
|
||||
it = tmp;
|
||||
}
|
||||
else
|
||||
++it ;
|
||||
++it;
|
||||
}
|
||||
|
||||
std::list<RsPeerId>::const_iterator it;
|
||||
std::list<TransferInfo>::const_iterator pit;
|
||||
@ -999,7 +1048,14 @@ bool ftController::FileRequest(const std::string& fname, const RsFileHash& hash
|
||||
*/
|
||||
|
||||
for(it = srcIds.begin(); it != srcIds.end(); ++it)
|
||||
if(rsPeers->servicePermissionFlags(*it) & RS_NODE_PERM_DIRECT_DL)
|
||||
{
|
||||
bool bAllowDirectDL = false;
|
||||
switch (mFilePermDirectDLPolicy) {
|
||||
case RS_FILE_PERM_DIRECT_DL_YES: bAllowDirectDL = true; break;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO: bAllowDirectDL = false; break;
|
||||
default:bAllowDirectDL = (rsPeers->servicePermissionFlags(*it) & RS_NODE_PERM_DIRECT_DL); break;
|
||||
}
|
||||
if(bAllowDirectDL)
|
||||
{
|
||||
uint32_t i, j;
|
||||
if ((dit->second)->mTransfer->getPeerState(*it, i, j))
|
||||
@ -1018,6 +1074,7 @@ bool ftController::FileRequest(const std::string& fname, const RsFileHash& hash
|
||||
(dit->second)->mTransfer->addFileSource(*it);
|
||||
setPeerState(dit->second->mTransfer, *it, rate, mServiceCtrl->isPeerConnected(mFtServiceType, *it));
|
||||
}
|
||||
}
|
||||
|
||||
if (srcIds.empty())
|
||||
{
|
||||
@ -1032,7 +1089,7 @@ bool ftController::FileRequest(const std::string& fname, const RsFileHash& hash
|
||||
} /******* UNLOCKED ********/
|
||||
|
||||
|
||||
if(!(flags & RS_FILE_REQ_NO_SEARCH))
|
||||
if(mSearch && !(flags & RS_FILE_REQ_NO_SEARCH))
|
||||
{
|
||||
/* do a source search - for any extra sources */
|
||||
// add sources only in direct mode
|
||||
@ -1054,7 +1111,14 @@ bool ftController::FileRequest(const std::string& fname, const RsFileHash& hash
|
||||
#endif
|
||||
// Because this is auto-add, we only add sources that we allow to DL from using direct transfers.
|
||||
|
||||
if ((srcIds.end() == std::find( srcIds.begin(), srcIds.end(), pit->peerId)) && (RS_NODE_PERM_DIRECT_DL & rsPeers->servicePermissionFlags(pit->peerId)))
|
||||
bool bAllowDirectDL = false;
|
||||
switch (mFilePermDirectDLPolicy) {
|
||||
case RS_FILE_PERM_DIRECT_DL_YES: bAllowDirectDL = true; break;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO: bAllowDirectDL = false; break;
|
||||
default:bAllowDirectDL = (rsPeers->servicePermissionFlags(pit->peerId) & RS_NODE_PERM_DIRECT_DL); break;
|
||||
}
|
||||
|
||||
if ((srcIds.end() == std::find( srcIds.begin(), srcIds.end(), pit->peerId)) && bAllowDirectDL)
|
||||
{
|
||||
srcIds.push_back(pit->peerId);
|
||||
|
||||
@ -1723,9 +1787,11 @@ void ftController::statusChange(const std::list<pqiServicePeer> &plist)
|
||||
const std::string active_downloads_size_ss("MAX_ACTIVE_DOWNLOADS");
|
||||
const std::string download_dir_ss("DOWN_DIR");
|
||||
const std::string partial_dir_ss("PART_DIR");
|
||||
const std::string max_uploads_per_friend_ss("MAX_UPLOADS_PER_FRIEND");
|
||||
const std::string default_chunk_strategy_ss("DEFAULT_CHUNK_STRATEGY");
|
||||
const std::string free_space_limit_ss("FREE_SPACE_LIMIT");
|
||||
const std::string default_encryption_policy_ss("DEFAULT_ENCRYPTION_POLICY");
|
||||
const std::string file_perm_direct_dl_ss("FILE_PERM_DIRECT_DL");
|
||||
|
||||
|
||||
/* p3Config Interface */
|
||||
@ -1771,8 +1837,20 @@ bool ftController::saveList(bool &cleanup, std::list<RsItem *>& saveData)
|
||||
break ;
|
||||
}
|
||||
|
||||
rs_sprintf(s,"%lu",_max_uploads_per_friend) ;
|
||||
configMap[max_uploads_per_friend_ss] = s ;
|
||||
|
||||
configMap[default_encryption_policy_ss] = (mDefaultEncryptionPolicy==RS_FILE_CTRL_ENCRYPTION_POLICY_PERMISSIVE)?"PERMISSIVE":"STRICT" ;
|
||||
|
||||
switch (mFilePermDirectDLPolicy) {
|
||||
case RS_FILE_PERM_DIRECT_DL_YES: configMap[file_perm_direct_dl_ss] = "YES" ;
|
||||
break;
|
||||
case RS_FILE_PERM_DIRECT_DL_NO: configMap[file_perm_direct_dl_ss] = "NO" ;
|
||||
break;
|
||||
default: configMap[file_perm_direct_dl_ss] = "PER_USER" ;
|
||||
break;
|
||||
}
|
||||
|
||||
rs_sprintf(s, "%lu", RsDiscSpace::freeSpaceLimit());
|
||||
configMap[free_space_limit_ss] = s ;
|
||||
|
||||
@ -1937,7 +2015,8 @@ bool ftController::loadList(std::list<RsItem *>& load)
|
||||
/* This will get stored on a waiting list - until the
|
||||
* config files are fully loaded
|
||||
*/
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
(csoler) I removed this because RS_FILE_HINTS_NETWORK_WIDE is actually equal to RS_FILE_REQ_ENCRYPTED, so this test removed the encrypted flag when loading!!
|
||||
// Compatibility with previous versions.
|
||||
if(rsft->flags & RS_FILE_HINTS_NETWORK_WIDE.toUInt32())
|
||||
{
|
||||
@ -1945,6 +2024,7 @@ bool ftController::loadList(std::list<RsItem *>& load)
|
||||
rsft->flags &= ~RS_FILE_HINTS_NETWORK_WIDE.toUInt32() ;
|
||||
rsft->flags |= RS_FILE_REQ_ANONYMOUS_ROUTING.toUInt32() ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController::loadList(): requesting " << rsft->file.name << ", " << rsft->file.hash << ", " << rsft->file.filesize << std::endl ;
|
||||
@ -1989,9 +2069,9 @@ bool ftController::loadConfigMap(std::map<std::string, std::string> &configMap)
|
||||
{
|
||||
std::map<std::string, std::string>::iterator mit;
|
||||
|
||||
std::string str_true("true");
|
||||
std::string empty("");
|
||||
std::string dir = "notempty";
|
||||
//std::string str_true("true");
|
||||
//std::string empty("");
|
||||
//std::string dir = "notempty";
|
||||
|
||||
if (configMap.end() != (mit = configMap.find(download_dir_ss)))
|
||||
setDownloadDirectory(mit->second);
|
||||
@ -2057,9 +2137,49 @@ bool ftController::loadConfigMap(std::map<std::string, std::string> &configMap)
|
||||
RsDiscSpace::setFreeSpaceLimit(size) ;
|
||||
}
|
||||
}
|
||||
if(configMap.end() != (mit = configMap.find(max_uploads_per_friend_ss)))
|
||||
{
|
||||
uint32_t n ;
|
||||
if (sscanf(mit->second.c_str(), "%u", &n) == 1) {
|
||||
std::cerr << "have read a max upload slots limit of " << n << std::endl ;
|
||||
|
||||
_max_uploads_per_friend = n ;
|
||||
}
|
||||
}
|
||||
|
||||
if(configMap.end() != (mit = configMap.find(file_perm_direct_dl_ss)))
|
||||
{
|
||||
if(mit->second == "YES")
|
||||
{
|
||||
mFilePermDirectDLPolicy = RS_FILE_PERM_DIRECT_DL_YES ;
|
||||
std::cerr << "Note: loading default value for file permission direct download: YES" << std::endl;
|
||||
}
|
||||
else if(mit->second == "NO")
|
||||
{
|
||||
mFilePermDirectDLPolicy = RS_FILE_PERM_DIRECT_DL_NO ;
|
||||
std::cerr << "Note: loading default value for file permission direct download: NO" << std::endl;
|
||||
}
|
||||
else if(mit->second == "PER_USER")
|
||||
{
|
||||
mFilePermDirectDLPolicy = RS_FILE_PERM_DIRECT_DL_PER_USER ;
|
||||
std::cerr << "Note: loading default value for file permission direct download: PER_USER" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ftController::setMaxUploadsPerFriend(uint32_t m)
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
_max_uploads_per_friend = m ;
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
uint32_t ftController::getMaxUploadsPerFriend()
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
return _max_uploads_per_friend ;
|
||||
}
|
||||
void ftController::setDefaultEncryptionPolicy(uint32_t p)
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
@ -2071,6 +2191,22 @@ uint32_t ftController::defaultEncryptionPolicy()
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
return mDefaultEncryptionPolicy ;
|
||||
}
|
||||
|
||||
void ftController::setFilePermDirectDL(uint32_t perm)
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
if (mFilePermDirectDLPolicy != perm)
|
||||
{
|
||||
mFilePermDirectDLPolicy = perm;
|
||||
IndicateConfigChanged();
|
||||
}
|
||||
}
|
||||
uint32_t ftController::filePermDirectDL()
|
||||
{
|
||||
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/
|
||||
return mFilePermDirectDLPolicy;
|
||||
}
|
||||
|
||||
void ftController::setFreeDiskSpaceLimit(uint32_t size_in_mb)
|
||||
{
|
||||
RsDiscSpace::setFreeSpaceLimit(size_in_mb) ;
|
||||
|
@ -53,7 +53,7 @@ class p3ServiceControl;
|
||||
#include "pqi/p3cfgmgr.h"
|
||||
|
||||
#include "retroshare/rsfiles.h"
|
||||
#include "serialiser/rsconfigitems.h"
|
||||
#include "rsitems/rsconfigitems.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -146,6 +146,12 @@ class ftController: public RsTickingThread, public pqiServiceMonitor, public p3C
|
||||
void setFreeDiskSpaceLimit(uint32_t size_in_mb) ;
|
||||
uint32_t defaultEncryptionPolicy();
|
||||
|
||||
void setMaxUploadsPerFriend(uint32_t m) ;
|
||||
uint32_t getMaxUploadsPerFriend() ;
|
||||
|
||||
void setFilePermDirectDL(uint32_t perm) ;
|
||||
uint32_t filePermDirectDL() ;
|
||||
|
||||
bool FileCancel(const RsFileHash& hash);
|
||||
bool FileControl(const RsFileHash& hash, uint32_t flags);
|
||||
bool FileClearCompleted();
|
||||
@ -234,7 +240,8 @@ class ftController: public RsTickingThread, public pqiServiceMonitor, public p3C
|
||||
ftServer *mFtServer ;
|
||||
p3ServiceControl *mServiceCtrl;
|
||||
uint32_t mFtServiceType;
|
||||
uint32_t mDefaultEncryptionPolicy ;
|
||||
uint32_t mDefaultEncryptionPolicy;
|
||||
uint32_t mFilePermDirectDLPolicy;
|
||||
|
||||
uint32_t cnt ;
|
||||
RsMutex ctrlMutex;
|
||||
@ -262,6 +269,7 @@ class ftController: public RsTickingThread, public pqiServiceMonitor, public p3C
|
||||
FileChunksInfo::ChunkStrategy mDefaultChunkStrategy ;
|
||||
|
||||
uint32_t _max_active_downloads ; // maximum number of simultaneous downloads
|
||||
uint32_t _max_uploads_per_friend ; // maximum number of uploads per friend. 0 means unlimited.
|
||||
};
|
||||
|
||||
#endif
|
||||
|