Skip to content

Commit

Permalink
patch: by @teamgram
Browse files Browse the repository at this point in the history
  • Loading branch information
wubenqi committed Jul 21, 2022
1 parent eb42ec9 commit b328483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TMessagesProj/jni/TgNetWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,16 @@ void bindRequestToGuid(JNIEnv *env, jclass c, jint instanceNum, jint requestToke
}

void applyDatacenterAddress(JNIEnv *env, jclass c, jint instanceNum, jint datacenterId, jstring ipAddress, jint port) {
// FIXME(@teamgram)
#if 0
const char *valueStr = env->GetStringUTFChars(ipAddress, 0);

ConnectionsManager::getInstance(instanceNum).applyDatacenterAddress((uint32_t) datacenterId, std::string(valueStr), (uint32_t) port);

if (valueStr != 0) {
env->ReleaseStringUTFChars(ipAddress, valueStr);
}
#endif
}

void setProxySettings(JNIEnv *env, jclass c, jint instanceNum, jstring address, jint port, jstring username, jstring password, jstring secret) {
Expand Down Expand Up @@ -223,12 +226,15 @@ void setPushConnectionEnabled(JNIEnv *env, jclass c, jint instanceNum, jboolean
}

void applyDnsConfig(JNIEnv *env, jclass c, jint instanceNum, jlong address, jstring phone, jint date) {
// FIXME(@teamgram)
#if 0
const char *phoneStr = env->GetStringUTFChars(phone, 0);

ConnectionsManager::getInstance(instanceNum).applyDnsConfig((NativeByteBuffer *) (intptr_t) address, phoneStr, date);
if (phoneStr != 0) {
env->ReleaseStringUTFChars(phone, phoneStr);
}
#endif
}

jlong checkProxy(JNIEnv *env, jclass c, jint instanceNum, jstring address, jint port, jstring username, jstring password, jstring secret, jobject requestTimeFunc) {
Expand Down
2 changes: 2 additions & 0 deletions b.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home:$JAVA_HOME"
export PATH="/Applications/Android Studio.app/Contents/jre/Contents/Home/bin:$PATH"

0 comments on commit b328483

Please sign in to comment.