-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin_commands.cpp
More file actions
48 lines (38 loc) · 958 Bytes
/
Copy pathadmin_commands.cpp
File metadata and controls
48 lines (38 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*********************************************************************
* Copyright 2012, by feiyin.
* All right reserved.
*
* 功能:命令管理进程
*
* Edit History:
*
* 2012/07/04 - Administrator 建立.
*************************************************************************/
#include <bson/util/json.h>
#include <ostream>
#include "admin_commands.h"
using namespace base;
using namespace std;
using namespace bson;
namespace admin {
void admin_test(void* para,int argc, char **argv, std::ostream& os)
{
if (argc < 2)
{
os<<"found invalid param"<<endl;
return;
}
os<<"succefully:para count:"<<argc<<",para:";
for (int i = 0 ; i < argc;++i)
{
os<<argv[i]<<",";
}
os<<endl;
}
void reload_conf(void* para,int argc, char **argv, std::ostream& os)
{
GlobalServer* pSelf = (GlobalServer*)para;
pSelf->reload();
os<<"succefully:reload done"<<endl;
}
};