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!
iPhone bugs
- cemuzunlar
- Posts: 47
- Joined: 26 Dec 2008, 00:45
- Contact:
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.
Cem Uzunlar
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com
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:
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?
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?
-
- Posts: 2
- Joined: 12 Oct 2009, 21:49
- Contact:
more iphone api bugs
INSmartFoxiPhoneClient.m function strReceived() line 333 should be changed from:
to
Or else it will cut off the first letter from the returned string.
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.
- cemuzunlar
- Posts: 47
- Joined: 26 Dec 2008, 00:45
- Contact:
This will be fixed in the next release.
You can fix it by updating the function strReceived in INFSmartFoxiPhoneClient.m:
Thanks
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
Return to “iPhone Objective-C API”
Who is online
Users browsing this forum: No registered users and 21 guests