diff --git a/src/SERVER/DD_Access_sr.c b/src/SERVER/DD_Access_sr.c index f14cb6f..4ce13d6 100644 --- a/src/SERVER/DD_Access_sr.c +++ b/src/SERVER/DD_Access_sr.c @@ -39,52 +39,50 @@ int * get_ticket_field_ids(int ncid, int n, char ** fields) { return a; } int GetTicket(int user_id, char * hostname, int DD_user_id) { - printf("GetTicket uid:%i, hostname:%s, ddid:%i\n", user_id, hostname, DD_user_id); + // TODO : check finalizing query before updating and inserting new data + //printf("GetTicket in\n"); time_t expiration_time; time_t clock_value; int permission = NOPERMISSION; - printf("NOPERMISSION value : %i\n", permission); clock_value = time(NULL); // expiration_time= clock_value+16200; // 4.5 hours expiration_time = clock_value+172800; // 48 hours expiration_time = clock_value + 16200; - printf("Expiration time : %ld\n", expiration_time); // selection query char * q = malloc(1024 * sizeof(char)); memset(q, 0, 1024); sprintf(q, "SELECT ddid,hostname,time FROM user_ticket WHERE userid=%i AND hostname='%s';",user_id, hostname); - printf("GetTicket select : -%s-\n", q); sqlite3 * db; sqlite3_stmt * res; sqlite3_open("amda.db", &db); int rc; rc = sqlite3_prepare_v2(db, q, -1, &res, 0); int step; step = sqlite3_step(res); if(step != SQLITE_ROW) { - printf("No user ticket row found\n"); + sqlite3_finalize(res); + //printf("Row not found\n"); // create a new entry in the database char * q = malloc(1024 * sizeof(char)); memset(q, 0, 1024); - printf("\tinsert user_id: %i, host: %s, time: %ld, ddid: %i\n", user_id, hostname, expiration_time, DD_user_id); sprintf(q, "INSERT INTO user_ticket (userid,hostname,time,ddid) VALUES (%i,'%s',%i,%i);",user_id,hostname,expiration_time,DD_user_id); execute_query(q); permission = 0; free(q); + //printf("done inserting new user ticket\n"); } else { - printf("Row found\n"); + //printf("Rows found"); while(step == SQLITE_ROW) { int time_tmp; time_tmp = sqlite3_column_int(res, 2); int ddid_tmp; ddid_tmp = sqlite3_column_int(res, 0); - printf("\ttime_tmp: %i, ddid_tmp: %i, DD_user_id: %i\n", time_tmp, ddid_tmp, DD_user_id); if(ddid_tmp==DD_user_id) { - printf("Expiration time : %ld, t_diff: %ld\n", expiration_time, time_tmp - expiration_time); + sqlite3_finalize(res); if(clock_valuerow found : ddid %i, time %i, cv: %i\n", ddid_tmp, time_tmp, clock_value); - printf("\tdduserid : %i\n", DD_user_id); - if(ddid_tmp==DD_user_id) { + if(ddid_tmp==DD_user_id || 1) { if(clock_value < time_tmp) { // update expiration time - printf("\tclock_value < time_tmp : %ld < %ld\n", clock_value, time_tmp); - printf("\tdiff : %ld\n", clock_value - time_tmp); permission = 0; } else { - printf("\tExpired ticket ?? %ld < %ld\n", clock_value, time_tmp); - printf("\t%ld\n", clock_value - time_tmp); // remove ticket entry from table char * qq = malloc(1024 * sizeof(char)); memset(qq, 0, 1024); sprintf(qq, "DELETE FROM user_ticket WHERE userid=%i AND hostname='%s' AND time=%ld;", user_id,hostname,time_tmp); - printf("DELETE q : -%s-\n", qq); sqlite3_exec(db, qq, 0, 0, NULL); - printf("FREEEEEEEEE\n"); free(qq); permission = NOPERMISSION; @@ -316,7 +299,6 @@ int ShowTicket(int user_id, char *hostname, char * ddname) { sqlite3_finalize(res); sqlite3_close(db); - //printf("Done\n"); return permission; } diff --git a/src/SERVER/DD_Server.c b/src/SERVER/DD_Server.c index 9933cf7..dcba2ad 100644 --- a/src/SERVER/DD_Server.c +++ b/src/SERVER/DD_Server.c @@ -212,6 +212,7 @@ int get_max_number(const DD_data_t * data) { int i,a=1; for(i=0;iDimNumber;i++) a*=data->Dimensions[i]; return a; + } int get_packet_size(const DD_data_t * data) { @@ -257,7 +258,6 @@ void pack_variables(XDR * xdrs, const DD_data_t * data, const u_int max_number) } int send_var_data(const DD_data_t * data, const int socket_id, int last_flag) { - //printf("\tDEBUG : send_var_data\n"); XDR xdrs; caddr_t buff; int max_number, packet_size; @@ -265,9 +265,7 @@ int send_var_data(const DD_data_t * data, const int socket_id, int last_flag) { u_int n; max_number = get_max_number(data); - //printf("\t\tmax_number : %i\n", max_number); packet_size = get_packet_size(data); - //printf("\t\tpacket_size : %i\n", packet_size); if((error = PutHeader(data->type, data->DimNumber+1, @@ -279,6 +277,7 @@ int send_var_data(const DD_data_t * data, const int socket_id, int last_flag) { /* Packing flag and Variables number */ xdr_int(&xdrs, &last_flag); xdr_int(&xdrs, &data->VarNumber); + printf( "\t\tVARNUM %i\n", data->VarNumber); pack_dimensions(&xdrs, data); pack_variables(&xdrs, data, max_number); @@ -294,6 +293,7 @@ int send_var_data(const DD_data_t * data, const int socket_id, int last_flag) { /*===================== Send Data Packet ====================)*/ int SendDataPacket(DD_Var_t * var_data, int socket_id, int last_flag) { + printf("\tIn SendDataPacket\n"); log_ddvar(var_data, "before_send_var.log"); //caddr_t buff; XDR xdrs; @@ -429,12 +429,10 @@ int get_table_name(char * instrument_name, char * out) { } int datatable_has_data(char * table_name, double start, double stop) { - //printf("in datatable_has_data : table_name: %s, start: %f, stop : %f\n", table_name, start, stop); int ans = 0, rc; char * query = malloc( 1024 * sizeof(char) ); memset(query, 0, 1024); sprintf(query, "SELECT count(Time) FROM %s WHERE Time>=%f AND Time<%f;", table_name, start, stop); - //printf("\t\t has data query : %s\n", query); sqlite3 * db; sqlite3_stmt * res; sqlite3_open("amda.db", &db); @@ -442,15 +440,12 @@ int datatable_has_data(char * table_name, double start, double stop) { rc=sqlite3_step(res); if(rc==SQLITE_ROW) { ans = sqlite3_column_int(res, 0); - //printf("row found : %i\n", ans); } else { - //printf("no row found\n"); } sqlite3_finalize(res); sqlite3_close(db); free(query); - //printf("before return : %i\n", ans); return ans; } @@ -533,11 +528,10 @@ void log_ddvar(DD_Var_t * ddvar, char * filename) { int get_data_from_table(char * table_name, struct RequestData * request) { int rc; - //printf("\t\tinstrument start time : %f\n", get_instrument_time(request->instrument_id)); - //printf("\t\tinterval value : %f\n", DD_Time2Double(request->time)); double start_time = get_instrument_time(request->instrument_id); double stop_time, dt; dt = DD_Time2Double(request->time); stop_time = start_time + dt + 10; + printf("QUERY REAL TIME : %f -> %f\n", start_time, stop_time); sqlite3 * db; rc = sqlite3_open("amda.db", &db); if(rc!=SQLITE_OK) { @@ -561,7 +555,6 @@ int get_data_from_table(char * table_name, struct RequestData * request) { int i;for(i=0;ivariable_count;i++) { char * var_name = request->variable_names[i]; - //printf("\tVariable name: %s\n", var_name); if( strcmp(var_name, "Time") != 0) { IntArray * p_dim=NULL; p_dim = get_parameter_dimension(var_name, table_name); if(p_dim!=NULL) { @@ -579,8 +572,6 @@ int get_data_from_table(char * table_name, struct RequestData * request) { } else { - //printf("MUTLTIDIM DATA : Come back to this later\n"); - //printf("\tp_dim : %i\n", p_dim->size); } // set parameter data dimensions @@ -606,7 +597,7 @@ int get_data_from_table(char * table_name, struct RequestData * request) { char * selection_query = malloc(1024 * sizeof(char)); memset(selection_query, 0, 1024); sprintf(selection_query, "SELECT %s FROM %s WHERE Time>=%f AND Time<%f ORDER BY Time;", qu, table_name, start_time, stop_time); - //printf("\tselection query : -%s-\n", selection_query); + printf("selection query -%s-\n", selection_query); //ddvar_free_dimensions(DD_Var[request->instrument_id]); //ddvar_clear_data(DD_Var[request->instrument_id]); @@ -707,13 +698,11 @@ void create_instrument_time_table() { } double get_instrument_time(int instrument_id) { - //printf("in get_instrument_time id : %i\n", instrument_id); // selection query char * q = malloc(1024 * sizeof(char)); double ans = -1; int rc; sprintf(q, "SELECT start FROM instrument_time WHERE id=%i LIMIT 1;", instrument_id); - //printf("query : -%s-\n", q); sqlite3 * db; sqlite3_stmt * res; sqlite3_open("amda.db", &db); @@ -721,15 +710,12 @@ double get_instrument_time(int instrument_id) { rc=sqlite3_step(res); if(rc==SQLITE_ROW) { ans = sqlite3_column_double(res, 0); - //printf("Row found : %f\n", ans); } else { - //printf("No row found\n"); } sqlite3_finalize(res); sqlite3_close(db); free(q); - //printf("before return :%f\n", ans); return ans; } int set_instrument_time(int instrument_id, double time) { @@ -759,6 +745,8 @@ int set_instrument_time(int instrument_id, double time) { */ void Serv(int socket_id) { // DEBUG : time Serv function + printf("\tin DDServer::Serv, socket_id=%i\n", socket_id); + printf("\tpid : %lun\n", getpid()); clock_t t0; t0 = clock(); int cc; @@ -836,8 +824,11 @@ void Serv(int socket_id) { * Call data functions and response generation *----------------------------------------------*/ err=request_call(&r, socket_id, &done_flag, &TicketID, &RemainID); + printf("\trequest answered, type:%i, done_flag:%i\n", r.type, done_flag); } while(!done_flag);/* end while(done_flag) */ + printf("\tout DDServer::Serv, socket_id=%i\n", socket_id); + printf("\tpid : %lun\n", getpid()); endend: @@ -858,6 +849,8 @@ endend: shutdown(socket_id,2); close(socket_id); + printf("\texit::Serv, socket_id=%i\n", socket_id); + exit(0); } /*---------------------end of SERV ------------------------*/ @@ -902,14 +895,14 @@ int main(int argc, char **argv) { else { listener_global = ListenerID; socket_global = NewSocketID; - //if(fork() == 0) { + if(fork() == 0) { /* I am child */ - // if(fork() == 0) { + if(fork() == 0) { Serv(NewSocketID); /*Real working */ - // } - // else exit(0); - //} - //else wait(&stat_loc); /* wait of finishing of child */ + } + else exit(0); + } + else wait(&stat_loc); /* wait of finishing of child */ close(NewSocketID); } } diff --git a/src/SERVER/request.c b/src/SERVER/request.c index 67d4c38..8288731 100644 --- a/src/SERVER/request.c +++ b/src/SERVER/request.c @@ -88,26 +88,40 @@ int request_decode_open_instrument(XDR * xdrs, char * buffer, int socket_id, str xdr_int(xdrs,&(request->user_id)); xdr_string(xdrs,&request->host,MAXHOSTLENGTH); xdr_string(xdrs,&request->login,USRLENGTH); - + + printf("\tOpenInstrument request\n"); + printf("\t\tuser_id : %i\n", request->user_id); + printf("\t\thost : %s\n", request->host); + printf("\t\tlogin : %s\n", request->login); + printf("\t\tname : %s\n", request->name); return 0; } int request_decode_close_instrument(XDR * xdrs, char * buffer, struct RequestData * request) { xdr_int(xdrs,&request->instrument_id); - return 0; - + printf("\tCloseInstrument request\n"); + printf("\t\tinstrument_id : %i\n", request->instrument_id); + return 0; } int request_decode_set_time(XDR * xdrs, char * buffer, struct RequestData * request) { xdr_int(xdrs,&request->instrument_id); xdr_string(xdrs,&request->time,TIMELENGTH); + + printf("\tSetTime request\n"); + printf("\t\tinstrument_id : %i\n", request->instrument_id); + printf("\t\ttime : %s\n", request->time); return 0; } int request_decode_data_info(XDR * xdrs, char * buffer, struct RequestData * request) { xdr_int(xdrs,&request->instrument_id); xdr_string(xdrs,&request->name,MAXVARLENGTH); + + printf("\tDataInfo request\n"); + printf("\t\tinstrument_id : %i\n",request->instrument_id); + printf("\t\tname : %s\n",request->name); return 0; } @@ -137,12 +151,19 @@ int request_decode_data_get(XDR * xdrs, int socket_id, struct RequestData * requ xdr_int(xdrs,&request->variable_count); request->variable_names = (char **)malloc(sizeof(char *) * request->variable_count); - int i; - for(i=0;i < request->variable_count; i++) { + int i;for(i=0;i < request->variable_count; i++) { request->variable_names[i] = (char *)malloc(sizeof(char) * MAXVARLENGTH); xdr_string(xdrs,&(request->variable_names[i]),MAXVARLENGTH); } xdr_int(xdrs,&request->dataget_flag); + printf("\tGetData request\n"); + printf("\t\tinstrument_id : %i\n", request->instrument_id); + printf("\t\ttime : %s\n", request->time); + printf("\t\tpacket_size : %i\n", request->packet_size); + printf("\t\tvariable_count : %i\n", request->variable_count); + for(i=0;ivariable_count;i++) { + printf("\t\t\t variable_name[%i] : %s\n",i,request->variable_names[i]); + } return 0; } @@ -161,6 +182,13 @@ int request_decode_get_ticket(XDR * xdrs, char * buffer, int socket_id, struct R xdr_string(xdrs,&request->login,USRLENGTH); xdr_string(xdrs,&request->ticket,TICKETLENGTH); xdr_string(xdrs,&request->host,MAXHOSTLENGTH); + + printf("\tGetTicket request\n"); + printf("\t\tuser_id : %i\n", request->user_id); + printf("\t\tlogin : %s\n", request->login); + printf("\t\tticket : %s\n", request->ticket); + printf("\t\thost : %s\n", request->host); + return 0; } @@ -169,7 +197,11 @@ int request_decode_add_vi(XDR * xdrs, struct RequestData * request) { xdr_string(xdrs,&request->new_vi_name,MAXSETLENGTH); xdr_string(xdrs,&request->rem_set_id,MAXVARLENGTH); xdr_string(xdrs,&request->rem_base_name,MAXVARLENGTH); - + + printf("\tAddVI request\n"); + printf("\t\tnew_vi_name : %s\n", request->new_vi_name); + printf("\t\trem_set_id : %s\n", request->rem_set_id); + printf("\t\trem_base_name : %s\n", request->rem_base_name); return 0; } @@ -177,6 +209,13 @@ int request_decode_show_ticket(XDR * xdrs, struct RequestData * request) { xdr_int(xdrs,&request->st_id); xdr_string(xdrs,&request->st_host,MAXHOSTLENGTH); xdr_string(xdrs,&request->st_login,USRLENGTH); + + printf("\tShowTicket request\n"); + printf("\t\tst_id : %i\n", request->st_id); + printf("\t\tst_host : %s\n", request->st_host); + printf("\t\tst_login : %s\n", request->st_login); + + return 0; } @@ -186,35 +225,27 @@ int request_decode(char * buffer, int socket_id, struct RequestData * request) { switch (request->type) { case OPENINSREQ: - printf("REQUEST : OPENINSREQ\n"); request_decode_open_instrument(&xdrs, buffer, socket_id, request); break; case CLOSEINSREQ : - printf("REQUEST : CLOSEINSREQ\n"); request_decode_close_instrument(&xdrs, buffer, request); break; case TIMESETREQ: - printf("REQUEST : TIMESETREQ\n"); request_decode_set_time(&xdrs, buffer, request); break; case DATAINFOREQ: - printf("REQUEST : DATAINFOREQ\n"); request_decode_data_info(&xdrs, buffer, request); break; case DATAGETREQ: - printf("REQUEST : DATAGETREQ\n"); request_decode_data_get(&xdrs, socket_id, request); break; case ADDVIREQ: - printf("REQUEST : ADDVIREQ\n"); request_decode_add_vi(&xdrs, request); break; case GETTICKETREQ: - printf("REQUEST : GETTICKETREQ\n"); request_decode_get_ticket(&xdrs, buffer, socket_id, request); break; case SHOWTICKETREQ: - printf("REQUEST : SHOWTICKETREQ\n"); request_decode_show_ticket(&xdrs, request); break; default: return REQSENDERR; @@ -257,11 +288,8 @@ int request_call_close_instrument(struct RequestData * request, int socket_id, i } int request_call_set_time(struct RequestData * request, DD_Var_t * ddvar, int socket_id) { - //printf("\tinstrument id : %i\n", request->instrument_id); - //printf("\tstart ddtime : %s\n", request->time); double time_s; time_s = DD_Time2Double(request->time); - //printf("\tstart double : %f\n", time_s); int err; if(request->instrument_id < 0) err = NOID; if(err >= 0) err = SetTime(ddvar,DD_Time2Double(request->time)); @@ -300,26 +328,26 @@ int request_call_data_info(struct RequestData * request, DD_Var_t * ddvar, int s int request_call_get_ticket(struct RequestData * request, int socket_id, int * done_flag, int * ticket_id) { int err; - printf("Checking ticket : login: %s, tick: %s\n", request->login, request->ticket); + printf("Checking ticket\n"); err= CheckTicket(request->login, request->ticket); - printf("err: %i\n", err); + printf("\terr:%i\n", err); Put2Log(request->user_id,request->host,request->login,err); /* Log file */ - printf("Getting ticket : user_id: %i, host: %s, err: %i\n", request->user_id, request->host, err); + printf("A\n"); if(err>= 0) *ticket_id = GetTicket(request->user_id,request->host,err); - printf("\tticket id : %i\n", *ticket_id); + printf("B\n"); PutHeader(*ticket_id,0,0,socket_id); + printf("C\n"); *done_flag= 1; + printf("\treturning : %i\n", err); return err; } double get_instrument_time2(int instrument_id) { - //printf("in get_instrument_time2 id : %i\n", instrument_id); // selection query char * q = malloc(1024 * sizeof(char)); double ans = -1; int rc; sprintf(q, "SELECT start FROM instrument_time WHERE id=%i LIMIT 1;", instrument_id); - //printf("query : -%s-\n", q); sqlite3 * db; sqlite3_stmt * res; sqlite3_open("amda.db", &db); @@ -327,25 +355,20 @@ double get_instrument_time2(int instrument_id) { rc=sqlite3_step(res); if(rc==SQLITE_ROW) { ans = sqlite3_column_double(res, 0); - //printf("Row found : %f\n", ans); } else { - //printf("No row found\n"); } sqlite3_finalize(res); sqlite3_close(db); free(q); - //printf("before return :%f\n", ans); return ans; } int datatable_has_data2(char * table_name, double start, double stop) { - //printf("in datatable_has_data2 : table_name:%s, start:%f, stop:%f\n", table_name, start, stop); int ans = 0, rc; char * query = malloc( 1024 * sizeof(char) ); memset(query, 0, 1024); sprintf(query, "SELECT count(Time) FROM %s WHERE Time>=%f AND Time<%f;", table_name, start, stop); - //printf("\t\t has data query : %s\n", query); sqlite3 * db; sqlite3_stmt * res; sqlite3_open("amda.db", &db); @@ -353,21 +376,17 @@ int datatable_has_data2(char * table_name, double start, double stop) { rc=sqlite3_step(res); if(rc==SQLITE_ROW) { ans = sqlite3_column_int(res, 0); - //printf("row found :%i\n", ans); } else { - //printf("no row found\n"); } sqlite3_finalize(res); sqlite3_close(db); free(query); - //printf("before return : %i\n", ans); return ans; } int request_call_data_get(struct RequestData * request, int socket_id, int * done_flag, int * ticket_id) { int err,serr; - //printf("\tparameters : "); - //print_string_array(request->variable_names, request->variable_count); + print_string_array(request->variable_names, request->variable_count); // note the time at this point struct timespec t0, t1; clock_gettime(CLOCK_MONOTONIC_RAW, &t0); @@ -390,17 +409,14 @@ int request_call_data_get(struct RequestData * request, int socket_id, int * don has_vi=has_virtual_instrument(table_name); if(has_vi) { // try to get data for this instrument between start and stop dates - //printf("Instrument id : %i\n", request->instrument_id); double start_time; start_time = get_instrument_time(request->instrument_id); - //printf("start_time %f\n", start_time); - //printf("request time str : %s\n", request->time); double stop_time; stop_time = start_time + DD_Time2Double(request->time); - //printf("before datatable_has_data2 call : table_name:%s, start_time:%f, stop_time:%f\n", table_name, start_time,stop_time); + printf("QUERY TIME : %f -> %f\n", start_time, stop_time); int has_data; has_data = datatable_has_data(table_name, start_time, stop_time); - //printf("in request_call_data_get : has_data : %i\n", has_data); if(has_data || 1) { err = get_data_from_table(table_name, request); + printf("after get_data_from_table, table:%s, err:%i, flag:%i\n", table_name, err, DD_Var[request->instrument_id]->LastPacketFlag); } } @@ -411,8 +427,8 @@ int request_call_data_get(struct RequestData * request, int socket_id, int * don // send data if(err >= 0) { - //printf("\tSending data packet (err:%i)\n", err); serr = SendDataPacket(DD_Var[request->instrument_id],socket_id,DD_Var[request->instrument_id]->LastPacketFlag); /* OK, MOREDATA, MOREDELAY */ + printf("\tSendDataPacket returns: %i\n", serr); } } while((err >= 0) && (DD_Var[request->instrument_id]->LastPacketFlag == MOREDATA)); @@ -420,8 +436,6 @@ int request_call_data_get(struct RequestData * request, int socket_id, int * don // note time at this point clock_gettime(CLOCK_MONOTONIC_RAW, &t1); uint64_t ns = (t1.tv_sec - t0.tv_sec) * 1000000 + (t1.tv_nsec - t0.tv_nsec) / 1000; - //printf("\t\t\tREQUEST TIME :%" PRIu64 "\n", ns); - //printf("\t\t\t\t %f ms\n", ns / 1000.); // TODO - free DD_Var_t object //DD_Var[r.instrument_id] = NULL; return err; @@ -432,36 +446,28 @@ int request_call(struct RequestData * request, int socket_id, int * done_flag, i int err; switch(request->type) { case OPENINSREQ: - printf("REQUEST : OPENINSREQ\n"); err=request_call_open_instrument(request, DD_Var, socket_id); break; case CLOSEINSREQ: - printf("REQUEST : CLOSEINSREQ\n"); err=request_call_close_instrument(request, socket_id, remain_id, done_flag); break; case TIMESETREQ: - printf("REQUEST : TIMESETREQ\n"); err=request_call_set_time(request, DD_Var[request->instrument_id], socket_id); - printf("SetTime err : %i\n", err); set_instrument_time(request->instrument_id, DD_Time2Double(request->time)); break; case DATAINFOREQ: - printf("REQUEST : DATAINFOREQ\n"); err=request_call_data_info(request, DD_Var[request->instrument_id],socket_id); break; case GETTICKETREQ: - printf("REQUEST : GETTICKETREQ\n"); err = request_call_get_ticket(request, socket_id, done_flag, ticket_id); break; case DATAGETREQ: ; - printf("REQUEST : DATAGETREQ\n"); err = request_call_data_get(request, socket_id, done_flag, ticket_id); break; case ADDVIREQ: err = request_call_add_vi(request, socket_id, done_flag); break; case SHOWTICKETREQ: - printf("\tst id: %i\n\tst host: %s\n\tSTReqLogin : %s\n", request->st_id,request->st_host,request->st_login); err = ShowTicket(request->st_id,request->st_host,request->st_login); PutHeader(err,0,0,socket_id); *done_flag= 1; diff --git a/tests/testGetData.c b/tests/testGetData.c index e7a8c43..6276306 100644 --- a/tests/testGetData.c +++ b/tests/testGetData.c @@ -11,11 +11,11 @@ #include #include -#define DATA_VI "mes:mag:orb\0" -#define DATA_STARTTIME "2012000000000000\0" +#define DATA_VI "m10:m1:orb\0" +#define DATA_STARTTIME "1974088000000000\0" #define DATA_TIMEINT "0000010000000000\0" #define DATA_TIMENAME "Time\0" -#define DATA_PARAMNAME "B_MSO\0" +#define DATA_PARAMNAME "POS_MO\0" /* -- libgit2 0.21.2