| Issue 146: | Router logic breaks compatibility in v3.3.1 | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
in http://code.google.com/p/smslib/wiki/SMSServer_DB_Interface, the description of gateway_id field in outbound sms table says: "gateway_id, CHAR(64), NOT NULL, Default value is the star character" and "Set it to the star character if you want to leave to SMSServer the decision as to which gateway to use to send your message." I always set the gateway_id of outbounding messages to '*' in my database and never had a problem. But after I upgraded to v3.3.1, outbound messages stopped working. Then I played around with the source codes for awhile and found this in the preroute() function of org.smslib.routing.Router: if (msg.getGatewayId().length() != 0) { if (msg.getGatewayId().equalsIgnoreCase(gtw.getGatewayId())) getCandidates().add(gtw); } else getCandidates().add(gtw); In my case, since the value of msg.getGatewayId() is '*' and not equals to any available gateway name, so that no gateway is added into the candidate list. Thus failed to route the message. Change the gateway_id field to "NOT NULL, Default value is empty string" can solve this problem but the document should be updated as well. Maybe a better solution is to change the above code to: if (msg.getGatewayId().length() != 0) { if (msg.getGatewayId().equals("*") || msg.getGatewayId().equalsIgnoreCase(gtw.getGatewayId())) getCandidates().add(gtw); } else getCandidates().add(gtw); Regards, Zheng Yue |
||||||||||||||
,
Oct 30, 2008
Hi, Yes, you are right. I've noticed it yesterday while working on a branch for some other things and it drove me crazy... :( I didn't have time to act on it - your solution seems fine.
Status: Accepted
Labels: Priority-Critical Component-SMSLib Milestone-v3.3.2 |
|||||||||||||||
,
Oct 30, 2008
r1522 (trunk). Will probably issue new v3.3.2 distro zips later.
Status: Completed
|
|||||||||||||||
,
Oct 31, 2008
(No comment was entered for this change.)
Owner: admin
|
|||||||||||||||
,
Nov 01, 2008
(No comment was entered for this change.)
Labels: Milestone-v3.4.0
|
|||||||||||||||
,
Nov 24, 2008
(No comment was entered for this change.)
Owner: T.Delenikas
|
|||||||||||||||
,
Dec 13, 2008
(No comment was entered for this change.)
Status: Fixed
|
|||||||||||||||
|
|
|||||||||||||||