Skip to content

Commit

Permalink
fix wild pointer in xlog(pub_key)
Browse files Browse the repository at this point in the history
  • Loading branch information
garryyan committed Oct 12, 2017
1 parent f685e74 commit 3b06da5
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 17 deletions.
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Add dependencies by adding the following lines to your app/build.gradle.

```xml
dependencies {
compile 'com.tencent.mars:mars-wrapper:1.1.7'
compile 'com.tencent.mars:mars-wrapper:1.1.8'
}
```

Expand All @@ -53,11 +53,20 @@ Add dependencies by adding the following lines to your app/build.gradle.

```xml
dependencies {
compile 'com.tencent.mars:mars-core:1.2.0'
compile 'com.tencent.mars:mars-core:1.2.1'
}
```
**OR**
#### <a name="">mars-xlog</a>
If you just want to user xlog, add dependencies by adding the following lines to your app/build.gradle.
note: xlog is included in mars-core and mars-wrapper.
```xml
dependencies {
compile 'com.tencent.mars:mars-xlog:1.0.6'
}
```

If you read here, make sure you have added dependencies of mars-wrapper or mars-core.
If you read here, make sure you have added dependencies of mars-wrapper, mars-core or mars-xlog.

#### <a name="Xlog">Xlog Init</a>

Expand Down Expand Up @@ -414,7 +423,7 @@ gradle 接入我们提供了两种接入方式:[mars-wrapper](#wrapper) 或者

```xml
dependencies {
compile 'com.tencent.mars:mars-wrapper:1.1.7'
compile 'com.tencent.mars:mars-wrapper:1.1.8'
}
```

Expand All @@ -427,10 +436,18 @@ dependencies {

```xml
dependencies {
compile 'com.tencent.mars:mars-core:1.2.0, '
compile 'com.tencent.mars:mars-core:1.2.1'
}
```
**或者**
#### <a name="">mars-xlog</a>
如果只想使用 xlog,可以只加 xlog 的依赖(mars-core,mars-wrapper 中都已经包括 xlog):
```xml
dependencies {
compile 'com.tencent.mars:mars-xlog:1.0.6'
}
```
接着往下操作之前,请先确保你已经添加了 mars-wrapper 或者 mars-core 的依赖
接着往下操作之前,请先确保你已经添加了 mars-wrapper 或者 mars-core 或者 mars-xlog 的依赖

#### <a name="Xlog">Xlog Init</a>

Expand Down
8 changes: 4 additions & 4 deletions mars/comm/verinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#ifndef Mars_verinfo_h
#define Mars_verinfo_h

#define MARS_REVISION "053db13"
#define MARS_PATH "HEAD"
#define MARS_REVISION "f685e74"
#define MARS_PATH "master"
#define MARS_URL ""
#define MARS_BUILD_TIME "2017-02-15 09:51:04"
#define MARS_TAG "default"
#define MARS_BUILD_TIME "2017-10-12 18:37:49"
#define MARS_TAG "mars_xlog_sdk/mars_libs"

#endif
2 changes: 1 addition & 1 deletion mars/libraries/mars_android_sdk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJ_GROUP=com.tencent.mars
# 库的ID
PROJ_ARTIFACTID=mars-core
# 库的版本
PROJ_VERSION=1.2.0
PROJ_VERSION=1.2.1
### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION

# 库名
Expand Down
2 changes: 1 addition & 1 deletion mars/libraries/mars_xlog_sdk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJ_GROUP=com.tencent.mars
# 库的ID
PROJ_ARTIFACTID=mars-xlog
# 库的版本
PROJ_VERSION=1.0.5
PROJ_VERSION=1.0.6
### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION

# 库名
Expand Down
3 changes: 2 additions & 1 deletion mars/log/jni/Java2C_Xlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ JNIEXPORT void JNICALL Java_com_tencent_mars_xlog_Xlog_appenderOpen
}

const char* pubkey = NULL;
ScopedJstring jstr_pubkey(env, _pubkey);
if (NULL != _pubkey) {
pubkey = ScopedJstring(env, _pubkey).GetChar();
pubkey = jstr_pubkey.GetChar();
}

ScopedJstring log_dir_jstr(env, _log_dir);
Expand Down
4 changes: 2 additions & 2 deletions samples/android/marsSampleChat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ subprojects {

ext {
GROUP = 'com.tencent.mars.sample'
VERSION_NAME_PREFIX = '1.2.0'
VERSION_NAME_PREFIX = '1.2.1'
VERSION_NAME_SUFFIX = '' // '-SNAPSHOT'
WRAPPER_VERSION_NAME_PREFIX = '1.1.7'
WRAPPER_VERSION_NAME_PREFIX = '1.1.8'
WRAPPER_VERSION_NAME_SUFFIX = '' // '-SNAPSHOT'

minSdkVersion = 16
Expand Down
2 changes: 1 addition & 1 deletion samples/android/marsSampleChat/wrapper/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PROJ_GROUP=com.tencent.mars
# 库的ID
PROJ_ARTIFACTID=mars-wrapper
# 库的版本
PROJ_VERSION=1.1.7
PROJ_VERSION=1.1.8
### 最后 gradle引用的形式就是 $PROJ_GROUP:$PROJ_ARTIFACTID:$PROJ_VERSION

# 库名
Expand Down
2 changes: 1 addition & 1 deletion samples/android/xlogSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ task clean(type: Delete) {

ext {
GROUP = 'com.tencent.mars'
VERSION_NAME = '1.0.5'
VERSION_NAME = '1.0.6'
VERSION_NAME_SUFFIX = ''
}

0 comments on commit 3b06da5

Please sign in to comment.