mirror of
https://github.com/danog/php-libtgvoip.git
synced 2024-11-30 04:19:26 +01:00
fixes
This commit is contained in:
parent
f8894e8c1f
commit
25b6565a8c
2
Makefile
2
Makefile
@ -10,7 +10,7 @@
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
|
||||
COMPILER_FLAGS = -Wall -O3 -I/usr/include/opus -I/usr/include/openssl -Ilibtgvoip/webrtc_dsp -c -std=c++11 -fpic -DANDROID -finline-functions -ffast-math -Os -fno-strict-aliasing -DUSE_KISS_FFT -DFIXED_POINT -DTGVOIP_USE_CUSTOM_CRYPTO -DPHP_LIBTGVOIP -DWEBRTC_POSIX -DTGVOIP_USE_DESKTOP_DSP -o
|
||||
COMPILER_FLAGS = -Wall -O0 -I/usr/include/opus -I/usr/include/openssl/ -Ilibtgvoip/webrtc_dsp -c -std=c++11 -fpic -DANDROID -finline-functions -ffast-math -Os -fno-strict-aliasing -DUSE_KISS_FFT -DFIXED_POINT -DPHP_LIBTGVOIP -DWEBRTC_POSIX -DTGVOIP_USE_DESKTOP_DSP -g -o
|
||||
#COMPILER_FLAGS = -Wall -c -O2 -std=c++11 -fpic -I/usr/include/opus -o
|
||||
LINKER_FLAGS = -shared
|
||||
LINKER_DEPENDENCIES = -lphpcpp -I/usr/include/opus
|
||||
|
@ -4,5 +4,7 @@ WIP
|
||||
|
||||
This is a PHP extension that wraps the [telegram VoIP library](https://github.com/grishka/libtgvoip), created using php-cpp.
|
||||
|
||||
This library requires the libopus headers, openssl headers (OpenSSL_1_0_1-stable) and the php-cpp headers.
|
||||
|
||||
It is licensed under AGPLV3.
|
||||
|
||||
|
5
main.cpp
5
main.cpp
@ -70,8 +70,9 @@ public:
|
||||
inst->Connect();
|
||||
}
|
||||
void setEncryptionKey(Php::Parameters ¶ms) {
|
||||
char *key = strdup(params[0]);
|
||||
inst->SetEncryptionKey(key, params[1]);
|
||||
char key[256];
|
||||
memcpy(key, (const char *) params[0], 256);
|
||||
inst->SetEncryptionKey(key, (bool) params[1]);
|
||||
free(key);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user