#1 Fixes problem with MIDASb

closed-accepted
Tom Cashmore
None
7
2003-12-15
2003-12-15
Peter Sandström
No

This patch makes MIDASb send the HID of the machine
running MIDASb instead of 0 to pass ValidHid() and get
the HID for the bb machine.

diff -Nur ../MIDAS-2.1a/MIDASb/MIDASb.c
MIDASb/MIDASb.c
--- ../MIDAS-2.1a/MIDASb/MIDASb.c 2003-11-10
20:01:23.000000000 +0100
+++ MIDASb/MIDASb.c 2003-12-15
04:03:34.000000000 +0100
@@ -266,8 +266,8 @@
CID = BBCheckName2CID(BBCheck);
Detail = CleanXMLValueString(BBDetail);

- Response = dsprintf(Response, "<CLIENT><HID>%
d</HID><TYPE>CHECKUPDATE</TYPE><CHECKUPDATE><
CHECK><HID>%d</HID><CID>%d</CID><STATUS>%
s</STATUS><DETAIL>%
s</DETAIL></CHECK></CHECKUPDATE></CLIENT>",
- HID, HID, CID, BBStatus,
Detail);
+ Response = dsprintf(Response, "<CLIENT><HID>%
s</HID><TYPE>CHECKUPDATE</TYPE><CHECKUPDATE><
CHECK><HID>%d</HID><CID>%d</CID><STATUS>%
s</STATUS><DETAIL>%
s</DETAIL></CHECK></CHECKUPDATE></CLIENT>",
+ ReturnXMLLeafValue
(ConfigXMLTree, "CONFIG.HID"), HID, CID, BBStatus,
Detail);

RecvString = SendToServer(Response);
RecvString = dfree(RecvString);
@@ -336,10 +336,10 @@

if(Name)
{
- Query = dsprintf
(Query, "<CLIENT><HID>0</HID><TYPE>HIDQUERY</TYP
E><HOSTNAME>%s</HOSTNAME></CLIENT>", Name);
+ Query = dsprintf(Query, "<CLIENT><HID>%
s</HID><TYPE>HIDQUERY</TYPE><HOSTNAME>%
s</HOSTNAME></CLIENT>", ReturnXMLLeafValue
(ConfigXMLTree, "CONFIG.HID"), Name);
Response = SendToServer(Query);
Query = dfree(Query);
-
+
if(Response)
{
ResponseLeaf = StringToXMLTree
(Response);

Discussion

  • Tom Cashmore
    Tom Cashmore
    2003-12-15

    • priority: 5 --> 7
    • assigned_to: nobody --> tcashmore
    • status: open --> closed-accepted
     
  • Tom Cashmore
    Tom Cashmore
    2003-12-15

    Logged In: YES
    user_id=562122

    Patch will be integrated into version 2.2a

    TCC