- SURFXML_BUFFER_SET(router_id, struct_cluster->router_id);
- SURFXML_BUFFER_SET(router_coordinates, "");
- SURFXML_START_TAG(router);
- SURFXML_END_TAG(router);
+ s_sg_platf_router_cbarg_t router;
+ char *newid=NULL;
+ memset(&router,0,sizeof(router));
+ router.id = struct_cluster->router_id;
+ router.coord = "";
+ if (!router.id || !strcmp(router.id,""))
+ router.id = newid = bprintf("%s%s_router%s", struct_cluster->prefix, struct_cluster->id, struct_cluster->suffix);
+ sg_platf_new_router(&router);
+ if (newid)
+ free(newid);