1 |
//============================================================================ |
//============================================================================ |
2 |
// $Id: PacketUser.cpp,v 1.3 2008/12/18 12:58:37 mocchiut Exp $ |
// $Id: PacketUser.cpp,v 1.6 2008/12/23 20:43:08 mocchiut Exp $ |
3 |
// Description : |
// Description : |
4 |
//============================================================================ |
//============================================================================ |
5 |
#include "PacketUser.h" |
#include "PacketUser.h" |
87 |
boot_number_prevvalue=0; |
boot_number_prevvalue=0; |
88 |
|
|
89 |
//(tassa) |
//(tassa) |
90 |
id_to_recover[1000]; |
// id_to_recover[1000]; // Emiliano: che si vuole fare con questa riga? cosi` non fa nulla... |
91 |
id_to_recover_index=0; |
id_to_recover_index=0; |
92 |
} |
} |
93 |
|
|
325 |
|
|
326 |
stringstream oss; |
stringstream oss; |
327 |
oss.str()=""; |
oss.str()=""; |
328 |
oss<<"In download: "<<download<<" timeOffset: "<<timeOffset<<" obt_time_sync: "<<obt_time_sync<<" last_time_sync_info: "<<last_time_sync_info<<" using Packet Type: "<<type->GetName().c_str(); |
oss<<"In download: "<<download<<" timeOffset: "<<timeOffset<<" obt_time_sync: "<<obt_time_sync<<" last_time_sync_info: "<<last_time_sync_info<<" using Packet Type: "<<type->GetName(); |
329 |
|
// oss<<"In download: "<<download<<" timeOffset: "<<timeOffset<<" obt_time_sync: "<<obt_time_sync<<" last_time_sync_info: "<<last_time_sync_info<<" using Packet Type: "<<type->GetName().c_str(); |
330 |
string msg = oss.str(); |
string msg = oss.str(); |
331 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |
332 |
} |
} |
352 |
*/ |
*/ |
353 |
stringstream oss; |
stringstream oss; |
354 |
oss.str()=""; |
oss.str()=""; |
355 |
oss<<"In download: "<<download<<" boot_number: "<<boot_number<<" using Packet Type: "<<type->GetName().c_str(); |
// oss<<"In download: "<<download<<" boot_number: "<<boot_number<<" using Packet Type: "<<type->GetName().c_str(); |
356 |
|
oss<<"In download: "<<download<<" boot_number: "<<boot_number<<" using Packet Type: "<<type->GetName(); |
357 |
string msg = oss.str(); |
string msg = oss.str(); |
358 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |
359 |
return; |
return; |
431 |
|
|
432 |
oss.str(""); |
oss.str(""); |
433 |
oss << "SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE),ID FROM "<< table <<" WHERE FROM_ORBIT < " |
oss << "SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE),ID FROM "<< table <<" WHERE FROM_ORBIT < " |
434 |
<< orbit_number << " order by FROM_ORBIT desc limit 1;"; |
<< orbit_number << " AND SPECIAL_FILE='' order by FROM_ORBIT desc limit 1;"; |
435 |
|
|
436 |
string msg2 = oss.str(); |
string msg2 = oss.str(); |
437 |
mainLogUtil->logAll(msg2); |
mainLogUtil->logAll(msg2); |
616 |
<< bad_pkt <<"','" << bad_pkt_read <<"','"<< bad_pkt_CalRead <<"','"<< num_PKT_Saved<<"','" |
<< bad_pkt <<"','" << bad_pkt_read <<"','"<< bad_pkt_CalRead <<"','"<< num_PKT_Saved<<"','" |
617 |
<< nome_input <<"'," |
<< nome_input <<"'," |
618 |
<<"NULL,"<<_time_is_estimated<< |
<<"NULL,"<<_time_is_estimated<< |
619 |
")"; |
");"; |
620 |
string msg = oss.str(); |
string msg = oss.str(); |
621 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |
622 |
|
|
666 |
return; |
return; |
667 |
|
|
668 |
for (int i = 0; i<id_to_recover_index;i++){ |
for (int i = 0; i<id_to_recover_index;i++){ |
669 |
oss << "UPDATE "<< Table_ROOT_Good << " SET BOOT_NUMBER=" << boot_number << " WHERE ID_N=" << id_to_recover[i]; |
oss.str(""); |
670 |
|
oss << "UPDATE "<< Table_ROOT_Good << " SET BOOT_NUMBER=" << boot_number << " WHERE ID_N=" << id_to_recover[i] << ";"; |
671 |
query = oss.str(); |
query = oss.str(); |
672 |
res= sqlServer->Query(query.c_str()); |
res= sqlServer->Query(query.c_str()); |
673 |
if(!res) |
if(!res) |
679 |
} |
} |
680 |
} |
} |
681 |
|
|
682 |
for (int i = 0; i<id_to_recover_index;i++){ |
for (int i = 0; i<id_to_recover_index;i++){ |
683 |
oss << "UPDATE " << Table_ROOT_Merging << " SET BOOT_NUMBER=" << boot_number << " WHERE ROOT_ID_N=" << id_to_recover[i]; |
oss.str(""); |
684 |
query=oss.str(); |
oss << "UPDATE " << Table_ROOT_Merging << " SET BOOT_NUMBER=" << boot_number << " WHERE ROOT_ID_N=" << id_to_recover[i] << ";"; |
685 |
res= sqlServer->Query(query.c_str()); |
query=oss.str(); |
686 |
if(!res) |
res= sqlServer->Query(query.c_str()); |
687 |
{ |
if(!res) |
688 |
|
{ |
689 |
oss1<<"DBError UNABLE to: "<<query.c_str()<<endl; |
oss1<<"DBError UNABLE to: "<<query.c_str()<<endl; |
690 |
msg1=oss1.str(); |
msg1=oss1.str(); |
691 |
mainLogUtil->logError(msg1); |
mainLogUtil->logError(msg1); |