Skip to content

Commit

Permalink
fix sample build fail
Browse files Browse the repository at this point in the history
  • Loading branch information
garryyan committed Aug 1, 2019
1 parent 3b272e9 commit 59ca8eb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
8 changes: 6 additions & 2 deletions mars/build_osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

GEN_OSX_PROJ = 'cmake ../.. -G Xcode -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 -DENABLE_BITCODE=0'


def build_osx(tag=''):
gen_mars_revision_file('comm', tag)

Expand All @@ -29,8 +28,13 @@ def build_osx(tag=''):
print('!!!!!!!!!!!build fail!!!!!!!!!!!!!!!')
return False

ssl_lib = 'openssl/openssl_lib_osx/libssl.a'
crypto_lib = 'openssl/openssl_lib_osx/libcrypto.a'
libtool_os_dst_lib = INSTALL_PATH + '/mars'
if not libtool_libs(glob.glob(INSTALL_PATH + '/*.a'), libtool_os_dst_lib):
libtool_src_libs = glob.glob(INSTALL_PATH + '/*.a')
libtool_src_libs.append(ssl_lib)
libtool_src_libs.append(crypto_lib)
if not libtool_libs(libtool_src_libs, libtool_os_dst_lib):
return False

dst_framework_path = INSTALL_PATH + '/mars.framework'
Expand Down
4 changes: 2 additions & 2 deletions samples/Mac/PublicComponentV2/stn_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class StnCallBack : public Callback {
static StnCallBack* Instance();
static void Release();

virtual bool MakesureAuthed();
virtual bool MakesureAuthed(const std::string& _host);

//流量统计
virtual void TrafficData(ssize_t _send, ssize_t _recv);
Expand All @@ -50,7 +50,7 @@ class StnCallBack : public Callback {
//网络层收到push消息回调
virtual void OnPush(uint64_t _channel_id, uint32_t _cmdid, uint32_t _taskid, const AutoBuffer& _body, const AutoBuffer& _extend);
//底层获取task要发送的数据
virtual bool Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select);
virtual bool Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select, const std::string& host);
//底层回包返回给上层解析
virtual int Buf2Resp(uint32_t _taskid, void* const _user_context, const AutoBuffer& _inbuffer, const AutoBuffer& _extend, int& _error_code, const int _channel_select);
//任务执行结束
Expand Down
4 changes: 2 additions & 2 deletions samples/Mac/PublicComponentV2/stn_callback.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
instance_ = NULL;
}

bool StnCallBack::MakesureAuthed() {
bool StnCallBack::MakesureAuthed(const std::string& _host) {
return true;
}

Expand All @@ -58,7 +58,7 @@
}
}

bool StnCallBack::Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select) {
bool StnCallBack::Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select, const std::string& host) {
NSData* requestData = [[NetworkService sharedInstance] Request2BufferWithTaskID:_taskid userContext:_user_context];
if (requestData == nil) {
requestData = [[NSData alloc] init];
Expand Down
4 changes: 2 additions & 2 deletions samples/iOS/iOSDemo/PublicComponentV2/stn_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class StnCallBack : public Callback {
static StnCallBack* Instance();
static void Release();

virtual bool MakesureAuthed();
virtual bool MakesureAuthed(const std::string& _host);

//流量统计
virtual void TrafficData(ssize_t _send, ssize_t _recv);
Expand All @@ -50,7 +50,7 @@ class StnCallBack : public Callback {
//网络层收到push消息回调
virtual void OnPush(uint64_t _channel_id, uint32_t _cmdid, uint32_t _taskid, const AutoBuffer& _body, const AutoBuffer& _extend);
//底层获取task要发送的数据
virtual bool Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& _outbuffer, AutoBuffer& _extend, int& _error_code, const int _channel_select);
virtual bool Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& _outbuffer, AutoBuffer& _extend, int& _error_code, const int _channel_select, const std::string& host);
//底层回包返回给上层解析
virtual int Buf2Resp(uint32_t _taskid, void* const _user_context, const AutoBuffer& _inbuffer, const AutoBuffer& _extend, int& _error_code, const int _channel_select);
//任务执行结束
Expand Down
4 changes: 2 additions & 2 deletions samples/iOS/iOSDemo/PublicComponentV2/stn_callback.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
instance_ = NULL;
}

bool StnCallBack::MakesureAuthed() {
bool StnCallBack::MakesureAuthed(const std::string& host) {
return true;
}

Expand All @@ -61,7 +61,7 @@

}

bool StnCallBack::Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& _outbuffer, AutoBuffer& _extend, int& _error_code, const int _channel_select) {
bool StnCallBack::Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& _outbuffer, AutoBuffer& _extend, int& _error_code, const int _channel_select, const std::string& host) {
NSData* requestData = [[NetworkService sharedInstance] Request2BufferWithTaskID:_taskid userContext:_user_context];
if (requestData == nil) {
requestData = [[NSData alloc] init];
Expand Down

0 comments on commit 59ca8eb

Please sign in to comment.