- const char * ptr = src.c_str();
- for (int i = 0; i < size / 8; ++i) {
- uint32_t a;
- uint32_t b;
- a = n2l(ptr + i * 8);
- b = n2l(ptr + i * 8 + 4);
- Blowfish_Encrypt(&ctx,
- &a,
- &b);
- l2n(a, dst + i * 8);
- l2n(b, dst + i * 8 + 4);
+if (request.isBad)
+ return;
+if (name == "request")
+ {
+ if (attr == NULL)
+ {
+ printfd(__FILE__, "DataThread::ParseTag() 'request' tag require an attribute\n");
+ request.isBad = true;
+ return;
+ }
+ else
+ {
+ std::string attrName(*attr++);
+ std::string attrValue(*attr++);
+ if (attr != NULL)
+ {
+ printfd(__FILE__, "DataThread::ParseTag() Extra attributes on tag 'request'\n");
+ }
+ if (attrName == "login")
+ {
+ if (attrValue != login)
+ {
+ printfd(__FILE__, "DataThread::ParseTag() Logins doesn't match\n");
+ request.isBad = true;
+ return;
+ }
+ }
+ else
+ {
+ printfd(__FILE__, "DataThread::ParseTag() Unexpected attribute '%s'\n", attrName.c_str());
+ request.isBad = true;
+ return;
+ }
+ }
+ }
+else if (name == "conf")
+ {
+ pvList = &(request.conf);
+ }
+else if (name == "stat")
+ {
+ pvList = &(request.stat);
+ }
+else
+ {
+ (*pvList)[name];