Subj : syncWXremix and Dial-up To : Digital Man From : KenDB3 Date : Thu Jan 07 2016 11:33 am Re: syncWXremix and Dial-up By: KenDB3 to Digital Man on Thu Jan 07 2016 01:22 am >>> var dialup = (parseInt(user.connection) > 0); >>> function getQuerySuffix() { >>> var qs; >>> if (dialup === 'true') >>> { >>> if (fallback_type == 'nonip') { >>> qs = fallback + '.json'; >>> } else { >>> qs = 'autoip.json?geo_ip=' + resolve_ip(system.inet_addr); >>> } >>> } else if (user.ip_address.search( >>> /(^127\.)|(^192\.168\.)|(^10\.)|(^172 >>> \.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1] >>> \.)|(^169\.254\.)|(^::1$)|(^[fF][cCdD])/ ) > -1 >>> ) { >>> if (fallback_type == 'nonip') { >>> qs = fallback + '.json'; >>> } else { >>> if (client.protocol === 'Telnet') { >>> qs = wstsGetIPAddress(); >>> } else if (bbs.sys_status&SS_RLOGIN) { >>> qs = wsrsGetIPAddress(); >>> } >>> if (typeof qs === 'undefined') qs = resolve_ip(system.inet_addr); >>> qs = 'autoip.json?geo_ip=' + qs; >>> } >>> } else { >>> qs = 'autoip.json?geo_ip=' + user.ip_address; >>> } >>> return qs; >>> } >>> var wungrndQuery = getQuerySuffix(); >>> ********** >>> However, tbird is still seeing an error when the app is launched at >>> Logon and also as a Door/External for his dial-up user. >>> DEBUG for weather.js API call looked like this at the time of error: >>> http:// >>> api.wunderground.com/api/XXXXXXXXXXXXXXXX/conditions/forecast/astrono >>> m Ke> y/ alerts/q/autoip.json?geo_ip=812XXXXXXX >>> (Blocked out API and last 7 of phone number). >>> Any thoughts as to why I am missing catching this scenario? It's got >>> me boggled >>> and I can't really see it. >>> Thanks for any help you can lend (and sorry for the long post). DM>> For a dial-up connection (via SEXPOTS), the user.ip_address property DM>> could either the caller-ID information (if provided by the modem) or DM>> the IP address of the SEXPOTS proxy (e.g. 127.0.0.1). DM>> Is dialup not being set to true (in your code) for the dial-up connection? DM>> Some more debug-level log output could help identify exactly what's DM>> happening here. Ke> Good point, I don't know what's happening to "dialup" during this process. Ke> I do know that the phone number is being dropped into user.ip_address and Ke> that's where the query string is failing. I'm just not catching it. I'll Ke> add some DEBUG to grab "dialup" and I think user.connection as well. I started using some mock data (since I don't have dialup to test with). I think I figured this out. function getQuerySuffix() { var qs; if (dialup === 'true') ....should be... function getQuerySuffix() { var qs; if (dialup === true) This makes it through the function by grabbing the correct fallback lookup. Triple Equals works... At some point I tried Double Equals instead (stil works). Should I stick with Triple? I read up on the difference, but not sure if one might be better than the other in this particular case. Thank you so much for the help (DM and EC)! More Debug was certainly the difference this time. ~KenDB3 --- þ Synchronet þ KD3net-Rhode Island's only BBS about nothing. http://bbs.kd3.us .