From: Daniel M. <tub...@us...> - 2003-05-27 20:14:01
|
Update of /cvsroot/epp-rtk/epp-rtk/c++/src In directory sc8-pr-cvs1:/tmp/cvs-serv15015 Modified Files: main_contactcheck.cc Log Message: added cvs header; now using "extradata" Index: main_contactcheck.cc =================================================================== RCS file: /cvsroot/epp-rtk/epp-rtk/c++/src/main_contactcheck.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main_contactcheck.cc 13 May 2003 22:55:50 -0000 1.14 --- main_contactcheck.cc 27 May 2003 20:13:57 -0000 1.15 *************** *** 26,29 **** --- 26,31 ---- ************************************************************************/ + /* $Header$ */ + #include <vector> #include <iostream> *************** *** 96,107 **** return 1; ! map<unsigned int,string> testDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-testdata=", 10)) { ! string td = &argv[parm][10]; ! testDataMap = getTestDataMap(td); } } --- 98,110 ---- return 1; ! map<string,string> extraDataMap; if(argc > 1) { for(int parm = 1; parm < argc; parm++) { ! if (!strncmp(argv[parm], "-extradata=", 11)) { ! cout << "Found extra data param..." << endl; ! string td = &argv[parm][11]; ! extraDataMap = getExtraDataMap(td); } } *************** *** 115,120 **** string trID; ! if(testDataMap.empty()) trID = "ABC-12345"; ! else trID = testDataMap[1]; l_req->m_cmd.ref(new epp_Command(NULL, --- 118,123 ---- string trID; ! if(extraDataMap.empty()) trID = "ABC-12345"; ! else trID = extraDataMap["trid"]; l_req->m_cmd.ref(new epp_Command(NULL, *************** *** 123,127 **** epp_string_seq_ref names(new epp_string_seq); ! if(testDataMap.empty()) { names->push_back("sh8013"); names->push_back("sah8013"); --- 126,130 ---- epp_string_seq_ref names(new epp_string_seq); ! if(extraDataMap.empty()) { names->push_back("sh8013"); names->push_back("sah8013"); *************** *** 129,134 **** } else { ! for(unsigned int n = 2; n <= testDataMap.size(); n++) { ! names->push_back(testDataMap[n]); } } --- 132,144 ---- } else { ! char lenny[3]; ! for(unsigned int n = 1; n <= 30; n++) { ! sprintf(lenny,"%d",n); ! string key = "id"; ! key.append(lenny); ! cout << "looking for ["<<key<<"]\n"; ! string contact_id = extraDataMap[key]; ! if ( contact_id.empty() ) break; ! names->push_back(contact_id); } } |