-module.version = 1.0.1
+module.version = 1.0.2
module.age = 1
-
\ No newline at end of file
+
"where u.userid=e.userid "
"and j.jobid = e.jobid "
"and j.dg_jobid like 'https://%|Ss:%d%%' "
- "and arrived > '%|Ss' and arrived <= '%|Ss' "
+ "and arrived > %s and arrived <= %s "
"order by arrived",
ctx->srvName,ctx->srvPort,
from_s,to_s);
}
time(&end);
-/* XXX: get rid of apostrophes returned by edg_wll_TimeToDB() */
time_s = strdup(edg_wll_TimeToDB(start));
- time_s[strlen(time_s)-1] = 0;
- edg_wll_SetServerState(ctx,EDG_WLL_STATE_DUMP_START,time_s+1);
+ edg_wll_SetServerState(ctx,EDG_WLL_STATE_DUMP_START,time_s);
free(time_s);
time_s = strdup(edg_wll_TimeToDB(end));
- time_s[strlen(time_s)-1] = 0;
- edg_wll_SetServerState(ctx,EDG_WLL_STATE_DUMP_END,time_s+1);
+ edg_wll_SetServerState(ctx,EDG_WLL_STATE_DUMP_END,time_s);
free(time_s);
result->from = from;
edg_wll_SetError(ctx, errno, NULL);
goto cleanup;
}
- time_s[strlen(time_s)-1] = 0;
/* Format the address
*/
*/
trio_asprintf(&q,
"insert into notif_registrations(notifid,destination,valid,userid,conditions) "
- "values ('%|Ss','%|Ss','%|Ss','%|Ss', '<and>%|Ss</and>')",
- nid_s, addr_s? addr_s: address_override, time_s+1, owner, xml_conds);
+ "values ('%|Ss','%|Ss',%s,'%|Ss', '<and>%|Ss</and>')",
+ nid_s, addr_s? addr_s: address_override, time_s, owner, xml_conds);
if ( edg_wll_ExecStmt(ctx, q, NULL) < 0 )
goto cleanup;
edg_wll_SetError(ctx, errno, "Formating validity time");
goto cleanup;
}
- time_s[strlen(time_s)-1] = 0;
/* Format the address
*/
}
- update_notif(ctx, nid, NULL, addr_s? addr_s: address_override, (const char *)(time_s+1));
+ update_notif(ctx, nid, NULL, addr_s? addr_s: address_override, (const char *)(time_s));
cleanup:
if ( time_s ) free(time_s);
edg_wll_SetError(ctx, errno, "Formating validity time");
goto cleanup;
}
- time_s[strlen(time_s)-1] = 0;
- update_notif(ctx, nid, NULL, NULL, time_s+1);
+ update_notif(ctx, nid, NULL, NULL, time_s);
cleanup:
if ( time_s ) free(time_s);
}
if ( valid )
{
- trio_asprintf(&aux, "%s %svalid='%|Ss'", stmt, dest? ",": "", valid);
+ trio_asprintf(&aux, "%s %svalid=%s", stmt, dest? ",": "", valid);
free(stmt);
stmt = aux;
}
char *stmt = NULL;
trio_asprintf(&stmt,"insert into server_state (prefix,name,value) "
- "values ('https://%|Ss:%d','%|Ss','%|Ss')",
+ "values ('https://%|Ss:%d','%|Ss',%s)",
ctx->srvName,ctx->srvPort,name,val);
switch(edg_wll_ExecStmt(ctx,stmt,NULL)) {
case 1: break;
case -1: if (edg_wll_Error(ctx,NULL,NULL) == EEXIST) {
free(stmt);
- trio_asprintf(&stmt,"update server_state set value = '%|Ss' "
+ trio_asprintf(&stmt,"update server_state set value = %s "
"where prefix = 'https://%|Ss:%d' "
"and name = '%|Ss'",
val,ctx->srvName,ctx->srvPort,name);
* with readers */
trio_asprintf(&stmt,
"insert into events(jobid,event,code,prog,host,time_stamp,usec,arrived,level,userid) "
- "values ('%|Ss',%d,%d,'%|Ss','%|Ss',%s,%d,'%|Ss',%d,'%|Ss')",
+ "values ('%|Ss',%d,%d,'%|Ss','%|Ss',%s,%d,%s,%d,'%|Ss')",
jobid,next,EDG_WLL_EVENT_UNDEF,ssrc,e->any.host,
edg_wll_TimeToDB(e->any.timestamp.tv_sec),e->any.timestamp.tv_usec,
now_s, e->any.level,userid);