From: František Dvořák Date: Fri, 25 Jan 2013 15:17:22 +0000 (+0000) Subject: Declare tag value functions in lb.types (to address 'implicit declaration' warnings... X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=428eb82960badb12122d8b8acfb68633498997f9;p=jra1mw.git Declare tag value functions in lb.types (to address 'implicit declaration' warnings), this fixes crashes around tag values on SL5 and Debian. Fix some other simple warnings. --- diff --git a/org.glite.lb.client/examples/job_status_threaded.c b/org.glite.lb.client/examples/job_status_threaded.c index ea45813..39ebf51 100644 --- a/org.glite.lb.client/examples/job_status_threaded.c +++ b/org.glite.lb.client/examples/job_status_threaded.c @@ -81,6 +81,8 @@ void *thread_meat(char *jobid) { cleanup: edg_wll_FreeContext(ctx); + + return NULL; } static void diff --git a/org.glite.lb.client/examples/qstat.c b/org.glite.lb.client/examples/qstat.c index ad0713a..64bc8c5 100644 --- a/org.glite.lb.client/examples/qstat.c +++ b/org.glite.lb.client/examples/qstat.c @@ -33,8 +33,6 @@ limitations under the License. #include "glite/lb/xml_conversions.h" #include "glite/lb/jobstat.h" -extern char *edg_wll_TagListToString(edg_wll_TagValue *); - static void dgerr(edg_wll_Context,char *); static void printstat(edg_wll_JobStat,int); diff --git a/org.glite.lb.common/interface/events.h.T b/org.glite.lb.common/interface/events.h.T index 37642b8..594aa00 100644 --- a/org.glite.lb.common/interface/events.h.T +++ b/org.glite.lb.common/interface/events.h.T @@ -120,15 +120,6 @@ extern char *edg_wll_EventToString(edg_wll_EventCode event); /** - * Free allocated edg_wll_TagValue * list - * \param list IN: list to free - */ -extern void edg_wll_FreeTagList( - edg_wll_TagValue *list -); - - -/** * \typedef edg_wll_KeyNameCode * Predefined ULM key types */ diff --git a/org.glite.lb.common/interface/events_parse.h b/org.glite.lb.common/interface/events_parse.h index 156edbc..0f31cbb 100644 --- a/org.glite.lb.common/interface/events_parse.h +++ b/org.glite.lb.common/interface/events_parse.h @@ -110,14 +110,6 @@ extern edg_wll_LogLine edg_wll_UnparseNotifEvent( edg_wll_Event * event ); -extern int edg_wll_TagListParse( - const char *src, - edg_wll_TagValue **list); - -extern int edg_wll_TagListCompare( - edg_wll_TagValue *a, - edg_wll_TagValue *b); - #ifdef __cplusplus } #endif diff --git a/org.glite.lb.common/interface/jobstat.h.T b/org.glite.lb.common/interface/jobstat.h.T index 601c853..b71eb35 100644 --- a/org.glite.lb.common/interface/jobstat.h.T +++ b/org.glite.lb.common/interface/jobstat.h.T @@ -254,6 +254,10 @@ extern char *edg_wll_CreamStatToString(enum edg_wll_StatCream_state); */ extern char *edg_wll_VMStatToString(enum edg_wll_StatVm_state); +/** + * Convert string VM status to numeric code + */ +extern enum edg_wll_StatVm_state edg_wll_StringToVMStat(const char* name); /** * Extract a variable from the JDL attribute diff --git a/org.glite.lb.common/interface/xml_conversions.h b/org.glite.lb.common/interface/xml_conversions.h index 0378ea1..6d0495d 100644 --- a/org.glite.lb.common/interface/xml_conversions.h +++ b/org.glite.lb.common/interface/xml_conversions.h @@ -148,6 +148,7 @@ glite_jobid_t edg_wll_from_string_to_jobid(edg_wll_XML_ctx *XMLCtx); edg_wll_NotifId edg_wll_from_string_to_notifid(edg_wll_XML_ctx *XMLCtx); edg_wll_JobStatCode edg_wll_from_string_to_edg_wll_JobStatCode(edg_wll_XML_ctx *XMLCtx); enum edg_wll_StatVm_state edg_wll_from_string_to_edg_wll_StatVm_state(edg_wll_XML_ctx *XMLCtx); +enum edg_wll_StatJobtype edg_wll_from_string_to_edg_wll_StatJobtype(edg_wll_XML_ctx *XMLCtx); int edg_wll_from_string_to_int(edg_wll_XML_ctx *XMLCtx); float edg_wll_from_string_to_float(edg_wll_XML_ctx *XMLCtx); double edg_wll_from_string_to_double(edg_wll_XML_ctx *XMLCtx); diff --git a/org.glite.lb.common/src/status.c.T b/org.glite.lb.common/src/status.c.T index 8f4cd15..7b874af 100644 --- a/org.glite.lb.common/src/status.c.T +++ b/org.glite.lb.common/src/status.c.T @@ -70,8 +70,6 @@ static const struct timeval null_timeval = {0,0}; } @@@} -extern void edg_wll_FreeTagList(edg_wll_TagValue *); - void edg_wll_FreeStatus(edg_wll_JobStat *stat) { if (stat) { diff --git a/org.glite.lb.common/src/xml_conversions.c b/org.glite.lb.common/src/xml_conversions.c index 1fe650b..e52bd6b 100644 --- a/org.glite.lb.common/src/xml_conversions.c +++ b/org.glite.lb.common/src/xml_conversions.c @@ -28,8 +28,6 @@ limitations under the License. #include "jobstat.h" -extern char *edg_wll_TagListToString(edg_wll_TagValue *); - static const struct timeval null_timeval = {0,0}; @@ -807,7 +805,8 @@ void *edg_wll_from_string_to_cclassad(edg_wll_XML_ctx *XMLCtx) edg_wll_TagValue *edg_wll_from_string_to_taglist(edg_wll_XML_ctx *XMLCtx) { - char *s, *out = NULL; + char *s; + edg_wll_TagValue *out = NULL; s = glite_lbu_UnescapeXML((const char*) XMLCtx->char_buf); if(s) { diff --git a/org.glite.lb.logger/interface/interlogd.h b/org.glite.lb.logger/interface/interlogd.h index 1420cea..6282048 100644 --- a/org.glite.lb.logger/interface/interlogd.h +++ b/org.glite.lb.logger/interface/interlogd.h @@ -238,9 +238,7 @@ void cred_handle_destroy(void *); struct server_msg *server_msg_create(il_octet_string_t *, long); struct server_msg *server_msg_copy(struct server_msg *); int server_msg_init(struct server_msg *, il_octet_string_t *); -#if defined(INTERLOGD_EMS) int server_msg_is_priority(struct server_msg *); -#endif int server_msg_free(struct server_msg *); void server_msg_use(struct server_msg *); int server_msg_release(struct server_msg *); diff --git a/org.glite.lb.logger/src/input_queue_socket.c b/org.glite.lb.logger/src/input_queue_socket.c index ed6034d..32363c4 100644 --- a/org.glite.lb.logger/src/input_queue_socket.c +++ b/org.glite.lb.logger/src/input_queue_socket.c @@ -21,6 +21,7 @@ limitations under the License. #include #include #include +#include #include #include #include diff --git a/org.glite.lb.logger/src/plugin_mgr.c b/org.glite.lb.logger/src/plugin_mgr.c index cdf1e70..1e8d0a8 100644 --- a/org.glite.lb.logger/src/plugin_mgr.c +++ b/org.glite.lb.logger/src/plugin_mgr.c @@ -66,9 +66,9 @@ int plugin_mgr_init(const char *plugin_name, char *cfg) DL_RESOLVESYM(plugin->plugin_def.plugin_init, dl_handle, "plugin_init", int(*)(char *)); DL_RESOLVESYM(plugin->plugin_def.plugin_supports_scheme, dl_handle, "plugin_supports_scheme", int(*)(const char *)); - DL_RESOLVESYM(plugin->plugin_def.event_queue_connect, dl_handle, "event_queue_connect", int (*)(struct event_queue*)); - DL_RESOLVESYM(plugin->plugin_def.event_queue_send, dl_handle, "event_queue_send", int (*)(struct event_queue *)); - DL_RESOLVESYM(plugin->plugin_def.event_queue_close, dl_handle, "event_queue_close", int (*)(struct event_queue *)); + DL_RESOLVESYM(plugin->plugin_def.event_queue_connect, dl_handle, "event_queue_connect", int (*)(struct event_queue*, struct queue_thread *)); + DL_RESOLVESYM(plugin->plugin_def.event_queue_send, dl_handle, "event_queue_send", int (*)(struct event_queue *,struct queue_thread *)); + DL_RESOLVESYM(plugin->plugin_def.event_queue_close, dl_handle, "event_queue_close", int (*)(struct event_queue *,struct queue_thread *)); return (*plugin->plugin_def.plugin_init)(cfg); } diff --git a/org.glite.lb.server/src/lb_html.h b/org.glite.lb.server/src/lb_html.h index ceab02b..82a0d94 100644 --- a/org.glite.lb.server/src/lb_html.h +++ b/org.glite.lb.server/src/lb_html.h @@ -39,6 +39,7 @@ typedef enum _http_output_type{ int edg_wll_QueryToHTML(edg_wll_Context,edg_wll_Event *,char **); int edg_wll_ConfigurationToHTML(edg_wll_Context ctx, int admin, char **message, int text); +int edg_wll_WSDLOutput(edg_wll_Context ctx, char **message, char *filename); int edg_wll_GeneralJobStatusToHTML(edg_wll_Context, edg_wll_JobStat, char **, int text); int edg_wll_UserInfoToHTML(edg_wll_Context, edg_wlc_JobId *, edg_wll_JobStat *, char **, int text); int edg_wll_UserNotifsToHTML(edg_wll_Context ctx, char **notifids, char **message, http_admin_option option, int adm); diff --git a/org.glite.lb.types/interface/lb_types.h b/org.glite.lb.types/interface/lb_types.h index 07e433b..5479ce0 100644 --- a/org.glite.lb.types/interface/lb_types.h +++ b/org.glite.lb.types/interface/lb_types.h @@ -41,6 +41,33 @@ typedef struct _edg_wll_TagValue { } edg_wll_TagValue; +/** + * Free allocated edg_wll_TagValue * list + * \param list IN: list to free + */ +void edg_wll_FreeTagList(edg_wll_TagValue *list); + +/** + * Deep copy the tag list + */ +edg_wll_TagValue *edg_wll_CopyTagList(edg_wll_TagValue *src); + +/** + * Function for parsing name=value tag lists + */ +int edg_wll_TagListParse(const char *src, edg_wll_TagValue **list); + +/** + * Comparing tag list values + */ +int edg_wll_TagListCompare(edg_wll_TagValue *a, edg_wll_TagValue *b); + +/** + * Function for stringifying name=value tag lists + */ +char * edg_wll_TagListToString(edg_wll_TagValue *list); + + #ifdef __cplusplus } #endif diff --git a/org.glite.lbjp-common.trio/src/escape.c b/org.glite.lbjp-common.trio/src/escape.c index 61a76d9..69d9626 100644 --- a/org.glite.lbjp-common.trio/src/escape.c +++ b/org.glite.lbjp-common.trio/src/escape.c @@ -17,6 +17,8 @@ limitations under the License. */ +#define _GNU_SOURCE + #include #include #include