Skip to content
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

Merged
merged 4 commits into from Aug 31, 2012

Conversation

Harutyun
Copy link

Reviewers: David L.

Changelog:

  • fixed an issue with buffer clear
  • fixed issues 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 corresponding callbacks are
    called
  • make sure error callback is not called
  • make sure when you press button it sends data to the client

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');

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);
}

@dlifshitz-maca
Copy link

Reviewed

@Harutyun
Copy link
Author

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;

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)

@dlifshitz-maca
Copy link

Reviewed.
As discussed, this still needs to be addressed: #142 (comment)

@Harutyun
Copy link
Author

patch is updated

@dlifshitz-maca
Copy link

Approved

Harutyun pushed a commit that referenced this pull request Aug 31, 2012
TIMOB-10638: BlackBerry: Cannot read from Socket.TCP
@Harutyun Harutyun merged commit 4d255d2 into Macadamian:blackberry Aug 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants