struct option long_options_get[] = {
{"server", 1, 0, 's'}, //Server
struct option long_options_get[] = {
{"server", 1, 0, 's'}, //Server
{"admin_pass", 1, 0, 'w'}, //passWord
{"user", 1, 0, 'u'}, //User
{"addcash", 0, 0, 'c'}, //Add Cash
{"admin_pass", 1, 0, 'w'}, //passWord
{"user", 1, 0, 'u'}, //User
{"addcash", 0, 0, 'c'}, //Add Cash
{"credit", 0, 0, 'r'}, //cRedit
{"tariff", 0, 0, 't'}, //Tariff
{"message", 0, 0, 'm'}, //message
{"credit", 0, 0, 'r'}, //cRedit
{"tariff", 0, 0, 't'}, //Tariff
{"message", 0, 0, 'm'}, //message
{"email", 1, 0, 'L'}, //emaiL
{"phone", 1, 0, 'P'}, //phone
{"group", 1, 0, 'G'}, //Group
{"email", 1, 0, 'L'}, //emaiL
{"phone", 1, 0, 'P'}, //phone
{"group", 1, 0, 'G'}, //Group
-{"ip", 0, 0, 'I'}, //IP-address of user
+{"ip", 0, 0, 'I'}, //IP-address of user
#if defined(CONST_ICONV)
nconv = iconv (cd, (const char**)&inbuf, &insize, &outbuf, &outsize);
#else
nconv = iconv (cd, &inbuf, &insize, &outbuf, &outsize);
#endif
#if defined(CONST_ICONV)
nconv = iconv (cd, (const char**)&inbuf, &insize, &outbuf, &outsize);
#else
nconv = iconv (cd, &inbuf, &insize, &outbuf, &outsize);
#endif
string msg;
Encode12str(msg, req->usrMsg.const_data());
sprintf(str, "<Message login=\"%s\" msgver=\"1\" msgtype=\"1\" repeat=\"0\" repeatperiod=\"0\" showtime=\"0\" text=\"%s\"/>", req->login.const_data().c_str(), msg.c_str());
string msg;
Encode12str(msg, req->usrMsg.const_data());
sprintf(str, "<Message login=\"%s\" msgver=\"1\" msgtype=\"1\" repeat=\"0\" repeatperiod=\"0\" showtime=\"0\" text=\"%s\"/>", req->login.const_data().c_str(), msg.c_str());
sprintf(str, "MU%d=\"%s\" ", i, ss.str().c_str());
strcat(r, str);
}
sprintf(str, "MU%d=\"%s\" ", i, ss.str().c_str());
strcat(r, str);
}
-
-//printf("a=%d, b=%d, u=%d, d=%d ud=%d\n", a, b, u, d, ud);
return a && (b || u || d || ud);
}
//-----------------------------------------------------------------------------
return a && (b || u || d || ud);
}
//-----------------------------------------------------------------------------
-int CheckParametersGet(REQUEST * req)
-{
-return CheckParameters(req);
-}
-//-----------------------------------------------------------------------------
-int CheckParametersSet(REQUEST * req)
-{
-return CheckParameters(req);
-}
-//-----------------------------------------------------------------------------
- c = getopt_long(argc, argv, short_options_get, long_options_get, &option_index);
+ int c = getopt_long(argc, argv, short_options_get, long_options_get, &option_index);
- c = getopt_long(argc, argv, short_options_set, long_options_set, &option_index);
+ int c = getopt_long(argc, argv, short_options_set, long_options_set, &option_index);
return mainGet(argc - 1, argv + 1);
}
else if (strcmp(argv[1], "set") == 0)
return mainGet(argc - 1, argv + 1);
}
else if (strcmp(argv[1], "set") == 0)