New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-10638: BlackBerry: Cannot read from Socket.TCP #142
Conversation
Reviewers: David C. Changelog: - Fixed an issue with buffer clear - fix issue with TCP socket call backs (All the callbacks were called whenever one of them should be called) - refactor TCP socket callbacks Test Cases: - make sure you can successfully build tibb and tibbtest - use app.js (as server) and client.js (as client) js files attached to jira task - run app on emulator - run client.js with node - make sure client and server received data and connected call back is called - make sure error callback is not called - make sure when you press button it sends data to the client Test Case
int size = internalData_.size(); | ||
internalData_.clear(); | ||
internalData_.resize(size); | ||
internalData_.fill('\0'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also make sure there are \0
in setLength. I'm thinking something like this:
int oldSize = internalData_.size();
if (lengthValue > oldSize)
{
internalData_.append(QByteArray(lengthValue - oldSize, '\0'));
}
else
{
internalData_.truncate(lengthValue);
}
Reviewed |
patch is updated |
@@ -89,6 +89,9 @@ class NativeProxyObject: public NativeObject | |||
// Ti event types (tet) | |||
static const char* tetCHANGE; | |||
static const char* tetCLICK; | |||
static const char* tetCONNECTED; | |||
static const char* tetACCEPTED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix order (sorry I missed this one)
Reviewed. |
patch is updated |
Approved |
TIMOB-10638: BlackBerry: Cannot read from Socket.TCP
Reviewers: David L.
Changelog:
whenever one of them should be called)
Test Cases:
jira task
called