- int port;
-
- if(incoming->xId<globals->x1){
- strcpy(host,globals->west_host);
- port=globals->west_port;}
- else if(incoming->xId>globals->x2){
- strcpy(host,globals->east_host);
- port=globals->east_port;}
- else if(incoming->yId<globals->y1){
- strcpy(host,globals->south_host);
- port=globals->south_port;}
- else if(incoming->yId>globals->y2){
- strcpy(host,globals->north_host);
- port=globals->north_port;}
-
- gras_socket_t temp_sock;
- xbt_ex_t e; // the error variable used in TRY.. CATCH tokens.
- TRY{
- temp_sock=gras_socket_client(host,port);
- }CATCH(e){
+ int port = 0;
+
+ if (incoming->xId < globals->x1) {
+ strcpy(host, globals->west_host);
+ port = globals->west_port;
+ } else if (incoming->xId > globals->x2) {
+ strcpy(host, globals->east_host);
+ port = globals->east_port;
+ } else if (incoming->yId < globals->y1) {
+ strcpy(host, globals->south_host);
+ port = globals->south_port;
+ } else if (incoming->yId > globals->y2) {
+ strcpy(host, globals->north_host);
+ port = globals->north_port;
+ }
+
+
+
+ TRY {
+ temp_sock = gras_socket_client(host, port);
+ }
+ CATCH(e) {