Freeradius V3 meta-attributes. Check item attributes - freeradius

I am trying to migrate from version 2 to version 3.
The same unlang code worked in version 2. However in version 3 the same code does not work.
This is the error:
/etc/freeradius/sites-enabled/default[406]: Failed parsing expanded string:
/etc/freeradius/sites-enabled/default[406]: %{sql:SET #reset_date = '%{check:Reset-Date}'; SELECT IFNULL((sum(acctinputoctets)+sum(acctoutp...
/etc/freeradius/sites-enabled/default[406]: ^ Unknown module
If I remove check the parser does not throw errors.
Change '%{check:Reset-Date}' to '%{Reset-Date}'. However this will break my code, because Reset-Date is a radcheck attribute, stored in the radcheck table.
Any ideas?

It's control:Reset-Date. We've never had check as a list qualifier.
Check items are specific to the users file and sql modules.

This how you can use control to check on expiry with expiration as an attribute
#expiration
expiration{
userlock = 1
}
if(userlock){
update reply {
Reply-Message := "Your account expired on %{control:Expiration}. Please refill your account to continue enjoying our service."
}
reject
}
Now help us understand what you are trying to do.

Related

How to add Job in Customer table with qodbc insert statement

I am trying to add a job to the QuickBooks Customer table using the following sql statement. The customer table has several CustomFields (columns). When I apply the statement without the customField/column the statment works. When I run the sql line with the customField/column - I get an error and the row IS inserted without the customField/column data
INSERT INTO Customer (Name, ParentRefFullName, Companyname, Billaddressaddr1, CustomFieldAddNumber) VALUES ('.10~Root Name 01', '.00~Root Name 01', 'Zen Enterprise', 'my Address one', '.10' )
Error: only with 'CustomFieldAddNumber' set to '.10'
What is the correct way to add a Job to Customer table with CustomFeilds/Columns ?
Thanks
I would suggest you download & install QODBC latest version 320 from below link & test again:
http://www.qodbc.com/qodbcDownload.htm
If you are still facing the issue, I kindly request you to please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information:
http://support.flexquarters.com/esupport/index.php?/Tickets/Submit
We may need the following information, I kindly request you to attach below listed files when replying to the ticket.
1) Screenshot of QODBC Setup Screen -- > About
2) Screenshot of the issue you’re facing.
Share Entire Log Files as an attachment in text format from
3) QODBC Setup Screen -- > Messages -- > Review QODBC Messages
4) QODBC Setup Screen -- > Messages -- > Review SDK Messages

Push to Specific User

Writing in Delphi 10 Seattle, targeting the 'pusher' as Windows, and the receiver as iOs (for now). The aim is to be able to push a message to a specific user without relying on broadcast and client side filtering.
I've managed to achieve the following so far:
1. Send a broadcast push to my iOS app
2. Login as a user on my iOS app
3. Create a pointer in my Installation record for User -> _User
That's as far as I can get in Delphi. From what I understand, I have to update the Installation record on login to reflect the installations logged in user.
I cannot find out how to do that in Delphi's Parse/BAAS objects. What seems to be missing is that I can't get the logged in users Installation ID. I assume if I could I could then update that via the TBackendStorage Class.
Any help would be appreciated.
I've cross posted this question to Embarcadero forums and community site.
To retrieve the User Object Id
var
ACreatedObject: TBackendEntityValue; // REST.Backend.MetaTypes
begin
BackendUsers.Users.LoginUser('donald','#duck99',ACreatedObject);
fUserObjectId:=ACreatedObject.ObjectID;
end
To Update the Installation with the User Object iD
Assuming you have a column 'User' in your Installation table on Parse as a pointer to _User class.
Within the PushEventsDeviceRegistered Event:
var
JO,JOP:TJSonObject; // System.JSON
O:TBackendEntityValue; // REST.Backend.MetaTypes
begin
if PushEvents.InstallationValue.TryGetObjectID(fInstallationObjectId) then
begin
try
JO:=TJSONObject.Create;
JOP:=TJSONObject.Create;
JOP.AddPair('__type','Pointer');
JOP.AddPair('className','_User');
JOP.AddPair('objectId',fUserObjectId);
JO.AddPair('User',JOP);
BackendStorage.Storage.UpdateObject('_Installation',
fInstallationObjectId,JO,O);
finally
JO.Free;
end;
end
end;
To Target the Push Message Based on User Name
Note, you could create the target via JSON objects,but I've used a string with formatting here.
const
Target = '{"where":{"User":{"$select":{"query":'+
'{"__type":"Pointer","className":"_User","where":'+
'{"username":"%s"}},"key":"objectId"}}}}';
begin
BackendPush.Target.Text:=Format(Target,['donald']);
BackendPush.Message:='Gratz on the Election Result';
BackendPush.Push;
end
Non Local Variables/Declarations
The following Delphi BaaS components were created at Design time.
ParseProvider: TParseProvider;
PushEvents: TPushEvents;
BackendUsers: TBackendUsers;
BackendStorage: TBackendStorage;
BackendPush: TBackendPush;
The following class (or global) variables are referred to:
fUserObjectId:string; // Must be set before push registration is activated.
fInstallationObjectId:string;
NOTE: The original code is fully tested, however I've cut/paste (and edited to remove non-relevant stuff) so forgive me if there are any cut/paste errors.

Tag appears more than once while using Quickfix market data incremental refresh

I have implemented the fix client that request for market data. I have successfully logged on to the server but when the server sends us a MarketDataIncrementalRefresh message my application rejects with the message "Tag appears more than once" tag for which it is indicating is 55. Can you please help me in resolving it?
The message it rejects is:
8=FIX.4.2 9=196 35=X 34=14 49=Xenfin 56=newchange.api -price 52=20140528-08:54:32.144 262=156 268=2 279=1 269=0 278=B 55=EUR/USD 270=1.36201 271=1000000.00 279=1 269=1 278=A 55=EUR/USD 270=1.36205 271=1000000.00 10=133
and in my config file I have used no data dictionary and set UseDataDictionary=N
This usually means you have a configuration or DataDictionary problem, or both.
Configuration problem: Your config should have UseDataDictionary=Y, and DataDictionary=path/to/xml (or AppDataDictionary= and TransportDataDictionary= if you're on FIX5).
DataDictionary problem: Your counterparty has probably added custom fields to the message, and your DD hasn't been properly updated to reflect them. When parsing repeating groups, when the QF/n parser finds a field that doesn't belong (per DD) to the group, it assumes the group has ended. Any fields after that are considered to be outside the group.
You need to edit your DD file to reflect any changes that your counterparty has made to the standard message set. This will probably include adding custom fields, and may include rearranging field orderings or adding fields to groups that they don't normally belong in. See this page for more info about editing your DD:
http://quickfixn.org/tutorial/custom-fields-groups-and-messages
That's because you have a repeating group, once for bid, once for offer
8=FIX.4.2
9=196
35=X
34=14
49=Xenfin
56=newchange.api -price
52=20140528-08:54:32.144
262=156
268=2
279=1 269=0 278=B 55=EUR/USD 270=1.36201 271=1000000.00
279=1 269=1 278=A 55=EUR/USD 270=1.36205 271=1000000.00
10=133
and you're not handling it properly.

db2 stored procedure error when update statement follows rollback

I have a stored procedure where at the end I check for errors and if there are errors I perform a rollback and then update the status on the batch table to 'FAILED'. When I run the stored procedure I regularly get an SQLCODE 818 error saying there is 'a timestamp conflict occurred'.
When I remove the update statement that changes the status on the batch table, I do not get the error.
What is the best practice to perform these actions so I avoid getting the error?
The section of code looks like this:
IF v_error_count > 0 THEN
-- Batch failed
ROLLBACK;
UPDATE batch_table bt
SET bt.batch_status = 'FAILED'
WHERE batch_id = input_batch_id;
END IF;
Thanks for any help.
SQL Code -818 indicates that the internal timestamp DB2 uses to ensure consistency between the running module matches the DBRM version created when the SQL Statements were precompiled.
You might check with your DBA (or someone else at your site), because the specific steps you have to perform may vary. For a general overview, you can see this article on IBM Knowledge Center.

Windev Quickbooks SDK OpenConnection2

I've been trying to find a way to connect my Windev application using the Quickbooks SDK.
I wish to connect to my local QB instance using the qbXML API.
I've been able to get a reference to the library using :
myconnection = new object Automation "QBXMLRP2.RequestProcessor"
However, when it comes to the OpenConnection2 method, I only get errors. Either "missing parameter" or "invalid parameter". I am aware that I should pass a "localQBD" type to the function, but I have not found out how to reference it. The following represents my invalid script.
myconnection>>OpenConnection2("","My Test App", localQBD)
How can I achieve a connection to QB through Windev?
After much searching, I have found that I was on the right path using the automation variable type.
However, I have yet to find how to reference the constants provided by the library. Instead, I declare them beforehand like so
CONSTANT
omSingleUser = 0
omMultiUser = 1
omDontCare = 2
qbStopOnError = 0
qbContinueOnError = 1
ctLocalQBD = 1
ctLocalQBDLaunchUI = 3
FIN
Which gives us this working example
myconnection = new object Automation "QBXMLRP2.RequestProcessor"
ticket = myconnection>>BeginSession("",::omDontCare)
XMLresponse = myconnection>>ProcessRequest(ticket,XMLrequest)
myconnection>>EndSession(ticket)
myconnection>>CloseConnection()
delete myconnection
A huge thanks goes to Frank Cazabon for showing me the proper constant values.
I have a complete external WinDev component that accesses QB and a helper program that can generate the WinDev calls in the correct order with the correct spelling and provides an OSR for all the QuickBooks fields and modules.
I have a similar product for the Clarion language and am in the final stages of the WinDev version. Contact me if you are interested. qbsnap at wybatap.com

Resources