Page 2 of 2
Posted: 14 Jul 2009, 08:51
by stager
Hi!
Yet another set of small bugs in Beta2:
1. INFSmartFoxiPhoneClient.m in sendXtMessage:cmd:paramObj:type:roomId: at line 1234 format string should be @"%@xt%@%@%@%@%@%d%@", not @"%@xt%@%@%@%@%@%@%@". because roomId is NSInteger, not an object.
2. INFSmartFoxiPhoneClient.m There is a problem with _blueBoxIpAddress member memory management. In loadConfig:autoConnect: it is aliased
with _ipAddress at line 703 and may be overwritten later at line 708. This makes correct deallocation of _blueBoxIpAddress impossible. Besides that neither _blueBoxIpAddress nor _ipAddress are deallocated in dealloc call.
Good luck!
Posted: 14 Jul 2009, 09:10
by cemuzunlar
stager wrote:
1. INFSmartFoxiPhoneClient.m in sendXtMessage:cmd:paramObj:type:roomId: at line 1234 format string should be @"%@xt%@%@%@%@%@%d%@", not @"%@xt%@%@%@%@%@%@%@". because roomId is NSInteger, not an object.
2. INFSmartFoxiPhoneClient.m There is a problem with _blueBoxIpAddress member memory management. In loadConfig:autoConnect: it is aliased
with _ipAddress at line 703 and may be overwritten later at line 708. This makes correct deallocation of _blueBoxIpAddress impossible. Besides that neither _blueBoxIpAddress nor _ipAddress are deallocated in dealloc call.
3. "[doc release];" call is missing in INFSmartFoxExtHandler.m in
handleMessage:type:delegate:
Thanks for reporting.
These will be fixed in the next release.
Posted: 15 Jul 2009, 07:32
by stager
Hello!
Small bug in INFSmartFoxObjectSerializer.m in
xml2obj:resObj: method: if received string is empty, it causes a problem at line 215, while trying to insert
nil value into dictionary. I think that fix is simple - just check if
varVal is nil and assign
varValue an empty string instead of nil. Something like this:
Code: Select all
--- SmartFox.orig/Source/Util/INFSmartFoxObjectSerializer.m 2009-07-14 13:56:56.000000000 +0300
+++ SmartFox/Source/Util/INFSmartFoxObjectSerializer.m 2009-07-14 13:59:24.000000000 +0300
@@ -205,7 +205,12 @@
varValue = [NSNumber numberWithInteger:[varVal integerValue]];
}
else if ([varType isEqualToString:@"s"]) {
- varValue = varVal;
+ if (varVal != nil) {
+ varValue = varVal;
+ }
+ else {
+ varValue = @"";
+ }
}
else if ([varType isEqualToString:@"x"]) {
varValue = [NSNull null];
Good luck!
PS: what is prefered way to send bug reports and/or patches? Is it ok to post it here, or it would be better to send reports/patches by e-mail?
Posted: 12 Oct 2009, 21:50
by pankajnagarkoti86
In handlePrivateMessage the parameters being sent to onPrivateMessage will often stop after the sender param.
more iphone api bugs
Posted: 22 Oct 2009, 09:40
by aw2xcd
INSmartFoxiPhoneClient.m function strReceived() line 333 should be changed from:
Code: Select all
[handler handleMessage:[msgStr substringWithRange:NSMakeRange(1, [msgStr length]-1)] type:(NSString *)INFSMARTFOXCLIENT_XTMSG_TYPE_STR delegate:_delegate];
to
Code: Select all
[handler handleMessage:[msgStr substringWithRange:NSMakeRange(0, [msgStr length])] type:(NSString *)INFSMARTFOXCLIENT_XTMSG_TYPE_STR delegate:_delegate];
Or else it will cut off the first letter from the returned string.
Posted: 22 Oct 2009, 22:14
by cemuzunlar
This will be fixed in the next release.
You can fix it by updating the function strReceived in INFSmartFoxiPhoneClient.m:
Code: Select all
- (void)strReceived:(NSString *)msg
{
[self debugMessage:[NSString stringWithFormat:@"INFSmartFoxiPhoneClient:strReceived"]];
// Got String response
NSArray *params = [[msg substringWithRange:NSMakeRange(1, [msg length] - 2)] componentsSeparatedByString:_MSG_STR];
NSString *handlerId = [params objectAtIndex:0];
id<INFSmartFoxIMessageHandler> handler = [_messageHandlers objectForKey:handlerId];
if (handler != nil) {
[handler handleMessage:[params subarrayWithRange:NSMakeRange(1, [params count] - 1)] type:(NSString *)INFSMARTFOXCLIENT_XTMSG_TYPE_STR delegate:_delegate];
}
else {
[self debugMessage:[NSString stringWithFormat:@"No handlers found for type:%@", handlerId]];
}
}
Thanks