setsockopt(stab.conn,SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
+ if (conf->port) port = conf->port;
a.sin_family = AF_INET;
a.sin_addr.s_addr = INADDR_ANY;
a.sin_port = htons(atoi(port));
conf->feeds = calloc(2, sizeof(*(conf->feeds)));
conf->feeds[0] = calloc(1, sizeof(**(conf->feeds)));
-// conf->feeds[0]->PS_URL = strdup("http://umbar.ics.muni.cz:8901");
- conf->feeds[0]->PS_URL = strdup("http://localhost:8901");
+ conf->feeds[0]->PS_URL = strdup("http://umbar.ics.muni.cz:8901");
+// conf->feeds[0]->PS_URL = strdup("http://localhost:8901");
// all job since Epoche
conf->feeds[0]->query = calloc(2,sizeof(*conf->feeds[0]->query));
conf->feeds[1] = NULL;
conf->cs = getenv("GLITE_JPIS_DB");
+ conf->port = getenv("GLITE_JPIS_PORT");
*configuration = conf;
char *PS_URL; //URLs of Primary Storage servers
glite_jp_query_rec_t **query; // query to Primary Server (aka filter)
int history, // type of query
- continuous;
+ continuous;
} glite_jp_is_feed;
glite_jp_is_feed **feeds; // null terminated list of feeds
- char *cs;
+ char *cs, *port;
} glite_jp_is_conf;
#include <stdlib.h>
#include <errno.h>
+#include <string.h>
+
+#include <globus_common.h>
#include "conf.h"
#include "context.h"
int glite_jpis_init_context(glite_jpis_context_t *isctx, glite_jp_context_t jpctx, glite_jp_is_conf *conf) {
+ char hname[512];
+
if ((*isctx = calloc(sizeof(**isctx), 1)) != NULL) {
(*isctx)->jpctx = jpctx;
(*isctx)->conf = conf;
+ globus_libc_gethostname(hname, sizeof hname);
+ (*isctx)->hname = strdup(hname);
return 0;
} else return ENOMEM;
}
void glite_jpis_free_context(glite_jpis_context_t ctx) {
+ free(ctx->hname);
free(ctx);
}
char param_feedid[33], param_ps[256], param_indexed[256];
unsigned long param_ps_len, param_feedid_len, param_indexed_len;
void *param_expires;
+
+ char *hname;
} *glite_jpis_context_t;
typedef struct _slave_data_t{
#include "glite/jp/types.h"
#include "glite/jp/context.h"
+#include "glite/security/glite_gsplugin.h"
#include "jpps_H.h"
#include "jpps_.nsmap"
int i, dest_index;
struct soap *soap = soap_new();
glite_jp_error_t err;
- char *src;
+ char *src, hname[512];
printf("MyFeedIndex for %s called\n", dest);
soap_init(soap);
soap_set_namespaces(soap,jpps__namespaces);
+// TODO
+ soap_register_plugin(soap,glite_gsplugin);
memset(&in, 0, sizeof(in));
memset(&err, 0, sizeof(err));
in.history = conf->feeds[dest_index]->history;
in.continuous = conf->feeds[dest_index]->continuous;
+ in.destination = ctx->hname;
if (check_fault(soap,soap_call___jpsrv__FeedIndex(soap,dest,"", &in, &out)) != 0) {
printf("\n");