rhoconnect-client 5.5.0.22 → 5.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/rhoconnect-client/ext/shared/sync/ClientRegister.cpp +14 -19
- data/ext/rhoconnect-client/ext/shared/sync/ISyncProtocol.h +1 -1
- data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_3.h +1 -1
- data/ext/rhoconnect-client/ext/shared/sync/SyncProtocol_4.h +1 -12
- data/ext/rhoconnect-client/ext/shared/sync/SyncSource.cpp +0 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d85fe275d20b5e252bc6a2c8a1fa47c07f64e7f
|
4
|
+
data.tar.gz: 083ae8b533f16f59ba9f15111c0176c8a7312f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3b2bc0337f2a50eedbdaf2b0345a2155bdf30737c84f67cfdfe2d5a75f309feec3e8d6fdeaf7143f276b9121ef0b0cb2eb6a1fc027817df4df40d8c2a7a33de
|
7
|
+
data.tar.gz: 8b80b3e17e5e8225aed80f1ef38732560a5285f9f9c4878a6566513300efbe8af1ad5c93a62d2fda443cd90c555b5b9062082c04a1b1f5c49b3113c01431007f
|
@@ -239,12 +239,9 @@ String CClientRegister::getRegisterBody(const String& strClientID)
|
|
239
239
|
|
240
240
|
int port = RHOCONF().getInt("push_port");
|
241
241
|
|
242
|
-
String appId = RHOCONF().getString("rho_app_id");
|
243
|
-
String appVer = RHOCONF().getString("app_version");
|
244
|
-
|
245
242
|
String body = CSyncThread::getSyncEngine().getProtocol().getClientRegisterBody( strClientID, m_strDevicePin,
|
246
243
|
port > 0 ? port : DEFAULT_PUSH_PORT, rho_rhodesapp_getplatform(), rho::System::getPhoneId(),
|
247
|
-
strPushType
|
244
|
+
strPushType);
|
248
245
|
|
249
246
|
LOG(INFO)+"getRegisterBody() BODY is: " + body;
|
250
247
|
return body;
|
@@ -252,7 +249,7 @@ String CClientRegister::getRegisterBody(const String& strClientID)
|
|
252
249
|
|
253
250
|
String CClientRegister::getUnregisterBody(const String& strClientID)
|
254
251
|
{
|
255
|
-
String body = CSyncThread::getSyncEngine().getProtocol().getClientRegisterBody( strClientID, "", 0, "", "", ""
|
252
|
+
String body = CSyncThread::getSyncEngine().getProtocol().getClientRegisterBody( strClientID, "", 0, "", "", "" );
|
256
253
|
LOG(INFO)+"getUnregisterBody() BODY is: " + body;
|
257
254
|
return body;
|
258
255
|
}
|
@@ -282,21 +279,19 @@ boolean CClientRegister::doRegister(CSyncEngine& oSync)
|
|
282
279
|
LOG(WARNING)+"Sync client_id is empty, do register later";
|
283
280
|
return false;
|
284
281
|
}
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
int token_sent = res.getIntByIdx(1) && !RHOCONF().getBool("register_push_at_startup");
|
291
|
-
|
292
|
-
if ( m_strDevicePin.compare(token) == 0 && token_sent > 0 )
|
293
|
-
{
|
294
|
-
//token in db same as new one and it was already send to the server
|
295
|
-
//so we do nothing
|
282
|
+
|
283
|
+
IDBResult res = CDBAdapter::getUserDB().executeSQL("SELECT token,token_sent from client_info");
|
284
|
+
if ( !res.isEnd() ) {
|
285
|
+
String token = res.getStringByIdx(0);
|
286
|
+
int token_sent = res.getIntByIdx(1) && !RHOCONF().getBool("register_push_at_startup");
|
296
287
|
|
297
|
-
|
298
|
-
|
299
|
-
|
288
|
+
if ( m_strDevicePin.compare(token) == 0 && token_sent > 0 )
|
289
|
+
{
|
290
|
+
//token in db same as new one and it was already send to the server
|
291
|
+
//so we do nothing
|
292
|
+
|
293
|
+
return true;
|
294
|
+
}
|
300
295
|
}
|
301
296
|
|
302
297
|
String strBody = getRegisterBody(client_id);
|
@@ -68,7 +68,7 @@ struct ISyncProtocol
|
|
68
68
|
virtual String getClientCreateUrl() = 0;
|
69
69
|
|
70
70
|
virtual String getClientRegisterUrl(const String& strClientID) = 0;
|
71
|
-
virtual String getClientRegisterBody(const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType = ""
|
71
|
+
virtual String getClientRegisterBody(const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType = "") = 0;
|
72
72
|
virtual String getClientAnsRegisterBody(const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID ) = 0;
|
73
73
|
|
74
74
|
virtual const char* getClientResetMethod() = 0;
|
@@ -98,7 +98,7 @@ struct CSyncProtocol_3 : public ISyncProtocol
|
|
98
98
|
return RHOCONF().getPath("syncserver") + "clientregister";
|
99
99
|
}
|
100
100
|
|
101
|
-
String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType
|
101
|
+
String getClientRegisterBody( const String& strClientID, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType)
|
102
102
|
{
|
103
103
|
return "{\"client_id\":" + json::CJSONEntry::quoteValue(strClientID) +
|
104
104
|
",\"device_pin\":" + json::CJSONEntry::quoteValue(strPin) +
|
@@ -121,16 +121,7 @@ struct CSyncProtocol_4 : public ISyncProtocol
|
|
121
121
|
return RHOCONF().getPath("syncserver") + getClientNamespaceUrl() + strClientID + "/register";
|
122
122
|
}
|
123
123
|
|
124
|
-
String getClientRegisterBody(
|
125
|
-
const String& /*strClientID*/,
|
126
|
-
const String& strPin,
|
127
|
-
int nPort,
|
128
|
-
const String& strType,
|
129
|
-
const String& strPhoneID,
|
130
|
-
const String& strDevicePushType,
|
131
|
-
const String& strAppId,
|
132
|
-
const String& strAppVersion
|
133
|
-
)
|
124
|
+
String getClientRegisterBody( const String& /*strClientID*/, const String& strPin, int nPort, const String& strType, const String& strPhoneID, const String& strDevicePushType)
|
134
125
|
{
|
135
126
|
String strPort = "";
|
136
127
|
if (nPort != 0) {
|
@@ -142,8 +133,6 @@ struct CSyncProtocol_4 : public ISyncProtocol
|
|
142
133
|
",\"device_port\":" + json::CJSONEntry::quoteValue(strPort) +
|
143
134
|
",\"device_type\":" + json::CJSONEntry::quoteValue(strType) +
|
144
135
|
",\"device_push_type\":" + json::CJSONEntry::quoteValue(strDevicePushType) +
|
145
|
-
",\"device_app_id\":" + json::CJSONEntry::quoteValue(strAppId) +
|
146
|
-
",\"device_app_version\":" + json::CJSONEntry::quoteValue(strAppVersion) +
|
147
136
|
"}";
|
148
137
|
}
|
149
138
|
|
@@ -327,13 +327,7 @@ void CSyncSource::doSyncClientChanges()
|
|
327
327
|
int i = 0;
|
328
328
|
|
329
329
|
getDB().Lock();
|
330
|
-
|
331
|
-
// add file.blob attrib_type for blob attribs in changed_values
|
332
|
-
getDB().updateAllBlobAttribChanges();
|
333
|
-
|
334
|
-
// unpack object in changed_values with update_type==create to set of objects's attribs
|
335
330
|
getDB().updateAllAttribChanges();
|
336
|
-
|
337
331
|
checkIgnorePushObjects();
|
338
332
|
if ( getSync().getSourceOptions().getBoolProperty(getID(), "full_update") )
|
339
333
|
getDB().updateFullUpdateChanges( getID() );
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhoconnect-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rhomobile Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RhoConnect client extension
|
14
14
|
email: rhomobile@googlegroups.com
|